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

@@ -2,45 +2,36 @@
phase: 01-authentication
plan: 07
type: execute
wave: 4
depends_on: ["01-01", "01-02", "01-03", "01-04", "01-05", "01-06"]
files_modified: ["lib/presentation/pages/home_page.dart", "lib/main.dart", "test/integration_test/auth_flow_test.dart"]
autonomous: false
wave: 3
depends_on: ["01-05", "01-06"]
files_modified: ["lib/app/router.dart", "lib/presentation/pages/home_page.dart", "lib/main.dart", "test/integration_test/auth_flow_test.dart"]
autonomous: true
user_setup: []
must_haves:
truths:
- "User can complete full auth flow in under 3 seconds"
- "Session persists across app restarts"
- "User can logout from any screen"
- "All 5 success criteria are demonstrable"
- "No authentication errors in clean flow"
- "Password reset navigation works seamlessly"
- "Deep linking works on mobile and web"
artifacts:
- path: "lib/presentation/pages/home_page.dart"
provides: "Authenticated user destination"
min_lines: 25
- path: "test/integration_test/auth_flow_test.dart"
provides: "Authentication flow verification"
min_lines: 40
- path: "lib/main.dart"
provides: "Complete app initialization"
min_lines: 30
- path: "lib/app/router.dart"
provides: "Complete routing with password reset support"
min_lines: 50
key_links:
- from: "lib/presentation/pages/home_page.dart"
to: "lib/providers/auth_provider.dart"
via: "logout functionality"
pattern: "signOut|logout"
- from: "test/integration_test/auth_flow_test.dart"
to: "all auth pages"
via: "integration testing"
pattern: "testWidgets|integrationTest"
- 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"
---
<objective>
Complete authentication system with logout functionality and verify all success criteria.
Integrate password reset navigation and deep linking.
Purpose: Finalize Phase 1 by adding logout capability and confirming all authentication requirements are met.
Output: Fully functional authentication system ready for household features in Phase 2.
Purpose: Complete password reset flow with proper routing and URL handling.
Output: Full navigation system supporting password reset on mobile and web platforms.
</objective>
<execution_context>
@@ -58,107 +49,56 @@ Output: Fully functional authentication system ready for household features in P
<tasks>
<task type="auto">
<name>Create home page with logout functionality</name>
<files>lib/presentation/pages/home_page.dart</files>
<name>Integrate password reset with navigation</name>
<files>lib/app/router.dart</files>
<action>
Create HomePage that:
1. Shows user email and basic user info
2. Has logout button in app bar or menu
3. Uses AuthProvider signOut() method
4. Shows loading state during logout
5. Navigates to login page after successful logout
6. Handles logout errors gracefully
7. Includes confirmation dialog for logout
8. Has proper accessibility labels
9. Responsive design for different screen sizes
10. Placeholder content for future inventory features
11. Welcome message for authenticated user
12. Basic UI structure following Material Design
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
</action>
<verify>Home page displays user info, logout button works correctly, and navigation flow is smooth</verify>
<done>Complete authenticated user home page with logout functionality</done>
<verify>Navigation properly handles password reset flow and deep linking</verify>
<done>Complete navigation integration for password reset functionality</done>
</task>
<task type="auto">
<name>Finalize app integration and routing</name>
<files>lib/main.dart</files>
<name>Update pages with password reset links</name>
<files>lib/presentation/pages/home_page.dart, lib/main.dart</files>
<action>
Complete main.dart integration:
1. Ensure all providers are properly configured
2. Complete router configuration with all auth routes
3. Add proper error boundaries for auth failures
4. Configure app theme and localization if needed
5. Ensure proper initialization order:
- Environment loading
- Supabase initialization
- Provider setup
- Router configuration
6. Add debugging tools in debug mode
7. Configure logging for auth operations
8. Handle deep linking for password reset
9. Ensure proper disposal of resources
10. Add performance optimizations if needed
Update pages to include password reset navigation:
1. Add "Forgot Password?" link to login page
2. Add "Forgot Password?" link to signup page
3. Ensure deep linking works from password reset emails
4. Update main app configuration for deep linking
5. Test navigation flows between auth pages
6. Ensure proper URL scheme configuration
7. Add navigation guards for protected routes
8. Handle error states gracefully
</action>
<verify>App starts correctly, auth flow works end-to-end, and no initialization errors occur</verify>
<done>Complete app initialization with all authentication systems integrated</done>
</task>
<task type="auto">
<name>Create authentication flow integration tests</name>
<files>test/integration_test/auth_flow_test.dart</files>
<action>
Create comprehensive integration tests that:
1. Test signup flow with valid credentials
2. Test login flow with existing credentials
3. Test logout functionality
4. Test session persistence (simulate app restart)
5. Test password reset flow
6. Test error scenarios for each flow
7. Verify <3 second signup/login timing requirement
8. Test navigation redirects based on auth state
9. Verify all 5 success criteria programmatically
10. Include cleanup to avoid test pollution
11. Use pumpAndSettle for async operations
12. Mock network conditions if needed
</action>
<verify>Integration tests pass and verify all authentication requirements</verify>
<done>Comprehensive test suite covering all authentication flows and success criteria</done>
</task>
</tasks>
<task type="checkpoint:human-verify" gate="blocking">
<what-built>Complete authentication system with signup, login, logout, password reset, error handling, and session persistence</what-built>
<how-to-verify>
1. Run the app (`flutter run`) on device or emulator
2. Test signup flow: Create account with valid email/password - should complete in <3 seconds
3. Test login flow: Login with created credentials - should complete in <3 seconds
4. Test session persistence: Restart app - should stay logged in
5. Test password reset: Request reset email, receive email within 1 minute, update password
6. Test logout: Logout from home page - should return to login screen
7. Test error messages: Try invalid login - should see specific error (invalid password vs account not found)
8. Run integration tests: `flutter test integration_test/auth_flow_test.dart`
9. Verify all 5 success criteria from ROADMAP.md are met
</how-to-verify>
<resume-signal>Type "approved" to confirm all success criteria are met, or describe issues found</resume-signal>
<verify>Password reset links work correctly and deep linking functions on both platforms</verify>
<done>All auth pages include password reset navigation with working deep links</done>
</task>
</tasks>
<verification>
1. All 5 success criteria from Phase 1 are demonstrable and working
2. Authentication operations complete within 3 seconds as required
3. Session persists across app restarts
4. Password reset email arrives within 1 minute
5. Clear error messages distinguish invalid password vs account not found
6. Logout works from any authenticated screen
7. Integration tests pass for all authentication flows
8. No unhandled exceptions or crashes in auth flows
9. Navigation properly protects routes and redirects based on auth state
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
</verification>
<success_criteria>
Phase 1 Authentication & Account Basics is complete with all requirements implemented and verified. System is ready for Phase 2 household features.
Complete password reset navigation system with deep linking support across platforms.
</success_criteria>
<output>