Repository navigation
Conversation
EhabY
force-pushed
the
fix/vsc-65-deep-link-window-reuse
branch
from
December 1, 2026 11:48
d37bb7f to
fab40dc
Compare
This was referenced Dec 1, 2026
EhabY
force-pushed
the
fix/vsc-65-deep-link-window-reuse
branch
from
December 1, 2026 12:32
fab40dc to
e2b0755
Compare
EhabY
marked this pull request as ready for review
December 1, 2026 12:46
EhabY
force-pushed
the
fix/vsc-65-deep-link-window-reuse
branch
2 times, most recently
from
December 1, 2026 22:07
b08c6b9 to
ec97098
Compare
35C4n0r
pushed a commit
to coder/registry
that referenced
this pull request
Dec 2, 2026
## Description Adds `windowId=_blank` to the `vscode-desktop-core` app link. This makes VS Code and its forks open the link in a fresh window, and on a cold start they skip restoring the previous session, whose remote windows can block and drop the link. Forks without support ignore the param, and the Coder extension ignores unknown params. Templates must update to `vscode-desktop-core` 1.2.2, or a wrapper module that pins it, to get this. - Issue: coder/vscode-coder#1229 - coder/coder PR: coder/coder#32847 - Companion vscode-coder PR: coder/vscode-coder#1234 ## Type of Change - [x] Bug fix ## Module Information **Path:** `registry/coder/modules/vscode-desktop-core` **New version:** `v1.2.2` **Breaking change:** No ## Testing & Validation - [x] Tests pass (`bun test main.test.ts`, `terraform test`) - [x] Code formatted (`prettier --check`, `terraform fmt -check`) <details><summary>Implementation plan</summary> - Append `&windowId=_blank` after `&token=$SESSION_TOKEN` in the `coder_app` URL. The coder/coder session token trust check still passes: every param name is unique, `url` stays a bare origin, and `token=$SESSION_TOKEN` stays a raw entry. - Patch bump to 1.2.2 with `.github/scripts/version-bump.sh patch`. - Wrapper modules (vscode-desktop, cursor, windsurf, kiro, antigravity, devin-desktop, cytoshahar/positron) pin older core versions, so they are unchanged here. Each needs its own pin update and version bump to pick this up. </details> _Generated by Coder Agents on behalf of @EhabY._
35C4n0r
pushed a commit
to coder/registry
that referenced
this pull request
Dec 3, 2026
> **Stacked on #1319: review only the commits after #1319. Merge after #1319 is merged and vscode-desktop-core 1.2.2 is published.** ## Description Follow-up to #1319, same shape as #751. Moves the wrapper modules to `vscode-desktop-core` 1.2.2 so their links carry `windowId=_blank`. - cursor, windsurf, kiro, antigravity: 1.0.2 to 1.2.2, and they now pass `config_dir` (`$HOME/.cursor`, `$HOME/.codeium/windsurf`, `$HOME/.kiro/settings`, `$HOME/.gemini/config`). - vscode-desktop, devin-desktop: 1.2.0 to 1.2.2. - Each module is patch bumped, and the tests now expect `&windowId=_blank`. Why these four were on 1.0.2: core 1.1.0 (#753) made `config_dir` required, and no follow-up migrated them. vscode-desktop and devin-desktop moved to 1.2.0 only for extension pre-install (#1094, #1089). With defaults, 1.0.2 to 1.2.x adds no resources or behavior for these wrappers. Their own MCP scripts stay, and core's `mcp_config` is unused. `cytoshahar/positron` stays on core 1.0.2. Its maintainer can bump it and needs to choose a `config_dir`. ## Found, not fixed here - antigravity's own `mcp` script still writes the legacy `~/.gemini/antigravity/mcp_config.json`. Antigravity's docs now put the global MCP config at `~/.gemini/config/mcp_config.json`. - devin-desktop passes `config_dir = "$HOME/.config/devin"`, but Devin Desktop is the Windsurf rebrand, and its docs point at `~/.codeium/windsurf`. Open PR #1121 also bumps `vscode-desktop-core`, so whichever merges second must re-bump. - Issue: coder/vscode-coder#1229 - Core change: #1319 - coder/coder PR: coder/coder#32847 - Companion vscode-coder PR: coder/vscode-coder#1234 ## Type of Change - [x] Other (dependency update) ## Testing & Validation - [x] `terraform fmt -check` and `prettier --check` pass - [x] With the core pinned to the published 1.2.1: `terraform validate` passes for all six modules - [x] With the core sourced from the #1319 working tree: `terraform test` and `bun test` pass for all six modules - [ ] CI against the published 1.2.2 (fails until #1319 is released) <details><summary>Implementation plan</summary> - Branch from #1319 and add one commit. - In each wrapper's `main.tf`, set the `vscode-desktop-core` pin to `1.2.2`. In the four wrappers that were on 1.0.2, add `config_dir` set to each IDE's documented config folder (for Antigravity, the shared `~/.gemini/config`). - Run `.github/scripts/version-bump.sh patch` against the #1319 branch, so only the six wrappers get a patch bump and their README versions update. - Update the URL assertions in `main.test.ts` (and kiro's `kiro.tftest.hcl`) to expect `&windowId=_blank`. - Verification before 1.2.2 is published: pin 1.2.1 temporarily for `terraform validate`. Point `source` at the local core temporarily for `terraform test` / `bun test`, because 1.2.1 has no `windowId`. - Out of scope: `cytoshahar/positron`. Its maintainer owns the `config_dir` choice. </details> _Generated by Coder Agents on behalf of @EhabY._
EhabY
force-pushed
the
fix/vsc-65-deep-link-window-reuse
branch
from
December 4, 2026 14:41
ec97098 to
7524c29
Compare
This branch has not been deployed
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.
Part of #1229 (VSC-65).
Companion PRs:
Problem
On a cold start, VS Code restores the previous window and sends the dashboard link to it. If that window's workspace is stopped, VS Code holds the link until our "workspace is not running" prompt is answered. If you cancel, the window reloads and the link is lost. The extension never receives the link, so it cannot fix this on its own.
The companion PRs add
windowId=_blankto the links Coder builds. VS Code then opens one empty window for the link and, on a cold start, does not restore the previous session. This PR handles the window behavior that follows from that.Changes
One commit each, so the last one can be dropped on its own:
"Open Without Folder" reuses an empty window. When the "already open in another window" notification shows in a window with no folder, the button uses that window instead of opening another one.
Dev containers share the open path.
openWorkspaceandopenDevContaineruse oneopenRemoteFolderhelper, so dev container links also show the "already open" notification.Close the empty window when the folder is already open elsewhere.
sendPongnow reports the replying window's opened workspace URI: its workspace file, or its single folder. The field is optional, so older versions still work.closeIfOpenElsewhereruns only when this window asked VS Code to reuse it, and closes the window only if the reply lists the exact target URI and nothing is unsaved. In every other case it falls back to today's notification.Why it can't close the wrong window:
windowsMainService.ts). Without a match, VS Code reloads this window and the close never runs.Behavior with old links (no
windowId=_blank)The cold-start bug stays as it is today. Two things change:
With commit 3, there is one more change. If a link opens in an empty window you left untouched, and another window has exactly that folder open, the empty window closes. Today it stays.
Checks
pnpm typecheck,pnpm lint,pnpm format:checkandpnpm test:extensionpass. The suite also passes at commit 2, without commit 3.headers.test.tsfailed once in a full parallel run and passes on its own. It is unrelated to this change. Not tested on desktop VS Code yet.Implementation plan and decisions
Root cause
remote.setupblocks on the modal start prompt.ExtensionUrlHandler.handleURLwaits onextensionService.getExtension, which waits until the remote authority resolves. That waits on our activation.closeRemote(), which reloads the window and loses the held link.Fix
windowId=_blankonly where Coder builds the link, with no generic link matching:getVSCodeHref, the dev container button, and the twocoder open vscodelink builders;vscode-desktop-core, which every editor module uses.coder_appURLs, keep today's behavior until they're updated.Behavior after all PRs
Decisions
Generated by Coder Agents on behalf of @EhabY.