Repository navigation
feat(dashboard): open remote files in a local editor via ssh links - #19557
helenastafford wants to merge 2 commits into
Conversation
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the feature is opt-in and off by default, it clamps both new values on the server before the browser builds a link, and it removes nothing. Notes
[DESIGN-REVIEWED] 6c46613 Description read[DESCRIPTION-READ] c196385481e30d94ddeeb893fd2c7fe1e0ac9eccec35805753d2fc3971f02829 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, fork) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. This fork lane has no blind read, so nobody new to the controls has read the menu row or the settings pane. Pushing the branch to this repository runs that read. Notes
[UX-REVIEWED] 6c46613 Description read[DESCRIPTION-READ] 4f50c6d7896e23aea12709b4346698d38512e402886c550507301064cb6bd60c That sha256 names everything this verdict read: the PR description, plus the 19 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 |
First Principles Review (Opus 5.5, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Opt-in addition, off by default. Every item ties to the stated remote-gateway dead end, and nothing in the base repo already builds this link. What this change shipsInventory (9 items) — 9 justifiedIntent: let someone using a dashboard on a remote or headless gateway open a file or folder from a path chip in their own local VS Code or Kiro, over their own SSH session. This is an ADDITION.
[FIRST-PRINCIPLES-REVIEWED] 6c46613 Description read[DESCRIPTION-READ] 0896c280d725e09fff6d5f231769d43199282a6eb925b708d8acf6a923f64df1 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
GPT 6.1 Review (fork) — ✅ no blocking findings (all downgraded on adjudication)Reviewed Opus 5.5 adjudication downgraded every blocking finding. Downgraded: the remedy each one needs is disproportionate to the harm it prevents. Adjudication downgraded all 1 blocking finding(s): the remedy each one requires is disproportionate to the harm it prevents. Review detailsBLOCKING -- website/src/hooks/useBranding.tsx:36 -- Remote-editor links retain an obsolete SSH destination
Adjudication (Opus 5.5) — is blocking on each finding proportionate?F1 — LOW. Every condition must hold at once: two tabs are open, the SSH host is changed in one, and the other tab is used without a reload. Branding is cached forever at |
6c87f5f to
d9d96af
Compare
|
self-added: yes
|
|
|
|
|
|
d9d96af to
36f299a
Compare
|
self-added: yes
|
|
self-added: yes
|
|
self-added: yes
|
|
|
e70fdb0 to
e81a236
Compare
e81a236 to
ffcbc2f
Compare
|
span=c64d27627a62
|
|
span=0e4c72dbcafa
|
|
span=36722ff6f0b6
|
|
Maintainer decision needed: keep or drop the
The UX lane is at CONCERNS only because this fork lane has no blind first-time read; each of its items is answered above. |
|
Stewarding review for #11338 (open remote files in a local editor via I reviewed this PR as part of the T1/T2 sweep. Summary: the implementation is correct and the security design is sound, but this cannot be merged from here — it is a fork PR, currently CONFLICTING against State
Security review (the link-injection surface)The
Tests back this: Scope noteThe issue text floated RecommendationCorrect, well-tested, security-sound. Blocked on two human actions: (1) author rebases onto current |
…inks (kirodotdev#11338) Adds dashboard.remote_editor.editor (vscode/kiro, empty = off) and a charset-clamped dashboard.remote_editor.host, exposed through the branding payload. FilePathMenu, MarkdownPanel and FileViewer gain an "Open in <editor>" row once both are set, building vscode-remote ssh-remote+<host><absolute path> links so edits ride the user's own SSH credentials. The row is not gated on direct_local, which reads true through an ssh -L forward. Settings > Display gains a Remote editor pane that says when a host is still needed. After a click the row stays open and reads "Sent to <editor>" with a hint, since a custom-scheme handoff reports nothing back. A path that cannot be URI-encoded (a lone surrogate from a non-UTF-8 name) hides the row. Closes kirodotdev#11338
…nu row
- capture-remote-editor-settings.mjs drives the real built SPA against the
shared stub and shoots Settings > Display > Remote editor in its off,
configured, host-missing, save-failed, side-rail and light-parity states.
- capture/remote-editor-menu.{html,tsx} + capture-remote-editor-menu.mjs mount
the real MarkdownRenderer + FilePathMenu inside the real BrandingProvider
with only the transport stubbed, including a directory chip, the
sent-hint row, and the MarkdownPanel and FileViewer overflow menus.
ffcbc2f to
6c46613
Compare
|
Rebased onto main
Local: PR backend suites (448 passed), all generated-file / facade / size-cap suites (9089 passed), FilePathMenu + DisplayPanel remote-editor vitest (49 passed), related vitest (2338 passed), The open question above is unchanged: a maintainer still needs to keep or drop the |
Security Scope Review (fork) — 🔴 BLOCK (blocking)Which legitimate operations does the review scope was never resolved: the generate job did not finish (it timed out, failed or was cancelled), so no leg ran; its log names the step that stopped No |
|
[operator: bolichen97] Continuing this in #31141; thanks for the start. |
Problem / Motivation
Goal: From a dashboard on a remote or headless gateway, open any file-path chip in your own local VS Code or Kiro, editing the remote file over your own SSH session.
When the gateway runs on a remote host (cloud desktop, EC2) and you use the dashboard from a laptop, the file-path menus have no working "open in an editor" action. Open with default app and Reveal shell out on the gateway host, which has no desktop, and the Electron Open in editor bridge targets the laptop's filesystem, where the file does not exist. Every file-open affordance dead-ends at Copy path, so editing a file the agent cannot write (trust-root config such as
config.jsonor.env) means opening a terminal and an SSH session by hand.This replaces #11345, whose head branch can no longer be updated by its author (see Related Issues).
Why it matters
Running the gateway on a cloud desktop and the dashboard on a laptop is a common setup, and it is where you most need an editor for the files the agent and the read-only Files app cannot touch. Today that is a terminal context switch every time.
Not a goal
~or relative paths into absolute ones. The row is offered only for absolute paths; relative and~chips keep their current menu.vscode-remoteSSH authority are offered.config.jsonbecause the common setup is one person reaching one gateway from one machine, and gateway config is what the agent, every tab and the branding clamp already read. The host help text states the constraint (an alias must exist on every machine that opens the dashboard); per-browser preferences can follow if a multi-machine user asks.openExternalpermission and has no URL-launch bridge for these schemes, and a framed pane's CSP refuses the navigation too, so the row is hidden there rather than shown as a dead click. Browser tabs, the main remote setup, are unaffected.What changed (motivation → approach → change)
VS Code-family editors accept a remote authority in their URL scheme:
vscode://vscode-remote/ssh-remote+<host><path>launches the user's local editor, which connects over the user's own SSH credentials and opens the remote file with full edit rights. KiroCrew grants nothing new; the browser only lacks the SSH authority for the gateway host, so this adds two opt-in settings and one menu row.dashboard.remote_editor.editor: an enum (""off,vscode,kiro), not a free string, because the value becomes a clickable custom-scheme URL.dashboard.remote_editor.host: restricted to^[A-Za-z0-9._@+-]*$so it cannot inject path, query or authority structure into the URL./api/dashboard/brandingreturnsremote_editor {editor, host}and clamps both: an unknown editor or an unclean host becomes""before it reaches the client. The frontend also only builds URLs for editor ids it knows.FilePathMenu, plus the MarkdownPanel and FileViewer overflow menus that share its hooks, gain an Open in row whenever both settings are set, placed with the other editor launches. Directories are allowed (avscode-remoteauthority opens a directory as a remote workspace); relative paths and paths with a.or..segment are refused so neither can graft onto or pop the host segment (URL parsing removes dot segments), and a path that cannot be URI-encoded (a lone surrogate from a non-UTF-8 filename) hides the row instead of throwing during render.role="status"live region for screen readers. The row is hidden inside an embedded instance pane, where the frame's CSP would refuse the navigation. The Files viewer's ⋯ menu gains anonOpenChangeto clear that hint on close, so it now passesguideProbeexplicitly to keep the in-app guide able to open the menu (the wrapper turns the probe off whenever something listens to open).direct_local. A browser on anssh -Lport forward reaches the gateway on loopback and reads as direct-local, which would hide the row in the main setup it exists for. Configuring an SSH host is the user's statement that the gateway is remote, and on a genuinely local session the link still works.src/kiro_crew/config/sections.py,src/kiro_crew/config/loader.py,config-baseline.json,src/kiro_crew/change_card_catalog.py(editor classed cannot-widen; host classedcode_execlikedashboard.terminal.shell, since it picks where the user's editor presents their SSH keys)src/kiro_crew/dashboard/handlers/core.py,website/src/api/client/themes.ts,website/src/hooks/useBranding.tsxwebsite/src/components/FilePathMenu.tsx,website/src/components/MarkdownPanel.tsx,website/src/apps/file-explorer/FileViewer.tsxwebsite/src/pages/settings/DisplayPanel.tsx,website/src/i18n/(all locales,en.context.json)website/scripts/capture-remote-editor-menu.mjs,website/scripts/capture-remote-editor-settings.mjs,website/capture/remote-editor-menu.{html,tsx}(the shots are PR attachments, not committed)src/kiro_crew/docs/settings-registry.generated.json,src/kiro_crew/docs/ui-index.generated.json,website/src/components/commandPalette/settingsRegistry.gen.ts<editor>Backwards compatibility
Compatible: both keys are new and optional, default to off, and no existing key, route field or menu row changes meaning.
Removes nothing: the diff only adds two config keys, one branding field, one menu row and one settings pane.
Tests
test/test_config_patch.py::TestRemoteEditor: the editor enum accepts each valid value and""and rejects unknowns; the host accepts hostnames and aliases and rejects/ : ? #, whitespace and over-length values; the two sub-keys nest without clobbering each other.test/test_change_card_setting_classes.py: a change card fordashboard.remote_editor.hostcarries thecode_execrisk and one for the editor staysnormal, with the class membership pinned.test/test_config_schema.py: both keys flatten into first-class schema entries carrying the enum and the host pattern.test/test_dashboard_branding.py: off by default, forwards a configured pair, clamps an unknown editor and a dirty host to"".website/src/test/FilePathMenu.test.tsx: the row shows with editor and host set, including on a direct-local session; it is labelled per editor, grouped with the editor launches, hidden when either setting is empty, the path is unencodable (Copy path stays) or the dashboard is an embedded pane or the Electron app, shown for a directory, and routes the exact URL on select. A click keeps the menu open and swaps the label to the sent hint, which stays past any delay and resets once the menu closes and reopens; the same hint reaches a politerole="status"region.remoteEditorUrlunit tests cover URL shape, per-editor scheme, segment encoding, unknown editors, relative paths, dot segments (including a..path that would otherwise pop the host), dotted names that stay allowed, and lone surrogates.website/src/test/DisplayPanel.remoteEditor.test.tsx: the pane renders, PATCHes the nested key, queues a second editor PATCH (paused in the mutation cache) until the first settles, which fails without the mutation scope, renders non-string and unknown server values as off/empty, shows the missing-host hint only when an editor is set without a host, and names the host format rule only on a 400 (a 500 shows the plain notice).Manual verification
From a macOS client,
code --remote ssh-remote+<cloud-desktop-fqdn> <path>(the command the row's URL triggers) opened the gateway host's config file in local VS Code over the user's SSH session, and edits saved back to the remote host. For Kiro: its bundledproduct.jsondeclares"urlProtocol": "kiro", and the gateway host used for testing carries a~/.kiro-serverinstall left by Kiro's remote-SSH connection, so Kiro does reach this host over SSH. Neither proves thekiro://vscode-remote/ssh-remote+…link itself opens Kiro, and clicking the row in a live remote session (VS Code or Kiro) is still to do.Screenshots / video
Reproducible with
node website/scripts/capture-remote-editor-settings.mjs(built SPA plus the shared API stub) andnode website/scripts/capture-remote-editor-menu.mjsagainst a vite dev server (the realMarkdownRenderer,FilePathMenu,MarkdownPanelandFileViewerinside the realBrandingProvider, only the transport stubbed). Each harness asserts the content and applied theme before shooting. The shots are GitHub attachments, not committed files.Settings → Display → Remote editor, configured:
File chip menu on a remote session, and the same row right after a click:
Every other state: the two ⋯ menus and their sent hint, both save errors, the missing-host hint, the rail, ssh -L forward, directory chip, off state and light theme
Related Issues
Fixes #11338
Supersedes #11345 (same change, rebased onto current main and redesigned for the
ssh -Lcase and the split Display settings; the original head branch lives in kirodotdev/KiroCrew, where the author no longer has push access).Related: #9411 (remote path-chip actions fail silently)
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)i18n notes
The new
settings.display.remoteEditor.*keys are translated across all locales; editor names are interpolated, never translated.Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.