fix(01): resolve checker blocker issues

- Create missing Plan 01-07 (password reset navigation)
- Update Plan 01-10 to contain logout functionality (covers AUTH-05)
- Split Plan 01-04 into Plans 01-04 and 01-11 (2-3 tasks each)
- Fix dependency references throughout phase
- Update ROADMAP.md to reflect 11 plans in 4 waves
This commit is contained in:
Dani B
2026-01-28 00:49:01 -05:00
parent 4a20b93fae
commit ff56c75da0
7 changed files with 265 additions and 230 deletions

View File

@@ -3,35 +3,39 @@ phase: 01-authentication
plan: 10
type: execute
wave: 4
depends_on: ["01-01", "01-02", "01-03", "01-04", "01-05", "01-06", "01-07", "01-08", "01-09"]
files_modified: ["lib/presentation/pages/home_page.dart", "lib/main.dart", "test/integration_test/auth_flow_test.dart"]
depends_on: ["01-11", "01-08", "01-09"]
files_modified: ["lib/features/authentication/presentation/pages/home_page.dart", "lib/providers/auth_provider.dart", "test/integration_test/auth_flow_test.dart"]
autonomous: false
user_setup: []
must_haves:
truths:
- "Password reset navigation works seamlessly"
- "Deep linking works on mobile and web"
- "User can log out from any screen"
- "Logout clears session and requires re-authentication"
- "All auth success criteria are verified"
artifacts:
- path: "lib/app/router.dart"
provides: "Complete routing with password reset support"
min_lines: 50
- path: "lib/features/authentication/presentation/pages/home_page.dart"
provides: "Home page with logout functionality"
min_lines: 30
- path: "lib/providers/auth_provider.dart"
provides: "Enhanced auth provider with logout"
min_lines: 40
key_links:
- from: "lib/app/router.dart"
to: "reset_password_page.dart"
via: "route configuration"
pattern: "/reset-password"
- from: "lib/app/router.dart"
to: "update_password_page.dart"
via: "deep link handling"
pattern: "/update-password"
- from: "lib/features/authentication/presentation/pages/home_page.dart"
to: "lib/providers/auth_provider.dart"
via: "logout method call"
pattern: "signOut|logout"
- from: "lib/providers/auth_provider.dart"
to: "supabase.auth"
via: "session clearing"
pattern: "supabase\\.auth\\.signOut"
---
<objective>
Integrate password reset navigation and deep linking.
Implement logout functionality and verify all authentication success criteria.
Purpose: Complete password reset flow with proper routing and URL handling.
Output: Full navigation system supporting password reset on mobile and web platforms.
Purpose: Complete authentication system with logout capability and validate all requirements are met.
Output: Working logout functionality and verified authentication system meeting all success criteria.
</objective>
<execution_context>
@@ -49,38 +53,69 @@ Output: Full navigation system supporting password reset on mobile and web platf
<tasks>
<task type="auto">
<name>Integrate password reset with navigation</name>
<files>lib/app/router.dart</files>
<name>Add logout functionality to auth provider</name>
<files>lib/providers/auth_provider.dart</files>
<action>
Update router to:
1. Add /reset-password route for reset request page
2. Add /update-password route for password update page
3. Handle deep linking for password reset URLs
4. Parse reset tokens from URL parameters
5. Add proper route guards and validation
6. Include password reset links in login/signup pages
7. Configure proper URL scheme for mobile deep linking
8. Handle web redirect URLs properly
9. Add error handling for malformed reset URLs
10. Ensure navigation flow works correctly
Update AuthProvider to:
1. Implement signOut() method that calls repository.signOut()
2. Clear all user state on logout
3. Handle loading state during logout
4. Handle any logout errors gracefully
5. Ensure proper cleanup of resources
6. Update auth state to null after successful logout
7. Dispose of any stream subscriptions
8. Navigate to login screen after logout
</action>
<verify>Navigation properly handles password reset flow and deep linking</verify>
<done>Complete navigation integration for password reset functionality</done>
<verify>AuthProvider successfully logs out user and clears all session data</verify>
<done>Complete logout functionality in auth state management</done>
</task>
<task type="auto">
<name>Add logout button to home page</name>
<files>lib/features/authentication/presentation/pages/home_page.dart</files>
<action>
Update HomePage to:
1. Add logout button in app bar or menu
2. Connect logout button to AuthProvider.signOut()
3. Show confirmation dialog before logout
4. Handle logout loading state
5. Provide clear logout feedback
6. Ensure logout works from any screen
7. Add proper accessibility labels
8. Style logout button appropriately
</action>
<verify>Logout button works correctly and logs user out from home page</verify>
<done>Home page with working logout functionality</done>
</task>
<task type="checkpoint:human-verify" gate="blocking">
<what-built>Complete authentication system with logout functionality</what-built>
<how-to-verify>
1. Test signup flow: create new account in <3 seconds
2. Test login flow: log in with valid credentials
3. Test session persistence: restart app and verify still logged in
4. Test password reset: request reset, receive email within 1 minute
5. Test logout: tap logout button, verify session cleared
6. Test re-authentication: try accessing protected page after logout
7. Test error messages: invalid password vs account not found
</how-to-verify>
<resume-signal>Type "approved" if all success criteria are met, or describe issues</resume-signal>
</task>
</tasks>
<verification>
1. Navigation flows correctly through entire password reset journey
2. Deep linking works on both mobile and web platforms
3. Route guards prevent unauthorized access to reset pages
4. Error handling covers malformed reset URLs
5. Password reset links appear in login/signup pages
6. URL scheme properly configured for mobile deep linking
1. User can sign up with email and password in <3 seconds
2. User can log in with valid credentials and session persists across app restarts
3. User can reset forgotten password and receive recovery email within 1 minute
4. User can log out from any screen and subsequent session requires re-authentication
5. Failed login attempts return clear error messages (invalid password vs account not found)
6. Logout button is accessible and works correctly from home page
7. All authentication flows work end-to-end without errors
</verification>
<success_criteria>
Complete password reset navigation system with deep linking support across platforms.
Complete authentication system meeting all Phase 1 success criteria with working logout functionality.
</success_criteria>
<output>