fix: onboarding API-key input loses focus when probe completes (#1503)#1519
Merged
1 commit merged intonesquena:masterfrom May 3, 2026
Merged
Conversation
…ena#1503) The onboarding wizard's API-key input calls _scheduleOnboardingProbe() on every keystroke (oninput). When the 400ms-debounced probe completes, _setOnboardingProbeState() calls _renderOnboardingBody() which rebuilds the entire form — destroying and recreating the <input> element. The user's focus and cursor position are lost. On fast connections (localhost) the probe completes between keystrokes so the bug window is narrow. On slow networks (VPN, corporate proxy, cold-start vLLM) the re-render routinely lands mid-typing. Fix: remove _scheduleOnboardingProbe() from the api-key input's oninput handler. The probe still fires on: - baseUrl input change (oninput + debounce, unchanged) - api-key field blur (onblur, added) - 'Test connection' button click (unchanged) - nextOnboardingStep() before Continue (unchanged) The baseUrl input retains the oninput probe because the UX trade-off is acceptable there (text input preserves visible content on re-render).
Collaborator
|
Confirmed the shape locally — …and The fix matches Option A from the issue and is the right one:
Two things I'll spot-check on review:
Pulling locally to verify on a probe-delayed onboarding flow. Thanks @franksong2702. |
f8ed6da
sunnysktsang
pushed a commit
to sunnysktsang/hermes-webui
that referenced
this pull request
May 3, 2026
…ops losing focus during probe — closes nesquena#1503
sunnysktsang
pushed a commit
to sunnysktsang/hermes-webui
that referenced
this pull request
May 3, 2026
…sorbed CHANGELOG, ROADMAP, TESTING bumped (3936 \u2192 3946). 8 constituent PRs: - nesquena#1523 (@franksong2702) branch indicator codepoint fix - nesquena#1519 (@franksong2702) onboarding API-key focus loss fix - nesquena#1518 (@franksong2702) voice-mode toggle-off recognizer stop - nesquena#1516 (@franksong2702) YAML newline CSS rules - nesquena#1517 (@franksong2702) __CACHE_VERSION__ \u2192 __WEBUI_VERSION__ rename - nesquena#1532 (@ai-ag2026) state.db WebUI session recovery - nesquena#1525 (@ai-ag2026) stale stream state proactive cleanup - nesquena#1526 (@ai-ag2026) max_tokens forwarding + OpenRouter quota classifier Opus MUST-FIX absorbed: sw.js conflict-marker cleanup + regression guard. Opus SHOULD-FIX deferred to follow-up nesquena#1533 (race in _clear_stale_stream_state). 2 closed as duplicates: nesquena#1528 (identical to nesquena#1517), nesquena#1529 (superseded by nesquena#1516). 1 maintainer-review label: nesquena#1531 (Asunfly stowaway change in force-push). 5 stay on hold: nesquena#1418 nesquena#1464 nesquena#1404 nesquena#1353 nesquena#1311.
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.
Thinking Path
oninput="_scheduleOnboardingProbe()"which fires a 400ms-debounced probe on every keystroke_setOnboardingProbeState()calls_renderOnboardingBody()which rebuilds the entire form DOM<input>element the user is typing into — focus and cursor position are lost_scheduleOnboardingProbe()from the api-key input'soninputhandler (Option A from the issue). Addonblur="_runOnboardingProbe()"so the probe fires when the user tabs awayWhat Changed
static/onboarding.js— line 200, one line change:oninput="ONBOARDING.form.apiKey=this.value;_scheduleOnboardingProbe()"oninput="ONBOARDING.form.apiKey=this.value" onblur="_runOnboardingProbe()"Why It Matters
type="password"input where users paste or type long secretsonblurwhen user tabs away, (b) "Test connection" button click, (c)nextOnboardingStep()before ContinuenextOnboardingStepgates on probe success so the flow is still correctVerification
_scheduleOnboardingProbe()is only removed from the api-key input — the baseUrl input (line 185) still has it, which is acceptable UX_runOnboardingProbe()ononblurensures the probe fires before the user reaches the Continue buttonnextOnboardingStep()(line 525) runs_runOnboardingProbe()synchronously before allowing Continue — no flow breakageRisks / Follow-ups
nextOnboardingStephandles it.Model Used