Skip to content

Implement complete authentication UI and enhance task management features#29

Merged
tqha1011 merged 31 commits intomainfrom
feature/countdown_timer
Apr 9, 2026
Merged

Implement complete authentication UI and enhance task management features#29
tqha1011 merged 31 commits intomainfrom
feature/countdown_timer

Conversation

@hoanghaoz
Copy link
Copy Markdown
Collaborator

@hoanghaoz hoanghaoz commented Apr 9, 2026

Summary by CodeRabbit

Release Notes

  • New Features

    • Implemented a dedicated settings screen in the main menu with logout functionality.
  • Bug Fixes

    • Refined authentication navigation flows for improved user experience after login and registration.
    • Added validation for Pomodoro timer duration settings to prevent invalid inputs.
    • Enhanced error messaging for unconfirmed email addresses during authentication.

hoanghaoz and others added 30 commits March 24, 2026 16:04
- Added Pomodoro timer with Start/Reset/Skip logic.
- Integrated local Quick Notes with Pin/Delete functionality.
- Supported image attachments in notes using image_picker.
- Added Focus settings: time duration, vibration, and ringtones.
Fixed 3 file(s) based on 4 unresolved review comments.

Co-authored-by: CodeRabbit <[email protected]>
Copy link
Copy Markdown
Owner

@tqha1011 tqha1011 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

goat

@tqha1011 tqha1011 merged commit bb72c59 into main Apr 9, 2026
1 check passed
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 9, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cb9f2a5f-d292-4c2c-aeb8-0b92bd254715

📥 Commits

Reviewing files that changed from the base of the PR and between 6a20633 and f17dd00.

⛔ Files ignored due to path filters (1)
  • src/pubspec.lock is excluded by !**/*.lock
📒 Files selected for processing (7)
  • src/lib/features/auth/presentation/view/login_view.dart
  • src/lib/features/auth/presentation/view/register_view.dart
  • src/lib/features/auth/presentation/viewmodels/auth_viewmodels.dart
  • src/lib/features/auth/services/auth_helper.dart
  • src/lib/features/main/view/screens/main_screen.dart
  • src/lib/features/main/view/screens/settings_screen.dart
  • src/lib/features/note/viewmodel/focus_viewmodel.dart

📝 Walkthrough

Walkthrough

The changes introduce a new settings screen with logout functionality, refine authentication navigation flows (clearing the stack after login, adjusting post-registration redirects), extend error handling for email confirmation scenarios, improve profile data management in auth_helper, and add input validation to the focus viewmodel's settings and progress calculations.

Changes

Cohort / File(s) Summary
Auth Navigation
src/lib/features/auth/presentation/view/login_view.dart, src/lib/features/auth/presentation/view/register_view.dart
Modified post-authentication navigation: login now clears the stack to the first route using popUntil, and register pops back to previous route instead of pushing a new LoginView.
Settings Screen
src/lib/features/main/view/screens/settings_screen.dart, src/lib/features/main/view/screens/main_screen.dart
Added new SettingsScreen widget with logout button; integrated into main screen to replace placeholder text.
Auth Error Handling
src/lib/features/auth/presentation/viewmodels/auth_viewmodels.dart
Extended error translation map to recognize "email not confirmed" backend error and return localized Vietnamese message.
Profile Data Management
src/lib/features/auth/services/auth_helper.dart
Refactored login and register methods: improved profile upsert logic to handle userMetadata extraction, added guard for email confirmation flow (session == null), and optimized .upsert() usage patterns.
Focus Validation
src/lib/features/note/viewmodel/focus_viewmodel.dart
Added defensive guards in progress computation (prevents division by invalid totalTime) and input validation in updateSettings (ensures timer durations are at least 1 minute).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • tqha1011

Poem

🐰 A rabbit hops through settings new,
With logout buttons shiny blue,
Auth flows cleared with popUntil care,
Validation guards prevent despair,
No more crashes—progress guarded there! 🎉

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/countdown_timer

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants