Skip to content

fix(instances): name an SSM crew by its instance id in pane switchers - #35156

Merged
bolichen97 merged 1 commit into
mainfrom
fix/34698-ssm-switcher-target
Nov 11, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/34698-ssm-switcher-target

Conversation

@bolichen97

Copy link
Copy Markdown
Contributor

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-…) — connected instead of ec2-ssm () — connected.

A crew added over AWS Session Manager and opened from the dashboard shows a switcher row whose label is ec2-ssm () — connected and 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

What changed (motivation → approach → change)

Pane's switcher row Before After
An SSM crew label ec2-ssm () — connected, blank subtitle label ec2-ssm (i-0abc…) — connected, subtitle i-0abc…
An SSM crew, from a dashboard older than this change label ec2-ssm () — connected label ec2-ssm — connected

A remote crew's pane cannot see the dashboard's crew list, so the dashboard sends it one (buildModelFor in InstancesViewport.tsx). That list named each crew's machine by ssh_host alone. An SSM crew has no ssh_host: it is reached through ssm_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_target for an SSM crew, ssh_host for the rest, through usesSsmTransport, 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 sshHost key; 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's ssm_target. Red on the parent commit (it posted '').
  • EmbeddedSwitcher.test.tsx › titles a relayed crew with no machine without an empty "()": the row is titled ec2-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_target i-0abc123456789def0). Opened the crew from the dashboard, then the pane's own switcher. With this change the row's title reads ec2-ssm (i-0abc123456789def0) — connected and its subtitle shows the instance id. On the parent commit the same row's title read ec2-ssm () — connected with 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.

Before After
Dark Before, dark: the SSM crew row has no subtitle After, dark: the SSM crew row shows its instance id
Light Before, light: the SSM crew row has no subtitle After, light: the SSM crew row shows 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

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

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
@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 11, 2026 07:05
@bolichen97
bolichen97 enabled auto-merge (squash) November 11, 2026 07:18
@github-actions

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of eee45b52b90097ff78dfeb072877f3f9060a5569 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • Item 1 — point patch: usesSsmTransport(i) ? i.ssm_target : i.ssh_host is now spelled out at 4 sites (grep ssm_target : : InstancesViewport.tsx:1366, InstancesPanel.tsx:229, RemoteCrewPanelCrewRow.tsx:309, InstanceTabBar.tsx:1384). A fifth form, connection_method === 'ssm' at InstanceTabBar.tsx:1384, already disagrees with usesSsmTransport on fargate. The general fix, one shared picker, is bigger than this PR and can wait. Subtraction: none in scope.

What this change ships

Inventory (3 items) — 3 justified

Intent: let someone inside a remote SSM crew's pane see which machine each crew row is. FIX.

  1. The pane's switcher row for an SSM crew shows its instance id in the label and subtitle — justified
  2. A row with no machine relayed (from an older dashboard) drops the empty "()" from its title — justified
  3. Two regression tests that fail on base — justified

[FIRST-PRINCIPLES-REVIEWED] eee45b5

Description read

[DESCRIPTION-READ] 3684ba5873e9d86aad0e9d4fa24bd436f7ab9c270c1faee7823c1045c4687154

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of eee45b52b90097ff78dfeb072877f3f9060a5569 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of eee45b52b90097ff78dfeb072877f3f9060a5569 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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 i-0abc123456789def0 correctly, as "some kind of ID or serial number for that machine."

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed eee45b52b90097ff78dfeb072877f3f9060a5569 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] eee45b5

Verdict parsed from the review's SHA-scoped output markers for commit eee45b52b90097ff78dfeb072877f3f9060a5569.

False positive or not applicable? A repository writer can comment:
/ai-review override fable eee45b52b90097ff78dfeb072877f3f9060a5569 false-positive: <reason, 20 to 500 characters>

@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: Approve

Why: 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 ssh_host alone, so SSM crews arrived with an empty value. The list now uses ssm_target for an SSM crew, through the existing usesSsmTransport helper. That matches what the window's own switcher and the Settings surfaces already show. The pane's switcher also leaves out the empty "()" when an older dashboard still sends no machine. The message keeps its shape and its sshHost key, so older panes still read it, and parseHostModel accepts the value as before. I checked every place that writes or reads the field. RemoteCrewPanel's chained-crew announce already sends ssm_target. The value comes from the dashboard's own crew list, not from anything the pane can write, so no trust boundary moves. Each of the two new tests would fail without its half of the change.

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 eee45b52b9 · 48 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@github-actions

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of eee45b52b90097ff78dfeb072877f3f9060a5569 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] eee45b5

False positive or not applicable? A repository writer can comment:
/ai-review override gpt eee45b52b90097ff78dfeb072877f3f9060a5569 false-positive: <reason, 20 to 500 characters>

@buluoray buluoray left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@github-actions github-actions Bot added the readiness: passed Eligible automated validation passed for the current revision label Nov 11, 2026
@bolichen97
bolichen97 merged commit dcd4830 into main Nov 11, 2026
99 of 108 checks passed
@bolichen97
bolichen97 deleted the fix/34698-ssm-switcher-target branch November 11, 2026 08:22
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crew switcher label has empty parentheses

3 participants