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): ignore modified arrow and space chords in environments map - #49418
On the Environments map in Settings, a focused machine handled Arrow and Space keys even with Ctrl, Alt, or Meta held. Alt+ArrowLeft / Alt+ArrowRight moved focus to a neighboring machine instead of going Back/Forward, and Ctrl+Space selected the machine for a batch link (1 selected).
Change
FleetScene's onKeyDown now returns early when ctrlKey, metaKey, or altKey is set, matching the existing modifier guard in FleetCanvas's onKeyDown.
Scope
Small one-line fix for an obvious keyboard-shortcut bug, so no issue.
Ephemeral browser repro: before the fix, a temporary browser test in EnvironmentsMap.browser.test.tsx dispatching Alt+ArrowRight on the focused "This browser" node failed (event.defaultPrevented was true); after the fix it passed across modified and unmodified Arrow and Space keys.
vp test run apps/web/src/components/settings passed (66 test files, 207 tests passed).
Macroscope's review found this PR approvable — The environments map now leaves Ctrl, Meta, and Alt keyboard chords outside its arrow-navigation and Space-selection handling. The change is narrowly confined to UI interaction, with ordinary keyboard controls unchanged.
You can add or adjust custom eligibility rules. Learn more.
Modified key chords such as Alt+Arrow no longer get captured by the Environments map, so browser Back/Forward and similar shortcuts keep working. Unmodified key behavior is unchanged, and there is no identified merge risk.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the change: a fix in the web app that stops the Environments map from handling modified arrow and space key chords. The raw summary confirms FleetScene now ignores Ctrl, Meta, or Alt k…
Description check
The description follows the template's main sections. Problem explains the bug with reproduction keys and expected behavior. Change describes the early return on ctrlKey, metaKey, or altKey and links …
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 change: a fix in the web app that stops the Environments map from handling modified arrow and space key chords. The raw summary confirms FleetScene now ignores Ctrl, Meta, or Alt keydown events. The title is specific, follows conventional commit form, and summarizes the main change.
Full details: Description check
Explanation
The description follows the template's main sections. Problem explains the bug with reproduction keys and expected behavior. Change describes the early return on ctrlKey, metaKey, or altKey and links it to the FleetCanvas guard. Scope explains why no issue is linked and treats the fix as a small bug fix. Verification lists commands, commit links, a browser repro, test counts, before and after screenshots, and states that no tests were kept. The template's closing line asking for the model and harness is present in the form of the generator note.
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; 5 remain after this review.
Environment: web Chromium, 1280×800, dark theme, fresh isolated databases and two real local servers on each commit.
On each fresh app: seed one synthetic project, pair a second real local T3 server, and open Settings → Environments → Map (This browser plus two Scenario machines). Open and dismiss Add environment, press Tab three times, explicitly focus This browser, and dispatch plain ArrowRight to focus machine A. Dispatch keydown chords in order without resetting focus: Ctrl+Space, Alt+ArrowDown, Alt+ArrowLeft, Alt+ArrowRight, Ctrl+ArrowDown, Meta+ArrowUp, Alt+Space; capture after each. Then focus A and dispatch plain Space and ArrowLeft as controls.
Scenario: Modified map chords preserve focus, selection and browser defaults
Native browser accelerator execution was not tested; DOM keydown dispatch measures defaultPrevented and the real app’s focus/selection response.
Not shown:
Native browser/system shortcut execution (such as browser Back) was not exercised: synthetic DOM keydown events measure defaultPrevented and app focus/selection but do not trigger native accelerators.
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:XS0-9 changed lines (additions + deletions).vouch:unvouchedAuthor is not yet trusted in the VOUCHED list.
2 participants
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.
Problem
On the Environments map in Settings, a focused machine handled Arrow and Space keys even with Ctrl, Alt, or Meta held.
Alt+ArrowLeft/Alt+ArrowRightmoved focus to a neighboring machine instead of going Back/Forward, andCtrl+Spaceselected the machine for a batch link (1 selected).Change
FleetScene'sonKeyDownnow returns early whenctrlKey,metaKey, oraltKeyis set, matching the existing modifier guard inFleetCanvas'sonKeyDown.Scope
Small one-line fix for an obvious keyboard-shortcut bug, so no issue.
Verification
EnvironmentsMap.browser.test.tsxdispatchingAlt+ArrowRighton the focused "This browser" node failed (event.defaultPreventedwastrue); after the fix it passed across modified and unmodified Arrow and Space keys.vp test run apps/web/src/components/settingspassed (66test files,207tests passed).vp run check:changed 6124e54940765274c2e3d76f50b6980e3e8cc83dpassed (format,lint,knip,i18n,typecheck,test,react compiler).Before / After Browser Proof
Generated with Gemini 4 Neon in T3 Code Nightly