Files
Sage/.planning/phases/01-authentication/01-08-PLAN.md
Dani B ff56c75da0 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
2026-01-28 00:49:01 -05:00

143 lines
5.8 KiB
Markdown

---
phase: 01-authentication
plan: 08
type: execute
wave: 3
depends_on: ["01-03", "01-11"]
files_modified: ["lib/features/authentication/presentation/pages/login_page.dart", "lib/features/authentication/presentation/pages/signup_page.dart", "lib/features/authentication/presentation/pages/reset_password_page.dart"]
autonomous: true
user_setup: []
must_haves:
truths:
- "Login errors distinguish invalid password vs account not found"
- "Signup errors show specific failure reasons"
- "Password reset errors provide helpful guidance"
artifacts:
- path: "lib/features/authentication/presentation/pages/login_page.dart"
provides: "Login with error handling"
min_lines: 50
- path: "lib/features/authentication/presentation/pages/signup_page.dart"
provides: "Signup with error handling"
min_lines: 50
- path: "lib/features/authentication/presentation/pages/reset_password_page.dart"
provides: "Password reset with error handling"
min_lines: 45
key_links:
- from: "lib/features/authentication/presentation/pages/login_page.dart"
to: "lib/core/errors/auth_exceptions.dart"
via: "error type checking"
pattern: "InvalidCredentialsException|UserNotFoundException"
---
<objective>
Integrate comprehensive error handling in authentication pages.
Purpose: Provide clear, actionable error messages for all authentication scenarios.
Output: Authentication pages with proper error handling and user feedback.
</objective>
<execution_context>
@~/.opencode/get-shit-done/workflows/execute-plan.md
@~/.opencode/get-shit-done/templates/summary.md
</execution_context>
<context>
@.planning/PROJECT.md
@.planning/ROADMAP.md
@.planning/STATE.md
@.planning/phases/01-authentication/01-RESEARCH.md
</context>
<tasks>
<task type="auto">
<name>Enhance login page with error handling</name>
<files>lib/features/authentication/presentation/pages/login_page.dart</files>
<action>
Update LoginPage to:
1. Connect to AuthProvider for authentication
2. Handle loading states during login attempts
3. Display specific error messages based on exception type:
- "Invalid password" for InvalidCredentialsException
- "Account not found" for UserNotFoundException
- "Network error" for NetworkException
- "Session expired" for SessionExpiredException
- Generic error message for unknown errors
4. Show success message and navigate on successful login
5. Disable form inputs during submission
6. Include accessibility error announcements
7. Add proper error disposal when user starts typing again
8. Handle edge cases like empty form submission
9. Include proper error styling and positioning
</action>
<verify>Login page shows specific error messages for different failure scenarios and handles loading states properly</verify>
<done>Login page with comprehensive error handling and user feedback</done>
</task>
<task type="auto">
<name>Enhance signup page with error handling</name>
<files>lib/features/authentication/presentation/pages/signup_page.dart</files>
<action>
Update SignupPage to:
1. Connect to AuthProvider for registration
2. Handle loading states during signup attempts
3. Display specific error messages:
- "Email already in use" for EmailAlreadyInUseException
- "Password too weak" for WeakPasswordException
- "Invalid email format" for validation errors
- "Network error" for NetworkException
- Generic error message for unknown errors
4. Show password mismatch error before submission
5. Show success message on successful registration
6. Navigate to login after successful signup
7. Disable form inputs during submission
8. Include accessibility error announcements
9. Add proper error disposal when user starts typing again
10. Handle terms acceptance (placeholder)
</action>
<verify>Signup page provides specific feedback for all registration scenarios and validates password matching</verify>
<done>Signup page with comprehensive error handling and validation feedback</done>
</task>
<task type="auto">
<name>Enhance password reset pages with error handling</name>
<files>lib/features/authentication/presentation/pages/reset_password_page.dart</files>
<action>
Update ResetPasswordPage to:
1. Handle loading states during email sending
2. Display specific error messages:
- "Email not found" for UserNotFoundException
- "Too many requests" for rate limiting
- "Network error" for NetworkException
- Generic error message for unknown errors
3. Show success message with clear instructions
4. Display countdown before resend is allowed (if needed)
5. Include accessibility error announcements
6. Add proper error disposal when user changes email
7. Handle edge cases like empty email submission
8. Provide helpful error recovery instructions
9. Show proper loading indicators
</action>
<verify>Password reset page handles all error scenarios and provides clear user guidance</verify>
<done>Password reset page with comprehensive error handling and user guidance</done>
</task>
</tasks>
<verification>
1. Login attempts show specific error messages for invalid password vs account not found
2. Registration attempts show specific error messages for email conflicts, weak passwords, etc.
3. Password reset requests handle all error scenarios with helpful guidance
4. Error messages disappear when user takes corrective action
5. Loading states appear consistently during all authentication operations
6. Accessibility features announce errors and state changes properly
</verification>
<success_criteria>
Authentication pages with comprehensive error handling that meets user feedback requirements.
</success_criteria>
<output>
After completion, create `.planning/phases/01-authentication/01-08-SUMMARY.md`
</output>