Repository navigation
Conversation
|
@btea is attempting to deploy a commit to the NuxtLabs Team on Vercel. A member of the Team first needs to authorize it. |
|
👁️🗨️ Review this pull request with grouped, summarized diffs at: raw result💭 analyzed by {
"headSha": "24393212e889a9a083cc0bc2b2668f35c949573b",
"result": {
"overallSummary": "Fixes a bug where `OtpInput.focus()` read the digits model synchronously, causing it to focus the wrong box when a caller cleared the code right before calling `focus()` (e.g. after a rejected OTP attempt). The lookup is deferred to the next tick, and an e2e test is added to cover this scenario.",
"groups": [
{
"key": "otp-focus-fix",
"label": "OtpInput focus fix",
"summary": "Defer the target-box lookup in `focus()` to the next tick so it reads the model after callers clear it (e.g. after a failed OTP attempt), fixing focus landing on the wrong box.",
"category": "ui",
"filePaths": [
"packages/hub-ui/src/client/components/display/OtpInput.vue"
],
"critical": true
},
{
"key": "e2e-test",
"label": "E2E regression test",
"summary": "Adds an end-to-end test verifying a rejected OTP code clears all digit boxes and refocuses the first one, covering the focus fix.",
"category": "tests",
"filePaths": [
"tests/e2e/floating-dock.spec.ts"
]
}
],
"schemaVersion": 1,
"source": "llm",
"generatedAt": "2026-12-01T02:48:53.269Z",
"model": "vercel-ai-gateway/anthropic/claude-sonnet-5",
"locale": "en"
}
} |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The OTP focus timing fix has no active review issues.
No open issues 🎉
What changed in this PR
Fixes OTP input focus in the hub UI when a caller changes the model immediately before calling focus(), such as after a rejected code.
Changes:
- Defers target-box selection until the next Vue tick so it uses the updated model.
- Adds an end-to-end regression test confirming that a rejected code clears all six boxes and refocuses the first digit.
| File | Description |
|---|---|
tests/e2e/floating-dock.spec.ts |
Tests clearing and refocusing the OTP input after rejection. |
packages/hub-ui/src/client/components/display/OtpInput.vue |
Waits for the model update before selecting the box to focus. |
Review effort: Balanced
SaKaNa-Y
approved these changes
Dec 1, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Defer the target-box lookup in
focus()to the next tick. Callers can change the model right before callingfocus()(for example, clearing the code after a failed attempt), and the new prop value only arrives on re-render — readingdigitssynchronously focused the wrong box.