You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(web): Enter saves the default viewport size and skipped runs kept - #42480
In Settings → Browser → Advanced, typing a new "Default viewport width" or "Default viewport height" (say 1440) and pressing Enter does nothing. The same happens in Settings → Labs with "Skipped runs kept". The value saves only once the field loses focus, so a keyboard user who presses Enter and moves on never gets it saved.
These fields save through NumberField's onValueCommitted, and Base UI commits typed values on blur, not on Enter. Their NumberFieldInputs (apps/web/src/components/settings/IntegrationsSettings.tsx around lines 446 and 461, apps/web/src/components/settings/LabsSettingsPanel.tsx around line 276) have no Enter handling. #42392 fixed the same gap for the Background Activity interval field with an onKeyDown that blurs and refocuses the input on Enter, skipping Enter during IME composition.
This PR moves that handler into a small shared commitNumberFieldOnEnter in components/settings, keeps IntervalSecondsField on it unchanged, and adds it to the viewport width/height and skipped-runs inputs. The ui/number-field primitive is untouched.
Found while reading the settings panels after #42392 landed.
Tests: IntegrationsSettings.browser.test.tsx types 1440 into the viewport width, presses Enter, and checks that the stored default viewport becomes 1440×800 with focus still in the field. LabsSettingsPanel.browser.test.tsx extends the existing blur test with an Enter commit. Both fail on main (nothing is saved) and pass with the fix. The IME guard is already covered by the existing interval-field test in ProviderSettingsPanel.environment.browser.test.tsx, which still passes. vp run check:changed passes.
There's no image pair, because nothing looks different. Only Enter now saves.
No actionable comments were generated in the recent review.
Walkthrough
Numeric settings now use a shared handler to commit values when Enter is pressed, while retaining focus. Browser tests check the saved viewport dimensions and skipped-runs value.
A shared handler ignores non-Enter and composing events, then blurs and refocuses the input for Enter. The viewport, interval, and skipped-runs fields use the handler. Browser tests check saved values and retained focus.
Pressing Enter now saves the default viewport size and the skipped-runs count in settings, matching the existing interval field. The change is narrow and low risk, with test coverage for the new behavior.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the two user-visible changes: Enter now saves the default viewport size and the skipped runs kept setting. It matches the changeset, which adds a shared Enter-commit handler to the vie…
Description check
The description follows the template. It states the problem with expected behavior and reproduction steps (typing 1440 and pressing Enter in Settings → Browser → Advanced, and Settings → Labs). It exp…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the two user-visible changes: Enter now saves the default viewport size and the skipped runs kept setting. It matches the changeset, which adds a shared Enter-commit handler to the viewport width/height inputs and the skipped-runs input. The title uses the conventional fix(web) prefix. It omits the shared helper, which is acceptable because the title need not cover every detail.
Full details: Description check
Explanation
The description follows the template. It states the problem with expected behavior and reproduction steps (typing 1440 and pressing Enter in Settings → Browser → Advanced, and Settings → Labs). It explains the change (a shared commitNumberFieldOnEnter helper applied to the viewport and skipped-runs inputs, with the ui/number-field primitive untouched). It links the related fix #42392 as context. Verification lists focused browser tests, states that they fail on main and pass with the fix, and notes the IME guard coverage and the check command. It states that no screenshots are needed because nothing looks different. The Scope section is weak: it does not explicitly link a bug issue or say why none is needed. It also does not explicitly state that the change is a bug fix rather than a feature, although the description frames it as one. The model attribution line is present as the template requests.
Resolution
Optionally, add an explicit Scope statement: link the issue for this bug, or explain why no issue is needed. The current description already covers the other sections.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
This branch has not been deployed
No deployments
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
size:M30-99 changed lines (additions + deletions).vouch:unvouchedAuthor is not yet trusted in the VOUCHED list.
1 participant
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.
In Settings → Browser → Advanced, typing a new "Default viewport width" or "Default viewport height" (say 1440) and pressing Enter does nothing. The same happens in Settings → Labs with "Skipped runs kept". The value saves only once the field loses focus, so a keyboard user who presses Enter and moves on never gets it saved.
These fields save through
NumberField'sonValueCommitted, and Base UI commits typed values on blur, not on Enter. TheirNumberFieldInputs (apps/web/src/components/settings/IntegrationsSettings.tsxaround lines 446 and 461,apps/web/src/components/settings/LabsSettingsPanel.tsxaround line 276) have no Enter handling. #42392 fixed the same gap for the Background Activity interval field with anonKeyDownthat blurs and refocuses the input on Enter, skipping Enter during IME composition.This PR moves that handler into a small shared
commitNumberFieldOnEnterincomponents/settings, keepsIntervalSecondsFieldon it unchanged, and adds it to the viewport width/height and skipped-runs inputs. Theui/number-fieldprimitive is untouched.Found while reading the settings panels after #42392 landed.
Tests:
IntegrationsSettings.browser.test.tsxtypes 1440 into the viewport width, presses Enter, and checks that the stored default viewport becomes 1440×800 with focus still in the field.LabsSettingsPanel.browser.test.tsxextends the existing blur test with an Enter commit. Both fail on main (nothing is saved) and pass with the fix. The IME guard is already covered by the existing interval-field test inProviderSettingsPanel.environment.browser.test.tsx, which still passes.vp run check:changedpasses.There's no image pair, because nothing looks different. Only Enter now saves.
Claude Opus 5.5 via T3 Code