Skip to content

fix(instances): stop unmapped transports rendering as SSH - #13337

Open
koenvincent wants to merge 2 commits into
kirodotdev:mainfrom
koenvincent:feat/peer-transport-seam
Open

koenvincent wants to merge 2 commits into
kirodotdev:mainfrom
koenvincent:feat/peer-transport-seam

Conversation

@koenvincent

@koenvincent koenvincent commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Stop the dashboard from rendering a crew whose connection_method it does not recognise as an SSH crew.

The Remote Crew surfaces decide a crew's badge, hover hint, address line and
diagnostics transport with conditionals whose last arm is ssh. Any method
the chain does not name is silently treated as SSH, and the two surfaces disagree
about the same failure on main today:

surface expression a fargate crew reports
components/InstancesViewport.tsx inst?.connection_method === 'ssm' ? 'ssm' : 'ssh' transport: ssh
pages/settings/RemoteCrewPanel.tsx usesSsmTransport(inst) ? 'ssm' : 'ssh' transport: ssm

The failure report's repair ladder is selected by that name, so a fargate crew is
handed SSH's remediation steps. The card's address line has the same shape:
usesSsmTransport(inst) ? inst.ssm_target : inst.ssh_host prints an empty SSH
host
for any unrecognised method, which reads as a configured-but-blank SSH crew
rather than as something unsupported.

Why it matters

CONNECTION_METHODS has already grown once, from ("ssh", "ssm") to
("ssh", "ssm", "fargate"), and the fargate mislabelling above is what that
growth cost. The failure mode is silence: nothing throws, nothing logs, the badge
says SSH and the repair steps are the wrong ones.

Not a goal

  • No gateway change: the backend PeerTransport registry that used to be the second commit is out of this PR (see Scope below). It waits on a maintainer scope call on RFC docs(rfc): outbound instance transport without SSH or SSM #13031.
  • No new transport and no change to how ssh, ssm or fargate connect.
  • The two remaining dashboard sites that still branch on the method string (InstancesPanel.tsx badge, InstanceFormFields.tsx selector) are named below, not converted here: neither mislabels a known method today. hasDashboardPane is converted: it compares the normalised method.

What changed (motivation → approach → change)

Scope since the last review. This PR is now dashboard only: one commit, about 240 production lines. The
gateway PeerTransport refactor that used to be the second commit has been taken
out. It was over the size limit, and whether to land groundwork for the draft
outbound RFC (#13031) is a maintainer scope call that should not hold this
defect fix. It will come back as its own PR once that call is made.

Review follow-up 4 (2026-10-21, crew-pr-reviewer r116 on df8cf0f), head 085483f, same base. The PR is cut down to its Goal. First Principles items 5-7 judged the visible hint, the pane's unmapped branches and the secondary Connect/Retry oversized, and UX Watch 1 found the hint and the Retry notice saying the same thing twice. Both point at the same subtraction, so it is done: the inline transport_hint_unmapped_rich hint and its key in all 12 locales are gone, the pane is the ordinary disconnected pane with a primary Retry, and the Settings row keeps a primary Connect. The badge's hover title (transport_hint_unmapped) still explains the method, and pressing Connect or Retry shows the gateway's own refusal once, through ErrorNotice. hasDashboardPane now compares the normalised method (Design). The PR is 122 lines smaller.

Review follow-up 3 (2026-10-21, GPT 6.1 / Opus 5.5 / First Principles on 8c4c216), head df8cf0f, same base. The "not supported" state is gone. Every round on it moved the same finding between lanes: the status notice broke errors-use-error-notice, hiding the refusal left Retry looking dead, and the StatusBadge arm bypassed the shared Badge. First Principles had it right: the Goal ("never render as SSH") is met by items 1-3 alone. Removed: StatusBadge notSupported, the chip, readout and rowStateLabel arms, HostTab.unsupported and its relay, and panelRefusedUnsupported, along with both not_supported i18n keys. Each crew surface now shows the tunnel's own state ("disconnected"), and the method's name plus the visible hint say why. Pressing Retry or Connect now shows the gateway's 409 through the panel's ordinary ErrorNotice, so the press visibly does something. The hint now ends "then try again" in all 12 locales, which fits both Retry and Connect. Net change this round: -146 lines.

Follow-ups 2 and earlier below describe the removed state and are kept for the review trail.

Review follow-up 2 (2026-10-19, crew-pr-reviewer r112 on dafb9c3), on main d8ff9e7. The tab chip and the tunnel readout now say not supported for an unmapped crew, as the switcher row and the pane hint already did. The pane uses a neutral Info icon instead of the red AlertTriangle, and Retry stays but as a secondary (bordered) button: the gateway is the authority on what it can dial and this SPA's table can lag it (a tab left open across an update, the remedy the hint names), so pressing Retry lets the gateway answer, and its 409 connection_method_unsupported text shows in the pane's notice, unwrapped. buildModelFor now relays unsupported: true and the same detail the host row shows, so an embedded pane's own switcher agrees with the window; parseHostModel accepts only an explicit true, so an older host changes nothing. PRESENTED_CONNECTION_METHODS (and the test-only export of TRANSPORT_COPY) are gone: the exhaustiveness test resolves every gateway method through transportPresentation and transportCopy. The viewport cases moved to a new InstancesViewportUnmappedTransport.test.tsx, so the baselined InstancesViewport.test.tsx no longer grows.

Review follow-up (2026-10-20, UX Watch relayed in r115), head 5878963, same base. The Settings row's "Not supported" is drawn by the shared StatusBadge (new notSupported prop) in the same dot-plus-word shape as the other rows' "Disconnected", with a muted dot, instead of a second muted chip under the method chip; it is still the shared component, which the GPT 6.1 finding asked for. After Retry, the gateway's own refusal (409 connection_method_unsupported, read from the typed code, never the text) is not repeated in any notice: it restates the hint, which stays and says what to do (a neutral notice was refused by the errors-use-error-notice rule on 5878963045, and a red one read as broken). Any other Retry failure on that crew still renders as the red ErrorNotice with its hand-off. Tests pin both, plus the non-refusal error case; reverting each change turns its test red. Screenshots re-taken with the committed capture script, which now also checks the muted dot and that no red notice follows Retry.

Review follow-up (2026-10-20, GPT 6.1 on fed5c9d), head 145c698, same base. The Settings row's "Not supported" is now the shared <Badge variant="muted"> instead of hand-built status markup, as the upheld finding asked; the test asserts it renders through that badge, and the Settings frames are re-captured.

Review follow-up (2026-10-20, r114), head fed5c9d, same base. The Settings row's status uses its own sentence-case key (pages.settings.remoteCrewPanel.status_not_supported, "Not supported") to match the "Disconnected" StatusBadge beside it; the switcher keeps its lowercase inline suffix. "Settings → About" in the visible hint, on the Settings row and in the pane, is a SettingsLink to /settings/about (a new transport_hint_unmapped_rich key in all 12 locales; the hover titles keep the plain hint), and the pane's link returns to Local first like its existing Settings link. Two new capture frames show the pane after Retry. Tests: the PR's 4 frontend files (55 tests), tsc, ESLint, i18n-check, the i18n suite, the line cap, docs-lint and the feature-map gate pass; reverting each of the three changes turns its new assertion red. The Goal amendment for First Principles 5-6 is left to a maintainer.

Review follow-up (2026-10-20, r113). The Settings row now agrees with the switcher and the pane: an unmapped crew reads not supported (muted dot) instead of its tunnel state, and its Connect is a secondary button, like the pane's Retry, still clickable so the gateway's refusal is what the user reads. The hint names where to update (Settings → About, the path the update notices already use) in all locales. The not supported state, the pane restyle and the HostTab.unsupported relay stay: without them the surfaces contradict each other, which is what the UX lane flagged.

Review follow-up (2026-10-19), on main d8ff9e7. The dashboard connect guards are removed again. Their premise ("the gateway dials an unmapped method over SSH") stopped being true when the gateway-side refusal tracked in #20250 landed as #20668: _resolve_transport now raises UnsupportedConnectionMethodError, POST /api/instances/{id}/connect answers 409 connection_method_unsupported, and Settings -> Diagnose returns that verdict without a probe. So useSelectInstance and selectAutoConnectTargets are back to main's code, Settings Connect is no longer disabled (it keeps aria-describedby on the visible hint), and the pane keeps its Retry. What stays is the presentation: the badge, hint, address line, switcher subtitle and not supported state word, the pane hint in place of the status word, and both failure reports reading one mapping. The feature-map row now says the gateway refuses the connect and Diagnose runs no probe (the First Principles and GPT 6.1 blockers on fb59ca0). Also new on this head: the two unmapped Settings cases moved to RemoteCrewPanelUnmappedTransport.test.tsx, because they put RemoteCrewPanel.test.tsx one line over the 2,000-line cap; the change to the Settings code moved to RemoteCrewPanelCrewRow.tsx with main's split (#21592); and the capture script now also shoots the pane frames, with the connect stubbed as the gateway's 409.

At head dafb9c3: the gateway's code is named correctly as connection_method_unsupported in the feature map, the capture stub and the comments (GPT 6.1 blocker on 7d1dbf0); the mapped docstring and the Settings hint comment no longer describe the removed guards; and the test-only TRANSPORT_COPY_METHODS export and its drift test are gone, because the Record<PresentedConnectionMethod, TransportCopy> type already fails the typecheck on a missing copy (First Principles CONCERNS items 9 and 10). 183 tests, tsc, eslint, the line cap, docs-lint, the feature-map gate and all six capture frames pass.

Earlier follow-ups, kept for the review trail; where they describe guards, those are gone as above.

Review follow-up (2026-10-14). No dashboard connect path dials an unmapped crew any more. The gateway's _resolve_transport treats any method that is not fargate or ssm as ssh, so every dashboard path that connects now checks transportPresentation(inst).mapped first: useSelectInstance (the switcher click, the keyboard chord, the command palette and the sidebar) activates the pane but does not connect; selectAutoConnectTargets skips the crew; the in-pane panel shows the transport_hint_unmapped hint in place of the "Disconnected" status and renders no Retry. Enabling or disabling such a crew needs no dashboard guard: PATCH /api/instances/{id} validates the edited record and refuses an unknown method with a 400 (instance_invalid), so the toggle never reaches a connect. The switcher row's subtitle names the method (outbound) instead of being blank, and its state word reads not supported instead of disconnected, so the row says why picking it will not connect before you pick it. reportTransport is gone (it was always method), and mapped now has those production consumers plus the Settings row. One new string, components.instanceTabBar.not_supported, in every locale.

(Superseded: the gateway-side refusal tracked in #20250 landed as #20668, and Diagnose runs no probe for such a crew. See the 2026-10-19 follow-up.)

Review follow-up (2026-10-07). The description now names the real surface: one new i18n string in every locale and a disabled-Connect state. The unmapped hint says what to do next (update, then connect again), not only what is wrong. The unused protocol surface was the gateway half, which is no longer in this PR. A second commit records the behaviour on the instances row of docs/feature-map/README.md.

One mapping in website/src/utils/remoteCrew.ts, keyed by method, carrying
which field addresses the crew and whether the method is mapped. Both failure
reports key their repair steps by the method's own name.
It closes the two mismatched sites above and the crew switcher's row subtitle,
which had the same fallback.

An unmapped method renders as its own name, with the new
transport_hint_unmapped hint as the badge's hover title. Nothing else on the
row or the pane changes: Connect and Retry stay as for any disconnected crew,
and the gateway refuses the connect itself (409 connection_method_unsupported,
#20668), which the error notice shows.

Absent is not unrecognised. normalizeConnectionMethod mirrors the gateway's
(inst.connection_method or "ssh").strip().lower(), so a record with no method
still means ssh.

Copy lives at the call site. The badge copy is in
pages/settings/transportCopy.ts with literal i18n keys, typed
Record<PresentedConnectionMethod, TransportCopy>. The key-reference gate
(website/scripts/check-i18n-keys.mjs) can only check a key it resolves
statically and its dynamic-site baseline is ratchet-down only, so keys are not
read off the mapping. Adding a method without its copy is a typecheck failure.

One new i18n string, transport_hint_unmapped ("This version of
{{productName}} doesn't support the {{method}} connection method, so it can't
connect to this crew. Update {{productName}}, then connect again."), in en, the
11 translated locales and the regenerated en-XA. The existing type_* /
transport_hint_* keys for ssh, ssm and fargate are reused verbatim.

Not yet exhaustive, named rather than implied closed:
InstancesPanel.tsx (badge) and InstanceFormFields.tsx (method selector)
still branch on the method string. hasDashboardPane now reads the normalised
method.
None regresses the three known methods.

Backwards compatibility

No change for a valid ssh, ssm or fargate record, with one intended
correction: a fargate crew's failure report now says transport: fargate
where it said ssh (viewport) or ssm (settings panel). No API, config or
on-disk change; no new dependency.

Tests

website/src/test/remoteCrewTransportPresentation.test.ts (new) reads
registry.py as text with an anchored regex, so a backend rename fails loudly
instead of passing vacuously. It covers the mapping's exactness against
CONNECTION_METHODS, the copy table, absent-means-ssh, case and space
normalisation, the regression test of record (a fargate instance reports
fargate), per-method addressing, and that an unknown method acquires no
sibling's badge, hint, address field or repair steps.
RemoteCrewPanelUnmappedTransport.test.tsx (new, split from RemoteCrewPanel.test.tsx at its line cap) covers the badge hint, and the row keeping its Disconnected state and a primary Connect with no inline hint.
InstanceTabBar.test.tsx gains an unmapped case: the switcher row names the method, never the record's ssh_host. InstancesViewportUnmappedTransport.test.tsx (new) covers the ordinary disconnected pane with a primary Retry, Retry showing the gateway's 409 once through the panel's ErrorNotice, and the relayed detail (no new model field). remoteCrewTransportPresentation.test.ts also pins hasDashboardPane on Fargate and FARGATE.

At head 085483f: the 4 touched test files, the src/i18n suites, tsc, ESLint, check-i18n-keys, the line-cap, comment-history, feature-map and docs gates, and the capture script for all eight frames pass. Putting back the old pane, the old row, or the raw hasDashboardPane comparison each turns a test red.

At head df8cf0f: the 5 touched test files (98 tests), the src/i18n suites with I18N_BASE_REF (1022 tests), tsc -p tsconfig.app.json, ESLint on the touched files, check-i18n-keys, check_file_line_cap.py, the comment-history and feature-map gates, docs-lint, and the capture script for all eight frames pass.

At head 7e715ec on main d8ff9e7: 8 test files (255 tests), tsc, ESLint, i18n-check, check_file_line_cap.py, docs-lint and the feature-map gate pass, and the capture script passes for all six frames; mutations dropping the relayed flag, the chip branch, or the secondary Retry styling each turn a new test red. At head 7d1dbf0 on main d8ff9e7: the 7 touched test files (198 tests), tsc -p tsconfig.app.json, ESLint on the touched files, i18n-check, check_file_line_cap.py, docs-lint and the feature-map gate pass, and the capture script passes for all six frames. Earlier, on main e4270cf at head 3f08700: the four directly touched test files (183 tests) pass, as do the i18n gates (lint:i18n, i18n:check); npm run typecheck and ESLint on the touched files are clean; the feature-map gate (FEATURE_MAP_BASE_REF=origin/main) passes. Mutation checks: removing the guard in useSelectInstance, in selectAutoConnectTargets, or panelUnmapped from Retry's disabled each turns its new test red; dropping unmapped from the Settings Connect button's disabled turns "disables Connect on an unmapped method and says why in visible text" red. Dropping the unsupported arm from rowStateLabel turns the switcher test red. The rest of the suite is left to CI.

Manual verification

The captures below were shot from the built SPA with every /api/** call stubbed; the capture script fails unless each frame's claim is true in the DOM. Not verified against a live crew with an unmapped method, because no shipped gateway can produce one: that state is reachable only from a newer crew registry or a hand-edited record.

Screenshots / video

Eight committed captures in temp-screenshots/13337-unmapped-transport/, all shot at
this head from the built SPA by website/scripts/capture-unmapped-transport.mjs,
with every /api/** call stubbed and the edge crew's connect answered with the
gateway's 409. Each run fails unless what the frame claims is
true in the DOM: the unmapped switcher row reads outbound and names no machine;
the Settings row keeps its tunnel state and a primary Connect, carries no inline hint, and its badge title keeps the update hint; the pane shows its ordinary "Disconnected" and a primary Retry; and pressing Retry shows the gateway's own refusal exactly once, as readable text in the error notice.

Crew switcher, unmapped row (dark, light):

Crew switcher: edge-crew reads outbound; devdesk reads dev-dsk-alias, disconnected (dark)
Crew switcher, light theme

Pane after selecting the unmapped crew from the switcher: the ordinary disconnected pane (dark, light):

edge-crew pane: Disconnected and Retry (dark)
edge-crew pane, light theme

The same pane after pressing Retry: the gateway's 409 connection_method_unsupported in the panel's error notice, the only place it is said (dark, light):

edge-crew pane after Retry: the gateway's refusal as readable text (dark)
edge-crew pane after Retry, light theme

Settings -> Remote Crew rows (dark, light):

Remote Crew rows: fargate, outbound, ssh, each with a primary Connect (dark)
Remote Crew rows, light theme

Follow-up (r121 notes): TransportPresentation.mapped is gone. It always equalled addressField !== null, because every row in the table has an address field, so the two surfaces that read it (the tab bar subtitle and the viewport handoff) now test addressField directly and the doc comment says what null means. No behaviour change: the 12 test files that cover the presentation and both surfaces pass unchanged apart from the assertions on the removed field.

Related Issues

Related to #13031 (outbound instance transport RFC), which the unmapped state prepares for. Gateway-side follow-up: #20250.

Pattern harvest

Pattern: a conditional chain over an enum whose last arm is a concrete member (: 'ssh') silently absorbs every new member.
Rule candidate: review-prompt -- flag a ternary/if-chain over connection_method (or any registry-backed enum) whose fallback arm is one of the enum's own values instead of an explicit unmapped case.

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

Contribution License Agreement

Contributed under the project's Apache-2.0 license.

@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: action required A blocking check or review needs attention labels Sep 24, 2026
@dwu96

dwu96 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

👋 Hi! This PR is currently in draft status. Workflow runs won't be auto-approved until it's marked as ready for review.

When you're ready, click "Ready for review" and the workflows will be approved on the next cycle automatically.

2 similar comments
@dwu96

dwu96 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

👋 Hi! This PR is currently in draft status. Workflow runs won't be auto-approved until it's marked as ready for review.

When you're ready, click "Ready for review" and the workflows will be approved on the next cycle automatically.

@dwu96

dwu96 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

👋 Hi! This PR is currently in draft status. Workflow runs won't be auto-approved until it's marked as ready for review.

When you're ready, click "Ready for review" and the workflows will be approved on the next cycle automatically.

@koenvincent
koenvincent force-pushed the feat/peer-transport-seam branch from ef2c960 to 134a0b3 Compare September 24, 2026 12:23
@dwu96

dwu96 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

👋 Hi! This PR is currently in draft status. Workflow runs won't be auto-approved until it's marked as ready for review.

When you're ready, click "Ready for review" and the workflows will be approved on the next cycle automatically.

6 similar comments
@dwu96

dwu96 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

👋 Hi! This PR is currently in draft status. Workflow runs won't be auto-approved until it's marked as ready for review.

When you're ready, click "Ready for review" and the workflows will be approved on the next cycle automatically.

@dwu96

dwu96 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

👋 Hi! This PR is currently in draft status. Workflow runs won't be auto-approved until it's marked as ready for review.

When you're ready, click "Ready for review" and the workflows will be approved on the next cycle automatically.

@dwu96

dwu96 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

👋 Hi! This PR is currently in draft status. Workflow runs won't be auto-approved until it's marked as ready for review.

When you're ready, click "Ready for review" and the workflows will be approved on the next cycle automatically.

@dwu96

dwu96 commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

👋 Hi! This PR is currently in draft status. Workflow runs won't be auto-approved until it's marked as ready for review.

When you're ready, click "Ready for review" and the workflows will be approved on the next cycle automatically.

@dwu96

dwu96 commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

👋 Hi! This PR is currently in draft status. Workflow runs won't be auto-approved until it's marked as ready for review.

When you're ready, click "Ready for review" and the workflows will be approved on the next cycle automatically.

@dwu96

dwu96 commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

👋 Hi! This PR is currently in draft status. Workflow runs won't be auto-approved until it's marked as ready for review.

When you're ready, click "Ready for review" and the workflows will be approved on the next cycle automatically.

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Sep 28, 2026
@koenvincent
koenvincent force-pushed the feat/peer-transport-seam branch from 134a0b3 to 77e8e21 Compare October 5, 2026 09:11
@koenvincent
koenvincent marked this pull request as ready for review October 5, 2026 09:12
@koenvincent
koenvincent requested a review from a team as a code owner October 5, 2026 09:12
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 5, 2026
@koenvincent
koenvincent force-pushed the feat/peer-transport-seam branch from 77e8e21 to 7822b8d Compare October 5, 2026 09:32
@github-actions github-actions Bot removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 5, 2026
@koenvincent
koenvincent force-pushed the feat/peer-transport-seam branch from 7822b8d to 74fc8b7 Compare October 5, 2026 10:40
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 5, 2026
@koenvincent

Copy link
Copy Markdown
Contributor Author
  • fixed span=4464213526e3 — The feature map and the code agree again

Fixed on df8cf0f5d6. The pane no longer hides the gateway's refusal: panelRefusedUnsupported is gone, so the press does show the gateway's own text, as the feature-map row says. The row is reworded to match: the refusal shows "through the panel's error notice". InstancesViewportUnmappedTransport.test.tsx asserts the 409 text inside instances-viewport-panel-error, and the capture script fails without it (pane-retry-*.png).

@koenvincent

Copy link
Copy Markdown
Contributor Author
  • fixed span=90c8357b730c — The unsupported-method refusal renders through ErrorNotice

Fixed on df8cf0f5d6. The suppression and its parseErrorCode check are deleted. A 409 connection_method_unsupported now takes the same ErrorNotice path as every other connect failure; it is not special-cased in any way. The test asserts the notice carries the gateway's sentence, and the 502 case still renders the same way.

@koenvincent

Copy link
Copy Markdown
Contributor Author
  • fixed span=61c8177d0217 — No new status indicator: StatusBadge is back to main

Fixed on df8cf0f5d6. InstancesPanel.tsx is byte-identical to the merge base. The notSupported prop and its hand-drawn dot are removed, along with the whole "not supported" state they drew (see the First Principles dispositions). The Settings row shows the ordinary StatusBadge ("Disconnected"), and the visible hint under it says why. The test asserts that crew-status-not-supported is absent.

@koenvincent

Copy link
Copy Markdown
Contributor Author
  • fixed span=2f8593e6633d — Retry now visibly answers

Fixed on df8cf0f5d6. After Retry, the gateway's refusal appears under the hint in the panel's error notice, so the pane no longer looks the same before and after the press. Compare pane-dark.png with pane-retry-dark.png. Both the unit test and the capture script fail if the notice is missing.

@koenvincent

Copy link
Copy Markdown
Contributor Author
  • fixed span=c4a5aebfb2b7 — The hint ends "then try again"

Fixed on df8cf0f5d6. The hint sits next to Retry in the pane and next to Connect in Settings, so it now ends "then try again", which fits both. Changed in both hint keys in all 12 locales, with en-XA regenerated. The src/i18n suites pass with I18N_BASE_REF.

@koenvincent

Copy link
Copy Markdown
Contributor Author
  • rebutted span=e873e0fa60b3 — Keeping the cause-first lead

The suggested lead, "{{method}} connections need a newer {{productName}}", claims that some newer build supports the method. That is false for a mistyped or hand-edited method such as shh, which the Design lane raised on this same head. "This version of {{productName}} doesn't support the {{method}} connection method" is true in both cases. It also puts the method's own name in front of the user, which is how a typo gets noticed. Only the closing clause changed (see c4a5aebfb2b7).

@koenvincent

Copy link
Copy Markdown
Contributor Author
  • fixed span=e86b5ea9400f — The not-supported state is removed

Fixed on df8cf0f5d6. Removed: StatusBadge notSupported, the chip and tunnel-readout arms, the rowStateLabel arm, and both not_supported i18n keys in all locales. What remains is items 1-3: the shared mapping, the method's own name in place of an SSH address, and the hint. Net change this round: -146 lines.

@koenvincent

Copy link
Copy Markdown
Contributor Author
  • fixed span=5518c66695d7 — HostTab.unsupported is removed

Fixed on df8cf0f5d6. instancesSlice.ts and EmbeddedHostBridge.tsx are byte-identical to the merge base. The relayed model carries only the corrected detail (sshHost = the method name), and the test asserts the model has no unsupported key.

@koenvincent

Copy link
Copy Markdown
Contributor Author
  • fixed span=cb1f5f11f4bd — panelRefusedUnsupported is removed

Fixed on df8cf0f5d6. Deleted as suggested. The existing ErrorNotice renders the 409 (see the GPT and UX dispositions).

@koenvincent

Copy link
Copy Markdown
Contributor Author

Answer to the PASS-lane ask on 8c4c2162ad, for the head df8cf0f5d6.

  • Design: does the "update Kiro Crew" hint fit a mistyped or hand-edited method? Partly. The hint's lead ("This version of Kiro Crew doesn't support the shh connection method") is true for a typo too, and it prints the method's own name on the row, the switcher and the pane, so a typo like shh shows up where the user will see it. An update can't repair a registry entry. Telling an unknown-but-real method apart from a typo would need the gateway to say which methods exist in newer releases, and this dashboard-only fix doesn't attempt that. The row's Edit (for manual crews) is where a typo gets fixed. That's why the hint keeps its cause-first wording (see the UX e873e0fa60b3 disposition).

@iamwhatever

Copy link
Copy Markdown
Contributor

HOLD at df8cf0f5d6a69eb2a80066fc7d7f6aa622e34e24.

Your dispositions for 8c4c2162ad landed, and the GPT 6.1 and Opus findings are fixed: the 409 refusal goes through ErrorNotice again, and StatusBadge, instancesSlice.ts and EmbeddedHostBridge.tsx match main. Checks are green.

The lanes re-ran on this head after those dispositions, and these items have no reply yet:

  • UX Watch 1: after Retry, the red ErrorNotice repeats the hint sentence printed just above it.
  • UX Watch 2: the switcher row shows only the method name, with the same "disconnected" status a working crew has.
  • First Principles items 5-7: the inline hint, the panelUnmapped pane branches (InstancesViewport.tsx L1351) and the secondary Connect/Retry are judged oversized for the Goal.
  • Design punchline: hasDashboardPane still compares the raw method, while transportPresentation normalises case.

UX Watch 1 and First Principles items 5-6 pull in opposite directions, and the GPT 6.1/Opus fix sits between them. A maintainer needs to decide which surface carries the unsupported-method message (the hint, the notice, or both), and to rule on the Goal as r115 asked. To clear this hold: post one disposition per item above for this head, and get that ruling. Our earlier CHANGES_REQUESTED stays until then.

I read the source and CI. I did not run tests.

— crew-pr-reviewer (r116)

@koenvincent

Copy link
Copy Markdown
Contributor Author
  • fixed span=0c078dc94a2d — hasDashboardPane reads the normalised method

Fixed on 085483fe6c. hasDashboardPane now compares normalizeConnectionMethod(inst.connection_method), so a hand-edited Fargate record gets no pane, switcher tab or auto-connect, the same as in the presentation table. remoteCrewTransportPresentation.test.ts pins fargate, Fargate and FARGATE as paneless and absent, ssh, SSM and outbound as not; with the raw comparison put back it goes red. The other raw comparisons (InstancesPanel.tsx, InstanceFormFields.tsx) are main's code and stay named in the description as not yet covered.

@koenvincent

Copy link
Copy Markdown
Contributor Author
  • fixed span=d4795ddb2ef6 — Retry no longer stacks two copies of one message

Fixed on 085483fe6c, by removing the hint rather than the notice. First Principles items 5-6 asked for exactly that subtraction, and GPT 6.1 and Opus require a refused connect to render through ErrorNotice, so the notice is the one surface left that says it. The pane is now the ordinary disconnected pane, and after Retry the gateway's sentence appears once (pane-retry-dark.png). The test asserts a single match, and the capture script fails if the refusal appears more than once.

@koenvincent

Copy link
Copy Markdown
Contributor Author
  • declined span=91ce4cf4f90e — no "needs update" suffix on the switcher row

Declined. The Goal is that an unrecognised method is never shown as SSH, and the switcher row does that by naming the method. A "needs update" suffix is the separate not-supported state that follow-up 3 removed after it moved between lanes for three rounds, and First Principles judges this surface oversized for a row no current gateway can write (registry.py refuses the method). Opening the crew and pressing Retry shows the gateway's own reason. If a maintainer widens the Goal, it can come back as its own PR.

@koenvincent

Copy link
Copy Markdown
Contributor Author
  • fixed span=3a51c25486df — item 5, inline hint removed

Fixed on 085483fe6c, as the subtraction describes. The inline transport_hint_unmapped_rich span and Connect's aria-describedby are gone, and so is the _rich key in all 12 locales and en-XA. The badge keeps its title (transport_hint_unmapped).

@koenvincent

Copy link
Copy Markdown
Contributor Author
  • fixed span=0f7243b313ef — item 6, panelUnmapped branches removed

Fixed on 085483fe6c. The panelUnmapped flag and its icon, hint and Retry-class branches are deleted, so InstancesViewport.tsx's pane block is main's again. The pane shows its ordinary "Disconnected" and Retry, and Retry shows the refusal through ErrorNotice.

@koenvincent

Copy link
Copy Markdown
Contributor Author
  • fixed span=4261bf4eeca7 — item 7, Connect and Retry primary again

Fixed on 085483fe6c. With the hint gone there is nothing for a secondary button to back up, so the Settings row's Connect and the pane's Retry use main's primary styling. Tests and the capture script assert bg-accent on both.

@koenvincent

Copy link
Copy Markdown
Contributor Author

@iamwhatever thanks for r116. All six items now have a disposition for df8cf0f5d6, and the fixes are on 085483fe6c (same base).

On which surface carries the unsupported-method message: I took First Principles' subtraction, so there is now only one. The inline hint and the pane's unmapped branches are gone. The badge's hover title explains the method, and a pressed Connect or Retry shows the gateway's refusal once, through ErrorNotice. That also clears UX Watch 1 without hiding the notice, which GPT 6.1 and Opus had blocked. I declined UX Watch 2 (a "needs update" suffix) as outside the Goal.

So the open question for a maintainer is only the Goal ruling r115 asked for: is "never render an unrecognised method as SSH" the whole Goal? If it should be wider, the hint and the suffix can come back as a separate PR.

@iamwhatever

Copy link
Copy Markdown
Contributor

HOLD at 6a010f4. The code is sound, but a maintainer ruling is still open and three lane notes on this head have no reply.

The narrowed version reads well. One normalised table drives every surface, and an unrecognised method shows its own name with no address, never SSH (remoteCrew.ts#L65-L108). The gateway's refusal shows once through ErrorNotice. Every lane passes, and GPT and Opus report no findings. CI is green: 100 checks pass or are skipped, plus PR Readiness.

What blocks approval:

  1. A maintainer still needs to rule on the Goal r115 asked about: is 'never render an unrecognised method as SSH' the whole Goal, without the inline hint and the switcher suffix? Your 2026-10-21 comment puts the same question.
  2. These notes on this head have no disposition:
    • First Principles item 9: mapped always equals addressField !== null (remoteCrew.ts#L73), so delete it or say why it stays.
    • UX: the pane-retry refusal gives no next step.
    • UX: the Settings row signals 'not supported' only on hover.
      A short disposition per item clears this. If the Goal is widened, those two UX items can go to an issue linked in the description.

Our earlier CHANGES_REQUESTED stays until then.

Reviewed head: 6a010f4

— crew-pr-reviewer (r121)

@koenvincent

Copy link
Copy Markdown
Contributor Author

@iamwhatever thanks for r121. One disposition per open note:

  1. First Principles item 9, mapped (fixed in 7b4a60f): removed. It always equalled addressField !== null, since every row in the table has an address field. The tab bar and the viewport handoff now test addressField directly, and its doc comment says that null means "this build does not know the method". No behaviour change. The presentation tests and the tests for both surfaces (12 files) pass, and so do the typecheck and eslint.
  2. UX, the pane-retry refusal gives no next step (declined while the Goal stands): this is the hint the previous round removed, because First Principles called it more than the Goal needs and the UX lane said it repeated the refusal. The refusal now shows once, in ErrorNotice, and the method badge's tooltip still says to update the crew. If the maintainer widens the Goal, I'll open an issue for a next step in the pane and link it in the description.
  3. UX, the Settings row signals "not supported" only on hover (declined while the Goal stands): same reason. The row shows the method's own name and "disconnected", never SSH, which is the whole Goal as stated. A visible "not supported" state was the separate status removed two rounds ago. It goes into the same issue if the Goal is widened.

So the open question is still the one from r115: is "never render an unrecognised method as SSH" the whole Goal?

@iamwhatever

Copy link
Copy Markdown
Contributor

Hold at 025a40ed64569e03b508d2178047bad9cdb5d819.

The fix is sound. One normalised table drives the badge, address line and both failure reports, so an unrecognised method shows its own name and never SSH. Your r121 dispositions landed, and CI and every lane are green.

What would clear this:

  1. A maintainer still needs to rule on the Goal from r115: is "never render an unrecognised method as SSH" the whole Goal?
  2. The lanes re-ran on this head and three notes have no reply:
    • First Principles item 6: ## Not a goal still says hasDashboardPane is "not converted here", but the diff converts it (remoteCrew.ts#L30-L32). Updating that line answers it.
    • Design: confirm the repair-ladder lookup has a neutral fallback for a transport name with no steps (fargate or an unmapped method).
    • UX: no screenshot shows the transport_hint_unmapped hover title on the Settings chip. Add one, or say why it is not needed.

— crew-pr-reviewer (r124)

@koenvincent

Copy link
Copy Markdown
Contributor Author

@iamwhatever thanks for r124. One disposition per open note, all on 025a40e (no new push):

  1. First Principles item 6, ## Not a goal (fixed in the description): the line now names only the two sites that still branch on the method string (InstancesPanel.tsx badge, InstanceFormFields.tsx selector) and says hasDashboardPane is converted to the normalised method, matching remoteCrew.ts#L30-L32.
  2. Design, a neutral fallback for repair steps (confirmed, no lookup to miss): neither report looks repair steps up by transport. Both call sites (InstancesViewport.tsx and RemoteCrewPanel.tsx) pass transportPresentation(inst).method to reportInstanceFailure, which only prints it as the transport: <name> detail line; the repair is chosen from the gateway's diagnosis code and probe chain in that report. So fargate reports transport: fargate, an unmapped outbound reports transport: outbound, and neither can pick up SSH or SSM steps. remoteCrewTransportPresentation.test.ts pins that an unmapped method keeps its own name and never resolves to ssh or ssm. The ssh / ssm wording in that parameter's doc comment in instanceFailureReport.ts is main's, not this PR's.
  3. UX, no screenshot of the transport_hint_unmapped hover title (not needed, pinned instead): it is a native title attribute, which the browser draws outside the page, so a page screenshot cannot show it. Instead, RemoteCrewPanelUnmappedTransport.test.tsx checks that the badge's title and aria-label carry the unmapped hint, and capture-unmapped-transport.mjs fails if the badge title in the captured frames loses the update hint.

So only the r115 question is left: is "never render an unrecognised method as SSH" the whole Goal?

@iamwhatever

Copy link
Copy Markdown
Contributor

Still holding at 025a40e, now for one item only.

Your replies to the three r124 notes hold. reportInstanceFailure only prints the transport as a transport: <name> line, so an unmapped method cannot pick up SSH or SSM repair steps (instanceFailureReport.ts#L104-L131). ## Not a goal now matches remoteCrew.ts#L30-L32. The hover hint is a native title attribute, and it is pinned by a test, which is fine. CI and every lane are green.

What would clear this: a maintainer rules on the r115 question, whether 'never render an unrecognised method as SSH' is the whole Goal. Our earlier change request stays until then.

— crew-pr-reviewer (r125)

The Remote Crew surfaces decided a crew's badge, its hover hint, its
address line and its diagnostics transport with four independent chains
of conditionals whose last arm was `ssh`. Every method those chains did
not name therefore rendered as SSH, silently -- and the surfaces
disagreed with each other, because one tested the shared
`usesSsmTransport` helper while the other compared `=== 'ssm'` inline.

That is not hypothetical: a `fargate` crew's failure report says
`transport: ssh` in InstancesViewport and `transport: ssm` in
RemoteCrewPanel today, for the same failure. The report's repair steps
are keyed by that name, so a fargate crew is handed SSH's repair
ladder.

Introduce one mapping in `utils/remoteCrew.ts` keyed by connection
method, carrying which field addresses the crew and which transport
name the failure report should use, and route all five branch sites
through it. An unrecognised method is now visibly unmapped: no badge
copy (the surface prints the method's own name), no hover hint, no
address field, and a report that names itself instead of inheriting a
sibling's repair steps.

An ABSENT method still means ssh -- `normalizeConnectionMethod` mirrors
the gateway's `(inst.connection_method or "ssh").strip().lower()`.
Conflating absent with unrecognised was the defect; only the second
half changes.

The badge copy lives in `pages/settings/transportCopy.ts` with LITERAL
i18n keys rather than keys read off the mapping: the key-reference
gate can only check a statically resolvable key, and its dynamic-site
baseline is ratchet-down only. The table is typed
`Record<PresentedConnectionMethod, ...>`, so adding a transport without
its copy is a typecheck failure rather than a missing label at runtime.

Implements RFC section 3.9 and the phase 2 dashboard items of
docs/request-for-change/plans/2026-09-23-outbound-instance-transport.md
The gateway-side PeerTransport seam is the phase 2 Python half and
follows separately.
@koenvincent

Copy link
Copy Markdown
Contributor Author

@dwu96 one ruling clears this PR, per r125: is "never render an unrecognised transport method as SSH" the whole Goal?

If yes, the PR is done as is. One table drives every surface, every lane was green on 025a40ed64, and the branch merges cleanly on main today (the 5 fork workflows on the rebased head still need a maintainer approval to run).

If you want more in scope, for example a gateway-side refusal for unmapped methods, say which and I will open a linked issue for it rather than grow this PR.

@koenvincent

Copy link
Copy Markdown
Contributor Author

@dwu96 friendly ping on the one ruling r125 asks for: is "never render an unrecognised transport method as SSH" the whole Goal? On a yes I will rebase once onto main (it has drifted since 11-05) and the PR is done. If you want more in scope, name it and I will track it in a linked issue.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor) merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: action required A blocking check or review needs attention

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants