Keep the passcode out of the login form's markup (iOS AutoFill) - #163
Conversation
On iOS, AutoFill filled the saved Hive key into the passcode field instead of the private key field. The passcode already belonged to a detached form of its own, which desktop managers honour, but it still sat inside the login <form> element, and iOS groups fields by the element they sit in. - The login form now wraps only the username and the key (display: contents, so the page looks the same). The passcode, the checkbox and the button sit outside it; the button joins the form through its form attribute. - Enter in the passcode clicks that button, so a disabled button still refuses the submit. Enter in the key still submits the form. - Unit and contract tests check that the passcode is not inside the login form, and that Enter in the key submits through the outside button. Closes #162
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
PR Summary by QodoIsolate passcode markup from login form for iOS AutoFill
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can reply 'qodo' on any finding to push back, ask questions, or dig deeper |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe import page now keeps the passcode outside the login form while associating the external submit button with that form. Tests check the field grouping and verify that pressing Enter in the passcode field submits only the username and password fields. ChangesImport form
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to Account import retains the entered passcode and its submission behavior after the form change. The change is mergeable after normal checks; iPhone AutoFill behavior still needs device confirmation. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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. A rabbit checks the fields in line Comment |
Closes #162
On iOS, AutoFill filled the saved Hive key into Passcode instead of Private key on Add account. Desktop managers got it right.
Why: since #136 the passcode belongs to a detached form of its own (
form=attribute), and desktop managers go by which form owns a field. But the passcode input still sat inside the login<form>element. iOS AutoFill seems to group fields by the<form>element they sit in, so it saw a username and two password fields.Change (
src/routes/import.tsx):<form>now wraps only the username and the private key. It usesdisplay: contents, so the page looks exactly the same.formattribute.Tests:
login.contains(pass) === false). With the old markup the unit test fails.Needs a device check: Safari's AutoFill rules are not public, and no desktop browser runs iOS AutoFill, so this can only be confirmed on a phone. After staging deploys: on an iPhone, open Add account on staging.hivesigner.com, tap Username, pick the saved login from the QuickType bar. The key should land in Private key and Passcode should stay empty.
Summary by CodeRabbit