fix(01): revise plans based on checker feedback
- Split Plan 05 (5 tasks → 2 tasks): password reset request interface - Split Plan 06 (5 tasks → 2 tasks): created Plans 06-09 for focused scope - Fixed Plan 06 wave assignment: Wave 4 → Wave 3 (depends only on Wave 2) - Created Plan 07: password reset navigation and deep linking - Created Plan 08: authentication pages error handling - Created Plan 09: auth components error display and loading feedback - Updated Plan 07 → Plan 10: logout and verification - Updated ROADMAP.md with 10 plans in 4 waves - All plans now have 2-3 tasks as recommended
This commit is contained in:
@@ -4,7 +4,7 @@ plan: 05
|
||||
type: execute
|
||||
wave: 3
|
||||
depends_on: ["01-03", "01-04"]
|
||||
files_modified: ["lib/features/authentication/presentation/pages/reset_password_page.dart", "lib/features/authentication/presentation/pages/update_password_page.dart", "lib/features/authentication/presentation/widgets/password_reset_form.dart"]
|
||||
files_modified: ["lib/features/authentication/presentation/pages/reset_password_page.dart", "lib/features/authentication/presentation/widgets/password_reset_form.dart"]
|
||||
autonomous: true
|
||||
user_setup:
|
||||
- service: supabase
|
||||
@@ -20,15 +20,10 @@ must_haves:
|
||||
truths:
|
||||
- "User can request password reset via email"
|
||||
- "User receives reset email within 1 minute"
|
||||
- "Reset link redirects to password update page"
|
||||
- "User can set new password successfully"
|
||||
artifacts:
|
||||
- path: "lib/features/authentication/presentation/pages/reset_password_page.dart"
|
||||
provides: "Password reset request page"
|
||||
min_lines: 35
|
||||
- path: "lib/features/authentication/presentation/pages/update_password_page.dart"
|
||||
provides: "New password entry page"
|
||||
min_lines: 40
|
||||
- path: "lib/features/authentication/presentation/widgets/password_reset_form.dart"
|
||||
provides: "Password reset form components"
|
||||
min_lines: 25
|
||||
@@ -37,17 +32,13 @@ must_haves:
|
||||
to: "lib/providers/auth_provider.dart"
|
||||
via: "password reset method"
|
||||
pattern: "resetPassword|_authProvider"
|
||||
- from: "lib/features/authentication/presentation/pages/update_password_page.dart"
|
||||
to: "supabase.auth"
|
||||
via: "password update flow"
|
||||
pattern: "supabase\\.auth\\.updateUser|supabase\\.auth\\.resetPasswordForEmail"
|
||||
---
|
||||
|
||||
<objective>
|
||||
Implement password reset functionality with email flow and new password entry.
|
||||
Implement password reset request interface and form components.
|
||||
|
||||
Purpose: Enable users to recover forgotten passwords securely through email-based reset flow.
|
||||
Output: Complete password reset system from email request to new password confirmation.
|
||||
Purpose: Enable users to initiate password recovery through email-based reset flow.
|
||||
Output: Password reset request page with form validation and email submission.
|
||||
</objective>
|
||||
|
||||
<execution_context>
|
||||
@@ -106,84 +97,18 @@ Output: Complete password reset system from email request to new password confir
|
||||
<done>Reusable password reset form component</done>
|
||||
</task>
|
||||
|
||||
<task type="auto">
|
||||
<name>Create password update page</name>
|
||||
<files>lib/features/authentication/presentation/pages/update_password_page.dart</files>
|
||||
<action>
|
||||
Create UpdatePasswordPage that:
|
||||
1. Handles deep linking from password reset emails
|
||||
2. Has new password input field with strength validation
|
||||
3. Has confirm password field for validation
|
||||
4. Uses AuthButton for "Update Password" action
|
||||
5. Shows error messages for password mismatches
|
||||
6. Shows loading state during password update
|
||||
7. Navigates to login after successful password update
|
||||
8. Handles expired/invalid reset tokens gracefully
|
||||
9. Uses Supabase updateUser() method
|
||||
10. Has proper error handling for various failure modes
|
||||
11. Includes accessibility features
|
||||
12. Has clear success messaging
|
||||
13. Includes "Cancel" option to return to login
|
||||
</action>
|
||||
<verify>Password update page validates inputs, updates password successfully, and handles error cases</verify>
|
||||
<done>Complete password update interface with deep link handling</done>
|
||||
</task>
|
||||
|
||||
<task type="auto">
|
||||
<name>Update auth repository for password reset</name>
|
||||
<files>lib/features/authentication/data/repositories/auth_repository_impl.dart</files>
|
||||
<action>
|
||||
Extend AuthRepositoryImpl to:
|
||||
1. Add updatePassword() method for new password setting
|
||||
2. Handle password reset token verification
|
||||
3. Improve resetPassword() method with proper redirect URL configuration
|
||||
4. Add proper error handling for:
|
||||
- Expired reset tokens
|
||||
- Invalid reset tokens
|
||||
- Weak passwords
|
||||
- Network failures
|
||||
5. Use supabase.auth.updateUser() for password updates
|
||||
6. Ensure proper session handling after password update
|
||||
7. Add comprehensive error mapping to custom exceptions
|
||||
8. Include proper logging for debugging
|
||||
</action>
|
||||
<verify>Repository methods handle password reset flow from email to completion</verify>
|
||||
<done>Enhanced auth repository with complete password reset functionality</done>
|
||||
</task>
|
||||
|
||||
<task type="auto">
|
||||
<name>Integrate password reset with navigation</name>
|
||||
<files>lib/app/router.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
|
||||
</action>
|
||||
<verify>Navigation properly handles password reset flow and deep linking</verify>
|
||||
<done>Complete navigation integration for password reset functionality</done>
|
||||
</task>
|
||||
|
||||
</tasks>
|
||||
|
||||
<verification>
|
||||
1. Password reset email sends successfully and arrives within 1 minute
|
||||
2. Reset email contains working deep link to password update page
|
||||
3. Password update page validates inputs and updates password successfully
|
||||
4. Error handling covers all failure scenarios (invalid email, expired tokens, etc.)
|
||||
5. Navigation flows correctly through entire password reset journey
|
||||
6. Deep linking works on both mobile and web platforms
|
||||
2. Reset password page validates email input properly
|
||||
3. Error handling covers all failure scenarios (invalid email, network issues, etc.)
|
||||
4. Loading states show during email submission
|
||||
5. Success message provides clear guidance to users
|
||||
</verification>
|
||||
|
||||
<success_criteria>
|
||||
Complete password reset system working from email request to new password confirmation with proper error handling and user feedback.
|
||||
Password reset request interface working with proper validation, email submission, and user feedback.
|
||||
</success_criteria>
|
||||
|
||||
<output>
|
||||
|
||||
Reference in New Issue
Block a user