Repository navigation
Description
The problem
The browser unlock form lets users show and hide the Secret Key, but the Master password field is permanently masked. Someone correcting a mistyped master password cannot inspect it before trying the key derivation again.
Offer an explicit Show/Hide control for the master password, consistent with the existing Secret Key control. This is a usability enhancement, not a reported authentication defect.
Acceptance criteria
- The master password starts masked. A keyboard-accessible
type="button"control switches between Show master password and Hide master password, with a clear accessible name. - Toggling changes only visibility: preserve the exact entered value, including spaces and Unicode, and do not submit the form, call key derivation/verification, or make API requests.
- Master password and Secret Key visibility are independent. Showing one must not reveal or hide the other.
- When Unlock is submitted, mask the master password again and disable its visibility control while derivation is pending. Keep it masked after failure, while retaining the entered value for correction and preserving the existing generic error and retry behaviour.
- Keep normal form submission working with Enter. Do not alter derivation, credential verification, value normalisation, or the existing Secret Key control's behaviour.
- Add component tests for initial masking, repeated toggles with exact value preservation, no submission on toggle, independent controls, and the pending/failure state using a deferred derivation promise. Check keyboard reachability and activation when verifying the UI.
- Run
npm test -- src/__tests__/VaultApp.test.tsxandnpm run typecheck, and record the results in the PR.
Evidence and starting points
Inspected clean main c1f75d331bf1e71488db021da2d4c42dfd7671e7:
UnlockFormin VaultApp.tsx renders Master password with a fixedtype="password". The adjacent Secret Key control provides the existing visibility and busy-state pattern.VaultApp.test.tsxalready covers Secret Key toggling and unlock failure/retry, with mocked derivation and API calls.
Ran the existing focused suite in the fresh checkout: 20 tests passed on macOS arm64, Node 24.15.0, Vitest 5.0.5 / happy-dom. The missing control was verified in source; no live account or native-browser keyboard journey was exercised for this issue.
Scope
Keep this to the master password field and its tests. #785 implemented visibility for the separate Secret Key field, while #828 / PR #837 concern a shared-link recipient's passphrase. Open and closed issues and open PRs were checked for overlap.
Follow CONTRIBUTING.md, including DCO sign-off with git commit -s.
Activity