Skip to content

fix: ask before an editor link opens a file on another machine - #39472

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
fix/38570-share-link-remember
Nov 19, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
fix/38570-share-link-remember

Conversation

@bolichen97

@bolichen97 bolichen97 commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: In the desktop app, a "Don't ask again" choice made for an editor link to a file on this computer no longer opens an editor link to a file on another machine's network share without asking.

After someone ticks "Don't ask again" on an ordinary editor link, a later editor link that names a file on another machine's share opens with no prompt. The dialog promises "this machine", and the remembered choice reaches a different one.

Why it matters

A person who chose not to be asked again about their own files should still see, and agree to, every link that opens a file on someone else's machine. Today one tick on a local link silently covers those links for the rest of the session.

Not a goal

What changed (motivation → approach → change)

The desktop app remembers "Don't ask again" per editor and per machine, but it filed a link to another machine's share under the same entry as local files. A share link is now remembered on its own, for that one path. A choice made for local files, an SSH host or a different share therefore never opens it without asking, and ticking the box on a share link skips the prompt only for that same file. Local files, drive-letter paths and SSH hosts keep their current behaviour. The change is in the desktop app (website/electron), and the computer-use spec states the share rule next to the existing one.

Backwards compatibility

Compatible: every editor link that opened before still opens. A link whose path starts with two slashes, on any platform, may ask once more per path where it used to open silently.

Removes nothing: no link is refused, and no stored setting changes (the choice lives in memory until the app quits).

Tests

One desktop-app test drives the app's link handling with a dialog that answers "Open" and "Don't ask again": after a local-file choice, a drive-letter path stays covered, a share link asks, the same share path then opens without asking, and a second path on that share asks again. It fails on the parent commit, where the share links open with no prompt, and passes with the fix. The existing local, drive-letter and SSH-host cases are unchanged.

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

Manual verification

Reproduced with the reporter's recorder harness (no link is really opened and no share is contacted): on the parent commit the share link opens with no prompt after a remembered local choice; with the fix it prompts first.

Run three times each on a clean Linux machine (Ubuntu 24.04.5 LTS, Node v24.22.3), with the same result every run:

  • Local link remembered, then a share link: the parent commit asks once and opens both links; the fix asks twice, once per link, and opens both.
  • A share link on its own: asks once and opens after Open, on both commits.
  • Ordinary local and SSH-host links: two prompts and four links opened, the same on both commits.

Real-machine verification

Machine: EC2 m7i.2xlarge, Ubuntu 24.04.5 LTS x86_64, 8 vCPU / 32 GiB, Node v24.22.3
Before (main dc531c1): node harness.cjs website/electron/external-scheme.js -> after a remembered local choice the share link opens with no prompt (1 prompt, both links opened), 3 of 3 runs; the new test fails
After (head 74ebb4d): node harness.cjs website/electron/external-scheme.js -> the share link asks before it opens (2 prompts, both links opened), 3 of 3 runs; local and SSH-host links unchanged (2 prompts, 4 links opened); the desktop-app test file passes 49/49 in 5 repeats and 3 random orders
Cleanup: disposable instance with no inbound rules and no key pair, terminated by its pool's idle reaper after the run; the harness opens nothing (a recorder stands in for the OS opener)

Related Issues

Closes #38570

Sibling sweep

Siblings: none -- the desktop app remembers this choice in one place only

Pattern harvest

Not generalizable: the desktop app has one remembered consent, keyed in one place, and this fix is to that key

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

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 74ebb4d773f2c46c8cf1981613395af8974f465c — 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: this is one fix to the one key that remembers the choice. The defect has an issue (#38570) and a test that fails on base.

What this change ships

Inventory (3 items) — 3 justified

Intent: in the desktop app, a "Don't ask again" choice made for local files should stop covering editor links that open a file on another machine's share. FIX.

  1. After a remembered local choice, an editor link to another machine's share now asks before opening — justified
  2. Ticking "Don't ask again" on a share link now skips the prompt only for that same path, not the whole share — justified
  3. The computer-use spec now states the share rule beside the existing remember rule — justified

[FIRST-PRINCIPLES-REVIEWED] 74ebb4d

Description read

[DESCRIPTION-READ] 85a06c5899bdc461c1b468f70879bee4a494e19731da9cb06b8c571980d37993

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 19, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

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

UX-Verdict: PASS

Nothing blocks: the diff changes no dialog, label or control. It only changes when the existing editor-link dialog appears, so no screenshot is needed and the missing blind read leaves no gap.

Notes

  • window-lifecycle.js:638: on a link to a network share, the checkbox "Don't ask again for this machine until Kiro Crew quits" now promises more than it does, because ticking it covers only that one file. Other files on the same share will still prompt. Show a share-specific label when the link points to a share, e.g. "Don't ask again for this file until Kiro Crew quits".

[UX-REVIEWED] 74ebb4d

Description read

[DESCRIPTION-READ] 130a18437125d95dd1709beb7f41af18144969ae39c512fe0692452724c9c2fe

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

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks: the fix changes the one place the choice is remembered, it can only add prompts, and the choice is never written to disk.

[DESIGN-REVIEWED] 74ebb4d

Description read

[DESCRIPTION-READ] 069b6c80931fee2e69389e114bca60b25f80a9613b28a90fbb81d378be339cc7

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 19, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 74ebb4d773f2c46c8cf1981613395af8974f465c — this comment is updated in place on each push.

Review details

No findings.

Notes:

  • The "Don't ask again for this machine" checkbox label in website/electron/window-lifecycle.js now remembers share links for one path only. It errs safe because it asks more often, never less, and the spec documents the per-path behaviour. If you want the label to match exactly, that's a wording change.

[OPUS-REVIEWED] 74ebb4d

Verdict parsed from the review's SHA-scoped output markers for commit 74ebb4d773f2c46c8cf1981613395af8974f465c.

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

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 74ebb4d773f2c46c8cf1981613395af8974f465c and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 74ebb4d

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

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 19, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in website/electron/window-lifecycle.js, other website/electron files and docs/system-specs/modules/ files beside this PR's (none of this PR's own files) since this head's CI ran (433d99b -> dc531c1); CI re-running.

The red Backend Tests (3.12, 7) on the previous head, and the Coverage Gate that failed closed on it, was a test-order leak on main in test_case_variants_collapse_to_one_chip (#39460). Its fix, #39470, is on the new base. The rebase applied without a conflict and the change itself is unchanged.

[operator: bolichen97]

@bolichen97
bolichen97 force-pushed the fix/38570-share-link-remember branch from d85a385 to 74ebb4d Compare November 19, 2026 20:15
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 19, 2026

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

I reviewed head 74ebb4d. A share link (a local editor link whose decoded path starts with two slashes and has no drive letter) now gets its own remembered key, so a "Don't ask again" choice made for local files or an SSH host no longer opens it without a prompt. I ran the desktop-app test file on this head and all 49 tests pass. The new test fails when the base version of the module is swapped in, so it really pins the fix. I also checked the encoded and repeated-slash forms of share links. All of them prompt, and the share key cannot collide with a local or host key. The change can only add prompts, never remove one, so nothing blocks.

@KiroCrewCaptain
KiroCrewCaptain merged commit 69693c5 into main Nov 19, 2026
100 of 102 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the fix/38570-share-link-remember branch November 19, 2026 23:55
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: A person should decide

Why: the decider estimates a 7% chance that this change introduces a defect, within the 12% limit for approving on its own, but it is held at tier 2: reviewer-finding: Design Review.

I'd approve this. The fix does what the PR says, it can only add prompts, and it comes with a test that would fail without it.

What changed. The PR adds a capture group for the drive letter to EDITOR_LINK_RE. A share link is a local link with no drive letter whose decoded path starts with //. For those links only, editorTargetKey builds the remembered key from the decoded path instead of the host.

Remembered choices. The set of remembered choices has one writer and one reader, both in createWindowOpenHandler. It lives in memory only, is shared across windows, and is created once in window-lifecycle.js. The three key forms can't collide:

  • local files: scheme (the editor name and a space)
  • SSH hosts: scheme host, where the host must pass HOSTNAME_RE, which allows no /
  • shares: scheme //...

Edge cases checked.

  • A percent-encoded / (%2F) that decodes to // is still treated as a share and asks.
  • Backslashes, plain or encoded, are still refused by the existing check.
  • A drive letter followed by // stays local. On Windows that path is drive-relative, not a network share, so this is correct.
  • A :line:col suffix is not part of the key, so

Tier: 2, held for a person: reviewer-finding: Design Review.

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

@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 19, 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.

Desktop app on Windows: a remembered "Don't ask again" for local editor links also opens a vscode://file//<host>/<share>/ link with no prompt

2 participants