Repository navigation
fix: prefill passkey name from device info (#1948) - #1968
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughA new Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. 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 |
Desk Review — #1948 / PR #1968 "Prefill Passkey name from device info"Verdict: READY TO MERGE. Reviewed the full implementation on branch CIAll required checks green ( TestsRan the project's own suite for the new code: Findings (all verified, none blocking)
READY TO MERGE. |
Summary
Resolves #1948 — the "Passkey name" field now pre-fills with a best-effort, editable device label (e.g. "Chrome on macOS", "Safari on iPhone") derived from the browser User-Agent, instead of starting empty.
Changes
lib/utils/device-label.ts— purederiveDeviceLabel(userAgent)helper mapping a User-Agent to a coarseBrowser on OSlabel, with sensible fallbacks (browser-only, OS-only, or empty for unrecognized agents).PasskeyRegisterDialog: on open, prefill the name field with the derived label without clobbering anything the user typed. The field stays editable and falls back to the existing placeholder when the label is empty.Acceptance criteria
Verification
vitest --project server lib/utils/device-label.test.ts— 10 passedtsc --noEmit— cleanoxlint --type-awareon changed files — 0 warnings/errorsSummary by CodeRabbit