Skip to content

feat(remote-crew): one Remote Crews list in the switcher - #40332

Merged
bolichen97 merged 1 commit into
mainfrom
feat/38790-remote-crew-sections
Nov 21, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
feat/38790-remote-crew-sections

Conversation

@bolichen97

@bolichen97 bolichen97 commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: The header Crew switcher shows one "Remote Crews" list in which a Crew you reach over SSH or SSM reads "Private" with a lock and its source, and the turned-off Remote Crew card says "Remote Crew is off", finishing #38790.

Most of #38790 is already on main through #38803 (a228ee35325): the Remote Crew page's My Crews / Shared with me sections, the "+ Add Crew" modal, the new Crew rows, the one Settings section (items 1-4), the People source cards and one People list (items 6-7), and the switcher's "Remote Crews" / Private / Shared wording (item 8). Two things from the maintainer's sign-off on the issue are still missing:

  • The switcher draws two lists: the SSH and SSM Crews under "My Crews", then the relay Crews under "Remote Crews" (Bug Bash rows 41 and 42). An SSH or SSM row does not say it is Private or how it is reached.
  • The card shown while instances.enabled is false is titled "Remote crew management is off", while the page and the switcher call the feature "Remote Crew".

Why it matters

The switcher is the one place a person picks a Crew. Two headings over what is one set of remote Crews, and SSH rows with no type, make it look like two different kinds of thing, which is what Bug Bash 41 and 42 reported.

Not a goal

What changed (motivation → approach → change)

The switcher reads as one list of remote Crews, and the off card uses the page's name.

Change What the reader sees Where
One "Remote Crews" list This computer / Local, then one "Remote Crews" heading over the SSH, SSM and Fargate Crews and the relay Crews, in the window and in an SSH Crew's pane. No "My Crews" group; the relay group draws no second heading when the menu already drew one. A menu with no relay group still has no headings. InstanceTabBar.tsx, TeamCrewsGroup.tsx, embeddedTeamCrewsGroups.tsx
Private + source An SSH / SSM / Fargate row's second line reads "🔒 Private · SSH · ", like a Private relay row. An SSH Crew's own pane gets the transport from its window (HostTab.transport); a window that sends none shows the host alone. One crewTransportLabel gives the tag to both the switcher and the Remote Crew rows. InstanceTabBar.tsx, InstancesViewport.tsx, EmbeddedHostBridge.tsx, instancesSlice.ts, utils/remoteCrew.ts, RemoteCrewPanelCrewRow.tsx
Off card title "Remote Crew is off", in all 12 catalogs; the unused group_my_crews key is dropped. website/src/i18n/locales/*.json
Specs shared-crew.md says the switcher is one list and how its SSH rows read, and that the People heading counts rows. docs/system-specs/modules/shared-crew.md

Backwards compatibility

Compatible: the pane relay gains one optional field; an older window sends none and its pane shows the host as before.

Removes nothing: the only key dropped, components.instanceTabBar.group_my_crews, had one reader (InstanceTabBar.tsx's group label), which now reads components.relayCrews.group_team_crews.

Tests

  • TeamCrewsGroup.test.tsx "lists SSH Crews and Team Crews under one Remote Crews heading, the SSH row read as Private": one heading, no "My Crews", the SSH row reads "Private · SSH" with a lock. Red on main's switcher code, green here.
  • EmbeddedSwitcher.test.tsx: in a pane with relay rows there is one "Remote Crews" heading and no "My Crews" (red without headed); a relayed SSM tab reads "Private · SSM · i-0abc", a tab from an older window shows its host alone; parseHostModel keeps only ssh / ssm / fargate.
  • RemoteCrewPanel.test.tsx, RemoteCrewPanel.sharedCrewsOff.test.tsx, InstancesPanel.test.tsx: the off card's title is exactly "Remote Crew is off". Red with the old string.

Proof: not provable -- frontend test (prove.py runs Python only)

Manual verification

See Real-machine verification.

Real-machine verification

Machine: EC2 t3.xlarge-class demo viewer (i-089781885b3950d7b), Ubuntu, x86_64, Kiro Crew desktop app (Electron) built from the tree under test, signed in to Kiro (IAM Identity Center). One SSH Crew (r38-dev) and one SSM Crew (r38-ssm) connected to a second gateway on the same box, plus the account's relay Crews.

Before (main 276eaffebdb5): open the header switcher on Local -> "This computer", then a "My Crews" group with r38-dev reading only r38-ssh, then a separate "Remote Crews" group. With instances.enabled=false the Remote Crew card reads "Remote crew management is off".

After (2cb7a27accb6, this change before the rebase): the same steps -> one "Remote Crews" heading over r38-dev ("🔒 Private · SSH · r38-ssh"), r38-ssm ("🔒 Private · SSM · i-…") and the relay Crews; no "My Crews". The off card reads "Remote Crew is off".

After (head 7275b516a07c, on top of #40260): inside the r38-dev SSH pane, its own switcher shows "This computer", then one "Remote Crews" heading over r38-dev and r38-ssm (Private · SSH / SSM with the source) and the relay Crews (Private and Shared) in the same group; no "My Crews". r38-ssm reads "tunnel error" in that shot only because the temporary SSM permission from the earlier run was not added again; its row still shows Private · SSM and its source.

Cleanup: the box is a shared demo machine and stays running. The temporary SSM inline policy and AppArmor profile the tester added for the SSM Crew are removed by the tester when its run ends.

Merge order with #40260

#40260 merged first, so this PR carries the follow-up: an SSH Crew's own pane shows the relay Crews (EmbeddedTeamCrewsGroup), and that group now draws no second "Remote Crews" heading when the pane's own SSH / SSM rows already opened the list (embeddedTeamCrewsGroups.tsx passes headed; test in EmbeddedSwitcher.test.tsx).

Screenshots / video

Switcher, before (main): two groups, SSH row with no type.

before: My Crews and Remote Crews as two groups

Switcher, after: one Remote Crews list, SSH and SSM rows read Private with their source.

after: one Remote Crews list

Switcher inside the SSH Crew's pane, before the rebase onto #40260 (2cb7a27accb6, no relay rows in a pane yet).

after: pane switcher rows read Private · SSH and Private · SSM

Switcher inside the SSH Crew's pane, on this head (7275b516a07c): one Remote Crews list with the relay Crews. r38-ssm's tunnel error is the test box's missing SSM permission, not this change.

after: pane switcher with relay Crews under one Remote Crews heading

Off card, before and after.

before: Remote crew management is off

after: Remote Crew is off

Related Issues

Closes #38790

Items 6-7 (People) are on main via #38803; item 5 is not done (see Not a goal).

Checklist

  • A Conventional Commits title
  • 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

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license.

@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 21, 2026 06:57
@bolichen97
bolichen97 requested a review from CrysisDeu November 21, 2026 06:57
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 21, 2026
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks. The diff only changes frontend presentation. The new pane-relay field is optional and reads as the host alone when it is missing. The dropped group_my_crews key has no reader left in the tree, and there are screenshots of this revision.

Notes

  • The window-side transport comes from usesSsmTransport(i), but crewTransportLabel checks connection_method === 'ssm'. Have both use one predicate, so a Crew that uses SSM transport without that method can't read "SSM" in its pane and "SSH" in the window switcher.

[DESIGN-REVIEWED] 7275b51

Description read

[DESCRIPTION-READ] 73c68375ab1a95fcb8697205915a1022a0c69719bc2ab23affe5e2425497b220

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

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 7275b516a07c99386110e287471d5478c4c9002d — 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: Bug Bash rows 41/42 and the maintainer's sign-off on #38790 explain the regrouping and the relabel, and each new field has real consumers.

What this change ships

Inventory (7 items) — 7 justified

Intent: a person picking a Crew in the header switcher sees one list of remote Crews, each saying how it is reached. This is a FIX that finishes #38790.

  1. The switcher's "My Crews" heading is gone; SSH, SSM and Fargate rows sit under the single "Remote Crews" heading, above the relay rows — justified
  2. The relay group draws no second heading or separator when the menu already drew one, in the window and in an SSH Crew's pane — justified
  3. SSH, SSM and Fargate rows now read "🔒 Private · SSH/SSM/Fargate · host" — justified
  4. An SSH Crew's own pane gets each tab's transport from its window (optional HostTab.transport), and an older window shows the host alone — justified
  5. The Remote Crew row badge and the switcher share one transport-label helper (crewTransportLabel); the panel's private copy is deleted — justified
  6. The off card title changes to "Remote Crew is off" in 12 catalogs, and the unused group_my_crews key is dropped — justified
  7. A shared-crew spec line now says the People heading counts the rows shown — justified (rides along, declared)

[FIRST-PRINCIPLES-REVIEWED] 7275b51

Description read

[DESCRIPTION-READ] d49b5260470ae102bcd2620380fbccab57fa1d446ec82e8c91cdeae5d8e3bd83

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

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

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

UX-Verdict: PASS

Nothing blocks. The screenshots show every changed element: the single "Remote Crews" heading, the "Private · SSH/SSM · " row line and the "Remote Crew is off" title. The blind reader read each one correctly.

Notes

  • The off card's title now says "Remote Crew is off" but its button still says "Enable remote crew management". The blind reader took these as "two names for the same setting" (shots 5 and 6). A follow-up could rename the button to "Turn on Remote Crew".
  • An SSM row's source is a cut-off instance id ("i-089781885b3…"), which made the reader "uneasy" (shot 2). Where a display name exists, show it instead and keep the id in a tooltip.

[UX-REVIEWED] 7275b51

Description read

[DESCRIPTION-READ] 5400ecccf58a536eeeb0b64404f3dab4479b403c4c22888e1ad178fa1d58cc95

That sha256 names everything this verdict read: the PR description, plus the 9 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

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] 7275b51

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

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

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 7275b51

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

The header Crew switcher drew the SSH and SSM Crews under "My Crews"
and the relay Crews under "Remote Crews" (Bug Bash rows 41 and 42).
Both now sit under one "Remote Crews" heading, and an SSH, SSM or
Fargate row reads "Private" with a lock and its source tag, in the
window and in an SSH Crew's own pane. The card shown while remote
crew management is off is titled "Remote Crew is off".

The shared-crew spec says the switcher is one list, and that the
People heading counts the rows shown.

Closes #38790
@bolichen97
bolichen97 force-pushed the feat/38790-remote-crew-sections branch from c4cb4fc to 7275b51 Compare November 21, 2026 07:09
@bolichen97

bolichen97 commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: a lazy relay group's test waited on a heading that is no longer lazy

  • Relay-row assertion loses the lazy-load timeout span=2a9b05d936e0

fixed in 7275b51: the test now waits up to 5 s on the lazy group's own row (findByRole('menuitem', { name: 'Connect Team Lab' }, { timeout: 5000 })), since the "Remote Crews" heading is drawn by the menu itself and appears at once.
Swept: the only test that renders the lazy pane group (relayCrews: in EmbeddedSwitcher.test.tsx); TeamCrewsGroup.test.tsx imports the group directly.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: passed Eligible automated validation passed for the current revision readiness: checking Automated validation is still running and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention readiness: passed Eligible automated validation passed for the current revision labels Nov 21, 2026
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: A person should decide

Why: the decider estimates a 10% chance that this change introduces a defect, within the 12% limit for approving on its own, but it is held at tier 2: tier-gate: T3.

I found nothing that should block this PR, so I'm approving it.

What it does. It joins the two switcher lists into one. The heading that used to say "My Crews" (shown at row index 1 when a relay group exists) now reads "Remote Crews", the same key the relay group used. The relay groups, in both the window and the pane, get a headed flag set to shownEntries.length > 1. That matches the condition that draws the menu's own heading, so the list never shows two headings and never shows none.

Edge cases I checked:

  • A visible relay tab sitting at index 1: it now goes under "Remote Crews", which is better than the old "My Crews".
  • Embedded pane with no tabs: the bar returns null, so headed can't be set wrong there.
  • No relay group: there are still no headings at all.

Private · source line. SSH, SSM and Fargate rows get a new source field. In the window it comes from the shared crewTransportLabel, which replaces the panel's private copy with the same logic. In the pane it comes from a new optional HostTab.transport. The viewport sets that field with Fargate checked first, so it agrees with crewTransportLabel for every connection method. `parseHost

Tier: 2, held for a person: tier-gate: T3.

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

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed head 7275b51. I checked the switcher regrouping, the new optional pane transport field and the shared transport label helper against the code, and ran the touched frontend suites: all 235 tests pass. The new switcher tests fail against the previous switcher code, and the pane one-heading test fails when the headed flag is not passed down, so they test the behaviour they describe. The headed condition is the same one that draws the menu's own heading, so the list never shows two headings and never shows none. An older window that sends no transport still shows the host alone. I found no code errors, and nothing blocks.

@bolichen97
bolichen97 enabled auto-merge (squash) November 21, 2026 08:49
@bolichen97
bolichen97 merged commit 222e846 into main Nov 21, 2026
109 of 110 checks passed
@bolichen97
bolichen97 deleted the feat/38790-remote-crew-sections branch November 21, 2026 08:49
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 21, 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.

Remote Crew, People and the Crew switcher: organize Crews, connection sources and people into clear sections

2 participants