Skip to content

design: wireframes and prototypes for forgot/reset password pages (spec #004)#26

Merged
singyichen merged 4 commits into
mainfrom
design/004-forgot-reset-password
Apr 9, 2026
Merged

design: wireframes and prototypes for forgot/reset password pages (spec #004)#26
singyichen merged 4 commits into
mainfrom
design/004-forgot-reset-password

Conversation

@singyichen
Copy link
Copy Markdown
Owner

@singyichen singyichen commented Apr 8, 2026

Summary

  • Add Pencil wireframes for /forgot-password and /reset-password pages (6-frame layout: Desktop ZH/EN, Mobile ZH/EN, Component ZH/EN)
  • Add interactive HTML prototypes for both pages with full i18n (ZH/EN), validation, and loading states
  • Covers spec 004-forgot-reset-password — FR-001 through FR-009

Pages

/forgot-password

  • Email input + "Send Reset Link" button
  • Generic success panel after submit (does not reveal whether email exists — SC-002)
  • "← Back to Login" link

/reset-password

  • New Password + Confirm New Password fields with eye-toggle
  • Password mismatch validation (front-end)
  • Prototype state toggle bar: Valid token / Expired / Used (3 error states per spec)
  • Success panel → redirects to /login

Test Plan

  • Open forgot-password.html in browser — verify ZH/EN toggle, empty email validation, success panel after submit
  • Open reset-password.html — verify all 3 prototype states via toggle bar
  • Verify password mismatch error shows on confirm field
  • Verify loading spinner appears during async simulation
  • Verify responsive layout at 375px mobile width
  • Check wireframes in Pencil (6 frames per file, Desktop + Mobile + Component)

🤖 Generated with Claude Code

Covers spec #4 — two pages: /forgot-password (email submission with
generic success message) and /reset-password (new+confirm password form
with valid/expired/used token states and password mismatch validation).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

Add wireframes and interactive prototypes for forgot/reset password pages with i18n and token states

✨ Enhancement 📝 Documentation

Grey Divider

Walkthroughs

Description
• Add interactive HTML prototypes for /forgot-password and /reset-password pages with full
  internationalization (ZH/EN)
• Implement password reset form with new password and confirm password fields, eye-toggle visibility
  controls, and front-end validation
• Include 3 prototype states for reset password: valid token (form shown), expired token, and used
  token (error panel shown)
• Add generic success panels that do not reveal whether email exists (security by design per SC-002)
• Implement loading spinners during async simulation and comprehensive accessibility features (ARIA
  labels, roles)
• Create Pencil wireframes with 6 frames each: Desktop ZH/EN, Mobile ZH/EN, and Component ZH/EN
  layouts
• Document responsive design across breakpoints (Desktop 1440×900, Mobile 390×812) with design
  tokens and Lucide icons
• Cover specification 004-forgot-reset-password requirements FR-001 through FR-009
Diagram
flowchart LR
  A["Forgot Password Page"] -->|Email Input| B["Generic Success Panel"]
  B -->|Security by Design| C["No Email Existence Leak"]
  D["Reset Password Page"] -->|Valid Token| E["Password Form"]
  D -->|Expired/Used Token| F["Error Panel"]
  E -->|Validation| G["Success & Redirect to Login"]
  H["Wireframes"] -->|Desktop/Mobile/Component| I["Design System"]
  J["Prototypes"] -->|i18n ZH/EN| K["Interactive States"]
Loading

Grey Divider

File Changes

1. design/prototype/pages/account/reset-password.html ✨ Enhancement +777/-0

Interactive reset password prototype with i18n and token states

• Interactive HTML prototype for /reset-password page with full i18n support (ZH/EN)
• Implements password reset form with new password and confirm password fields, eye-toggle
 visibility controls, and front-end validation
• Includes 3 prototype states via toggle bar: valid token (form shown), expired token, and used
 token (error panel shown)
• Success panel displayed after successful password reset with redirect link to /login
• Loading spinner during async simulation and comprehensive accessibility features (ARIA labels,
 roles)

design/prototype/pages/account/reset-password.html


2. design/prototype/pages/account/forgot-password.html ✨ Enhancement +514/-0

Interactive forgot password prototype with generic success message

• Interactive HTML prototype for /forgot-password page with full i18n support (ZH/EN)
• Email input field with front-end validation (required field check)
• Generic success panel after form submission that does not reveal whether email exists (security by
 design per SC-002)
• Loading spinner during async simulation and responsive design with accessibility features

design/prototype/pages/account/forgot-password.html


3. design/wireframes/pages/account/forgot-password.pen Design +1666/-0

Wireframes for forgot password page across all breakpoints

• Pencil wireframe file with 6 frames: Desktop ZH/EN, Mobile ZH/EN, and Component ZH/EN layouts
• Desktop frames (1440×900) show full card layout with navbar, email input, and CTA button
• Mobile frames (390×812) demonstrate responsive design with adjusted spacing and typography
• Component frames document success state behavior, interaction states, and frontend validation
 rules
• Includes design tokens (colors, spacing, radius) and Lucide icons for consistency

design/wireframes/pages/account/forgot-password.pen


View more (1)
4. design/wireframes/pages/account/reset-password.pen Design +1982/-0

Reset password page wireframes with i18n and token states

• Added comprehensive Pencil wireframe file for reset password page with 6 frames covering Desktop
 ZH/EN, Mobile ZH/EN, and Component documentation ZH/EN
• Designed reset password card layout with new password and confirm password input fields,
 eye-toggle visibility icons, and update button
• Included navbar with language toggle (ZH | EN) and logo branding across all frames
• Documented component specifications for invalid/expired token states and interaction states
 (password mismatch, loading, success redirect)
• Applied consistent design system variables for colors, spacing, and border radius throughout all
 frames

design/wireframes/pages/account/reset-password.pen


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review Bot commented Apr 8, 2026

Code Review by Qodo

🐞 Bugs (2)   📘 Rule violations (0)   📎 Requirement gaps (0)   🎨 UX Issues (0)
🐞\ ≡ Correctness (2)

Grey Divider


Remediation recommended

1. Missing login redirect 🐞
Description
In reset-password.html, the submit handler only hides the form and shows the success panel, but
never redirects to login, so the prototype does not perform the documented post-success navigation.
Code

design/prototype/pages/account/reset-password.html[R758-769]

+      // Loading state
+      const btn = document.getElementById('submitBtn');
+      btn.disabled  = true;
+      btn.innerHTML = '<span class="spinner" aria-label="載入中"></span>';
+
+      // Simulate API call (prototype always succeeds)
+      await new Promise(r => setTimeout(r, 1200));
+
+      // Show success panel
+      document.getElementById('formSection').style.display = 'none';
+      document.getElementById('successPanel').classList.add('visible');
+      applyLang(lang);
Evidence
The reset submit handler ends after showing the success panel and calling applyLang(lang), with no
navigation call. The reset-password wireframe explicitly states that on success it should redirect
to /login.

design/prototype/pages/account/reset-password.html[758-770]
design/wireframes/pages/account/reset-password.pen[1754-1754]
design/wireframes/pages/account/reset-password.pen[1912-1912]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`design/prototype/pages/account/reset-password.html` shows the success panel after a simulated successful password reset, but it never redirects to the login page.

### Issue Context
The wireframe text indicates that after update success the prototype should redirect to `/login`.

### Fix Focus Areas
- design/prototype/pages/account/reset-password.html[758-770]
- design/wireframes/pages/account/reset-password.pen[1754-1754]

### Suggested change
After showing the success panel, add a timed redirect (e.g., `setTimeout(() => window.location.href = './login.html', 1200)`), or redirect immediately after a short delay while keeping the success message visible.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Reset i18n incomplete 🐞
Description
In reset-password.html, switching to English leaves the prototype state toggle bar text/ARIA label
in Chinese and does not refresh the eye-toggle ARIA labels on language change, resulting in
mixed-language UI/accessibility labels in EN mode.
Code

design/prototype/pages/account/reset-password.html[R564-570]

+  <!-- ── Prototype State Toggle Bar ─────────────────────────────── -->
+  <div class="proto-toggle-bar" role="group" aria-label="原型狀態切換">
+    <span>原型狀態:</span>
+    <button class="proto-btn active" id="btnValid" onclick="showState('valid')" type="button">有效 token</button>
+    <button class="proto-btn inactive" id="btnExpired" onclick="showState('expired')" type="button">已過期</button>
+    <button class="proto-btn inactive" id="btnUsed" onclick="showState('used')" type="button">已使用</button>
+  </div>
Evidence
The prototype toggle bar is hardcoded Chinese (label + button text) and is not updated by
applyLang(). Also, the eye toggle buttons start with Chinese aria-labels in markup, and applyLang()
does not update them when language changes (they only change on subsequent eye-toggle clicks).

design/prototype/pages/account/reset-password.html[564-570]
design/prototype/pages/account/reset-password.html[489-490]
design/prototype/pages/account/reset-password.html[522-523]
design/prototype/pages/account/reset-password.html[630-651]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`reset-password.html` does not fully apply i18n when toggling languages:
- The prototype state toggle bar remains Chinese in English mode.
- Eye-toggle `aria-label` values are not refreshed on language switch (they start in Chinese and only update after clicking the eye toggle).

### Issue Context
The page already has an `i18n` dictionary and an `applyLang()` function that updates many labels; these elements should be included in that update.

### Fix Focus Areas
- design/prototype/pages/account/reset-password.html[564-570]
- design/prototype/pages/account/reset-password.html[489-490]
- design/prototype/pages/account/reset-password.html[522-523]
- design/prototype/pages/account/reset-password.html[630-651]

### Suggested change
- Add i18n strings for the prototype toggle bar label and button text (valid/expired/used).
- In `applyLang()`, update:
 - the `.proto-toggle-bar` `aria-label`
 - the `<span>` label text and the three state button text
- In `applyLang()`, update `eyeToggleNew` / `eyeToggleConfirm` `aria-label` based on the current input type (`password` => `eyeShow`, `text` => `eyeHide`) so language switching immediately updates accessibility labels.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

singyichen and others added 3 commits April 9, 2026 09:18
…scription

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…totypes

- forgot-password.spec.ts: 16 tests covering UI elements, language toggle,
  form validation, submit success flow, navigation, and responsive rendering
- reset-password.spec.ts: 24 tests covering valid/error token states,
  prototype state switcher, form validation, submit success flow, language
  toggle, and responsive rendering
- NAVIGATION.md: add global Mermaid flowchart and mark 004a/004b as complete

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@singyichen singyichen merged commit 93c32b3 into main Apr 9, 2026
8 checks passed
@singyichen singyichen deleted the design/004-forgot-reset-password branch April 9, 2026 02:57
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.

1 participant