fix(eid-wallet): mask security-answer input with reveal toggle#1042
fix(eid-wallet): mask security-answer input with reveal toggle#1042Bekiboo wants to merge 2 commits into
Conversation
|
Warning Review limit reached
More reviews will be available in 18 minutes and 51 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughTwo components — ChangesSecurity Answer Input Masking
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
infrastructure/eid-wallet/src/routes/(public)/recover/+page.svelte (1)
558-564:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winReset
showAnswerwhen entering the answer step for UX consistency.When navigating to the unverified-answer step,
answerInput,answerError, andlockedUntilLabelare reset, butshowAnsweris not. This means if a user reveals the answer, navigates back, and returns, the input will remain in revealed state. For consistency withAddKnowledgeSheet.svelte(which resetsshowAnswerwhen the sheet opens at line 36), the answer should start masked when entering this step.🔒 Suggested fix
securityQuestion = question; recoveryEnvelopeId = latest.node.id; recoveredVaultUri = uri; answerInput = ""; answerError = null; lockedUntilLabel = null; +showAnswer = false; step = "unverified-answer";🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@infrastructure/eid-wallet/src/routes/`(public)/recover/+page.svelte around lines 558 - 564, The `showAnswer` variable is not being reset when entering the unverified-answer step, while other related variables like `answerInput`, `answerError`, and `lockedUntilLabel` are being reset in this block. Add `showAnswer = false;` (or the appropriate initial value) to the same reset block where `step = "unverified-answer"` is set, to ensure the answer input returns to a masked state when entering this step for UX consistency with AddKnowledgeSheet.svelte.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@infrastructure/eid-wallet/src/routes/`(public)/recover/+page.svelte:
- Around line 558-564: The `showAnswer` variable is not being reset when
entering the unverified-answer step, while other related variables like
`answerInput`, `answerError`, and `lockedUntilLabel` are being reset in this
block. Add `showAnswer = false;` (or the appropriate initial value) to the same
reset block where `step = "unverified-answer"` is set, to ensure the answer
input returns to a masked state when entering this step for UX consistency with
AddKnowledgeSheet.svelte.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 2f4d6b6f-e449-4eae-ba09-776ccad077f5
📒 Files selected for processing (2)
infrastructure/eid-wallet/src/routes/(app)/personal/components/AddKnowledgeSheet.svelteinfrastructure/eid-wallet/src/routes/(public)/recover/+page.svelte
Description of change
Mask the security-answer input in the eID wallet: hidden by default with an eye toggle to reveal. Applied to both screens where the answer is typed — the Restore flow and the Knowledge set/edit sheet — so they're consistent and the answer isn't shown in plain text. (The issue assumed the set screen already masked it; it didn't, so both are fixed.)
Issue Number
Closes #1012
Type of change
How the change has been tested
Masked by default on both screens; eye toggle reveals/hides; reveal resets when the Knowledge sheet reopens.
biome+svelte-checkclean (no new issues).Change checklist
Summary by CodeRabbit
New Features