Repository navigation
fix(instances): name an SSM crew by its instance id in pane switchers - #35156
Conversation
The crew list the dashboard sends a remote crew's pane named each crew's machine by ssh_host, which an SSM crew does not have, so the pane's switcher read "ec2-ssm () — connected". Send ssm_target for an SSM crew, as the window's own switcher shows, and leave the parentheses out when a host sends no machine. Closes #34698
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. The fix fills the empty machine value where the relay builds it, and the empty-parentheses guard covers dashboards from before this change, which still send Notes
What this change shipsInventory (3 items) — 3 justifiedIntent: let someone inside a remote SSM crew's pane see which machine each crew row is. FIX.
[FIRST-PRINCIPLES-REVIEWED] eee45b5 Description read[DESCRIPTION-READ] 3684ba5873e9d86aad0e9d4fa24bd436f7ab9c270c1faee7823c1045c4687154 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the relay now picks the crew's machine by transport, the same way the window's own switcher does, and the empty-host guard covers dashboards that still send [DESIGN-REVIEWED] eee45b5 Description read[DESCRIPTION-READ] 488db014ce794448c5fb2599cdfa5ce00c299eb664b2174164879a18ed964bf4 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks: the change fills a subtitle that used to be blank, and the before/after screenshots show it in both themes. The blind reader read [UX-REVIEWED] eee45b5 Description read[DESCRIPTION-READ] 23b8f236187769efbcd98b052a0ef878900f3d48f423b670636dcdd7f7044e55 That sha256 names everything this verdict read: the PR description, plus the 7 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
Code change approver recommendation: ApproveWhy: the decider estimates a 6% chance that this change introduces a defect, within the 12% limit for approving on its own, and every check passes. This is a small, correct fix. When the dashboard sends a remote crew's pane its list of crews, each crew's machine was taken from An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
buluoray
left a comment
There was a problem hiding this comment.
Approve on eee45b5. The relayed switcher model now names an SSM crew by ssm_target instead of an empty ssh_host, and the pane drops an empty "()" from the row title. Both guards are mutation-proven and nothing regresses for SSH crews or older panes. Decisive lines: website/src/components/InstancesViewport.tsx:1366, website/src/components/InstanceTabBar.tsx:1271
Problem / Motivation
Goal: Inside a remote crew's pane, the crew switcher names an SSM crew by its instance id, so its row reads
ec2-ssm (i-…) — connectedinstead ofec2-ssm () — connected.A crew added over AWS Session Manager and opened from the dashboard shows a switcher row whose label is
ec2-ssm () — connectedand whose subtitle is blank. The window's own switcher names the same crew by its instance id.Why it matters
Everyone who follows the guide's Session Manager path for an EC2 box they already have meets it on their first remote crew. The row names no machine, so the crew looks half set up, and a screen reader reads out the empty parentheses. The onboarding bug bash hit it in two runs.
Not a goal
sshHostkey: a pane on an older release reads it.What changed (motivation → approach → change)
ec2-ssm () — connected, blank subtitleec2-ssm (i-0abc…) — connected, subtitlei-0abc…ec2-ssm () — connectedec2-ssm — connectedA remote crew's pane cannot see the dashboard's crew list, so the dashboard sends it one (
buildModelForinInstancesViewport.tsx). That list named each crew's machine byssh_hostalone. An SSM crew has nossh_host: it is reached throughssm_target, which is what the window's own switcher already shows.The list now names the machine the same way the window's switcher does:
ssm_targetfor an SSM crew,ssh_hostfor the rest, throughusesSsmTransport, the helper Settings uses for the same choice. The pane's switcher (InstanceTabBar.tsx) also leaves out the parentheses when no machine arrives, which is what a dashboard from before this change still sends.Backwards compatibility
Compatible: the message keeps its shape and its
sshHostkey; only the value for an SSM crew changes from empty to its instance id, which an older pane shows the way it shows an SSH host.Removes nothing: the change fills a value that was empty and drops parentheses that held nothing.
Tests
InstancesViewport.test.tsx› relays an SSM crew to its pane under its instance id: the list the dashboard posts to the pane carries the crew'sssm_target. Red on the parent commit (it posted'').EmbeddedSwitcher.test.tsx› titles a relayed crew with no machine without an empty "()": the row is titledec2-ssm — connected. Red on the parent commit (ec2-ssm () — connected).Proof: not provable -- frontend test (prove.py runs Python only)
Determinism: both new tests green 20 runs in a row (
vitest run … -t 34698), then both whole files green in a shuffled order (--sequence.shuffle --sequence.seed=24657, 86 passed).Manual verification
Ran the real built dashboard and the real built pane together in Chromium (Playwright): the dashboard on one loopback port, the crew's pane on the crew's forwarded port, every
/api/**call answered from fixtures (one connected SSM crew,ssm_targeti-0abc123456789def0). Opened the crew from the dashboard, then the pane's own switcher. With this change the row's title readsec2-ssm (i-0abc123456789def0) — connectedand its subtitle shows the instance id. On the parent commit the same row's title readec2-ssm () — connectedwith no subtitle. Titles were read from the DOM.Screenshots / video
The pane's own crew switcher, opened inside an SSM crew's pane. Before: no machine under
ec2-ssm. After: its instance id.Related Issues
Closes #34698
Sibling sweep
Swept: git grep -nE ".ssh_host\b|sshHost" -- 'website/src//*.ts' 'website/src//*.tsx' ':!website/src/test/**'
Sibling: website/src/components/InstanceTabBar.tsx:1360 -- not affected -- the window's own switcher already picks ssm_target for an SSM crew
Sibling: website/src/pages/settings/RemoteCrewPanel.tsx:609 -- not affected -- the chained-crew announce already sends ssm_target for an SSM crew
Sibling: website/src/pages/settings/InstancesPanel.tsx:229 -- not affected -- picks ssm_target through usesSsmTransport
Sibling: website/src/pages/settings/RemoteCrewPanelCrewRow.tsx:309 -- not affected -- picks ssm_target through usesSsmTransport
Pattern harvest
Not generalizable: one relay field copied ssh_host where every other surface already chose by transport; the sweep found no second copy.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)