Skip to content

fix(dashboard): open remote-editor links as a file, not a folder - #39642

Merged
bolichen97 merged 1 commit into
kirodotdev:mainfrom
helenastafford:fix/remote-editor-file-line
Nov 20, 2026
Merged

bolichen97 merged 1 commit into
kirodotdev:mainfrom
helenastafford:fix/remote-editor-file-line

Conversation

@helenastafford

@helenastafford helenastafford commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: The side panel's "Open in VS Code" row opens the file itself in the viewer's local VS Code, instead of an empty remote workspace.

With Settings → Display → Remote editor set to VS Code and an SSH host, ⋯ → Open in VS Code launches VS Code, connects to the host, and shows no file. The link is vscode://vscode-remote/ssh-remote+<host><path>, and VS Code's protocol handler reads an ssh-remote path with no :<line> suffix as a folder (getWindowOpenableFromProtocolUrl in src/vs/code/electron-main/app.ts returns folderUri unless the path is a .code-workspace or ends in :<line>[:<col>]).

Why it matters

The row's only job is to open the file, and today it fails on every click for everyone who turns the setting on.

Not a goal

What changed (motivation → approach → change)

Symptom: the link opens the path as a folder. Cause: no :<line> suffix, so VS Code picks folderUri. Change: remoteEditorUrl ends every link in :1. Its one caller (the Markdown panel ⋯ menu) only links files. VS Code opens protocol links with gotoLineMode: true, so it strips the :1 with parseLineAndColumnAware and opens the file at line 1. The desktop app's editor-link check (EDITOR_LINK_RE in website/electron/external-scheme.js) already accepts up to two :<n> suffixes, so it needs no change.

One limit stays: parseLineAndColumnAware drops every all-digit :-segment of the decoded path, so a file whose name has one (run-12:30:05.log) still opens the wrong path. No link shape avoids that, and those files opened as a folder before too.

The feature map, the dashboard module spec and the REMOTE_EDITOR_IDS comment in src/kiro_crew/config/sections_dashboard.py describe the link shape; each now shows the :1. The config change is that comment only.

Backwards compatibility

Compatible: only the generated href gains a :1; no config key, schema or API changes.

Removes nothing: the row, its gating and its path checks are unchanged.

Tests

website/src/test/MarkdownPanel.remoteEditor.test.tsx: the ⋯ menu row's href and the direct remoteEditorUrl case now expect the trailing :1, so a link without it fails.

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

By hand: with remoteEditorUrl.ts restored to main 98a7d29, both changed tests fail (2 failed, 5 passed); on head 1659c2d the file passes 7/7.

Manual verification

Pasting the before and after links into a Mac browser with VS Code + Remote-SSH: without :1 VS Code opens a remote window with the file's path as its (empty) workspace; with :1 it opens the file.

Real-machine verification

Machine: MacBook (macOS, arm64) running VS Code with Remote-SSH, dashboard served from an AL2023 x86_64 cloud desktop gateway
Before (main 98a7d29, installed 0.13.0.4 build): ⋯ → Open in VS Code -> VS Code connects to the host and opens no file
After (head 1659c2d): vscode://vscode-remote/ssh-remote+<host>/<abs path to an existing file>:1, clicked from the Mac -> VS Code connects to the host and opens the file with its contents
Cleanup: own computer

Screenshots / video

Why no screenshot: the menu row looks the same; only its link target changes.

Related Issues

Part of #38284

Sibling sweep

Swept: git grep -n 'ssh-remote+' -- website/src src docs
Sibling: website/electron/external-scheme.js -- not affected -- it validates links and already allows a : suffix
Sibling: website/src/utils/urlTransform.ts -- not affected -- passes through links a user wrote, which keep their own suffix

Pattern harvest

Not generalizable: one link builder targets one editor's URL handler; there is no second builder of this link.

Checklist

  • A Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...); PR Hygiene does not count commits
  • 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

VS Code reads a vscode://vscode-remote/ssh-remote+<host><path> link
with no :<line> suffix as a folder, so Open in VS Code opened an empty
remote workspace instead of the file. End the link in :1; the editor
strips it and opens the file at line 1.
@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 Nov 19, 2026
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — ✅ no blocking findings

Reviewed 1659c2d29ff7318ef64ca1dc0bc03550fe6afd8d via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 1659c2d

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review (fork) — ✅ no blocking findings

Reviewed 1659c2d29ff7318ef64ca1dc0bc03550fe6afd8d via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 1659c2d

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 19, 2026
@bolichen97 bolichen97 closed this Nov 20, 2026
@bolichen97 bolichen97 reopened this Nov 20, 2026
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention 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 labels Nov 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — ✅ PASS

UX-level review of 1659c2d29ff7318ef64ca1dc0bc03550fe6afd8d via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing to check. The PR changes only the "Open in VS Code" row's link target (remoteEditorUrl now ends in :1). It adds or changes no visible control, label or state, so there are no evidence gaps.

[UX-REVIEWED] 1659c2d

Description read

[DESCRIPTION-READ] 7d6ed33bbfa4f686fc3f33bfe9c310f5413479f6c46b7c7f98b2d3929234c31a

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

First Principles Review (Opus 5.5, fork) — ✅ PASS

Premise-level review of 1659c2d29ff7318ef64ca1dc0bc03550fe6afd8d via the fork AI-review pipeline — 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 to check.

What this change ships

Inventory (3 items) — 3 justified

Intent: make the side panel's "Open in VS Code" row open the file itself on the remote host, not an empty remote workspace. This is a FIX.

  1. Clicking ⋯ → Open in VS Code now opens the file (the link ends in :1) instead of an empty remote folder: justified
  2. The feature map and the dashboard spec now show the :1 link shape: justified
  3. The REMOTE_EDITOR_IDS comment in sections_dashboard.py now shows the :1 link shape: justified

[FIRST-PRINCIPLES-REVIEWED] 1659c2d

Description read

[DESCRIPTION-READ] 760358051b250ca2a45785baea933785ca89728f7e0b9bad3316881bd05668d6

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, fork) — ✅ PASS

Design-level review of 1659c2d29ff7318ef64ca1dc0bc03550fe6afd8d via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: this is a one-line fix in the only link builder, and the desktop app's link check already accepts the :1 suffix.

Notes

[DESIGN-REVIEWED] 1659c2d

Description read

[DESCRIPTION-READ] c56900f20ff58cf857e8b6e62d0511f62da4099a29e76a42e1af88f9e0f7d1d4

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 added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 20, 2026

@bolichen97 bolichen97 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.

Approved on head 1659c2d29f.

Appending :1 to the vscode-remote link is the smallest fix for #38284: without a :<line> VS Code reads an ssh-remote path as a folder and opens an empty workspace, and the editor strips the suffix before opening the file. The desktop's editor-link check already accepts an optional :line[:col], so the link still passes it. Tests pin the new suffix. Readiness passed.

Thanks, Helena!

AI-assisted, sent by Bolin Review bot

@bolichen97
bolichen97 merged commit 9bad2b1 into kirodotdev:main Nov 20, 2026
136 of 137 checks passed
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 20, 2026
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)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants