Repository navigation
feat(dashboard): open a side-panel file in the attached Kiro window - #33953
Closed
jcjaskula-aws wants to merge 1 commit into
Closed
jcjaskula-aws wants to merge 1 commit into
jcjaskula-aws wants to merge 1 commit into
Conversation
jcjaskula-aws
requested review from
a team and
KiroCrewCaptain
as code owners
November 9, 2026 15:59
jcjaskula-aws
force-pushed
the
feat/open-in-attached-window-main
branch
from
November 10, 2026 02:26
809c694 to
a923b92
Compare
jcjaskula-aws
force-pushed
the
feat/open-in-attached-window-main
branch
from
November 12, 2026 02:20
a923b92 to
e7380bd
Compare
The Markdown panel's "Open in <editor>" link needs `dashboard.remote_editor.editor` and `.host` set, even when a Kiro window is already attached to the gateway host over Remote-SSH. The gateway can open the file through that window's remote CLI (its IPC socket on the host) instead: no setting, and the SSH authority is always the one already in use. * Branding reports `editor_available`, from a connect() probe of the live sockets run in a worker thread. * `/api/reveal` action=editor runs the CLI. It does not sit behind the direct-local gate, since the window it drives is on the caller's desk. * The path is anchored first (`~` against home, a relative path against the project directory, an unanchorable one a coded 400) and the sensitive-path screen runs again on the resolved form: `.ssh/id_rsa` passes as written and names a key once anchored. The CLI would otherwise resolve a relative path against the gateway's working directory. * The Markdown panel's ⋯ menu offers "Open in Kiro" while a window is attached, in place of the configured link, which stays the fallback when none is. Like the link, it is offered in that menu only, not in path chips, whose path may name a file in a session environment. The editor command is fixed, so no config write can choose what the gateway runs. No new translation keys.
jcjaskula-aws
force-pushed
the
feat/open-in-attached-window-main
branch
from
November 17, 2026 03:21
e7380bd to
ab0d16e
Compare
Contributor
Author
|
Closing: opening a side-panel file in the attached Kiro window will live in an installable app for now rather than in core. The link fix and the Kiro editor option continue in #38292. |
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem / Motivation
Goal: When a Kiro window is already attached to the gateway host over Remote-SSH, a file shown in the side panel opens in that window with one click and no setting.
The Markdown panel's ⋯ menu offers "Open in VS Code" for a gateway on another machine, but only once Settings → Display → Remote editor names an editor and an SSH host. A user who already has a Kiro window connected to the gateway host over Remote-SSH, the usual way to work on a cloud dev box, has to configure a host alias that must also exist on every machine they browse from, and the file then opens in a second remote window instead of the one they are working in.
Why it matters
The attached window is already connected to the right host with the right SSH authority, so asking the user to describe that connection again is a setup step with nothing to gain. Opening the file in the window they are working in keeps one editor session instead of two.
Not a goal
What changed (motivation → approach → change)
A Kiro window attached over Remote-SSH leaves a remote CLI on the gateway host that talks to the window over an IPC socket. The gateway can run that CLI, so the open needs no setting and always uses the SSH connection already in place. That beats extending the link: a link opens a new window and needs a host alias the gateway cannot know.
editor_available: whether a live socket accepts aconnect()(external_editor.py, run in a worker thread)./api/revealtakesaction: "editor"and runs the window's remote CLI. It is not behind the direct-local gate, since the window is on the caller's desk.~expands against home and a relative path joins the project directory before the CLI sees it, and the sensitive-path check runs again on that resolved path:.ssh/id_rsapasses as written and names a key once anchored. No project directory for a relative path is a400 path_unresolved. No window is a503, a failed CLI a502.MarkdownPanelHeader.tsx). A failure reports through the panel's existing error notice.useBranding.tsxcarrieseditorAvailable, and the API client types (api/client/themes.ts,api/client/files.ts) gain the field and the action. The reveal handler's two helpers live infile_api/desktop.pyand are bound in thehandlers/files.pyfacade, which owner code runs on. The spec's Reveal and new Attached editor window paragraphs and the feature map describe the action and the row. No new translation keys: the row reusesopen_in_remote_editorwith "Kiro".Backwards compatibility
Compatible: every request
/api/revealaccepts today behaves as before, and the branding field is new and optional.Reader: website/src/components/MarkdownPanelHeader.tsx:OverflowMenu -- chat -- the "Open in VS Code" link is hidden only while
editor_availableis true and renders unchanged otherwise | MarkdownPanel.remoteEditor.test.tsx "replaces the configured link while a window is attached" and the existing "Open in VS Code" testsTests
test_external_editor.py: socket probe, CLI discovery,resolve_targetfor absolute,~, relative, unknown-user and stale-project-dir paths, and the fixed argv.test_reveal_path.py:action=editoropens and audits, serves a tunnelled caller, refuses sensitive and traversal paths before any spawn, maps no window to 503 and a CLI failure to 502, anchors a relative path, refuses one with no project directory, and screens the resolved path.test_dashboard_branding.py:editor_availablereaches the payload.MarkdownPanel.remoteEditor.test.tsx: the row postsaction=editor, replaces the link while attached, needs no setting, reports a failure throughonError, and is absent from the path chip menu.Locally: those four Python files plus the facade-mirror guards, 150 passed; 195 frontend suites that use branding or reveal, all passed; tsc, eslint, mypy, flake8 and isort clean.
Manual verification
Earlier revisions of this change were run end to end on a headless Linux gateway reached through
ssh -L, with a Kiro window attached over Remote-SSH: the file opened in that window. This revision moves the row to the side panel menu and has not been clicked through yet.Screenshots / video
The side panel ⋯ menu with a Kiro window attached ("Open in Kiro") and without one ("Open in VS Code"): to be added in the description.
Related Issues
Closes #38285
Part of #11338
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)