Skip to content

fix(vscode-desktop-core): open links in a new VS Code window - #1319

Merged
35C4n0r merged 2 commits into
coder:mainfrom
EhabY:fix/vsc-65-vscode-links-new-window
Dec 2, 2026
Merged

35C4n0r merged 2 commits into
coder:mainfrom
EhabY:fix/vsc-65-vscode-links-new-window

Conversation

@EhabY

@EhabY EhabY commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

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.

Type of Change

  • Bug fix

Module Information

Path: registry/coder/modules/vscode-desktop-core
New version: v1.2.2
Breaking change: No

Testing & Validation

  • Tests pass (bun test main.test.ts, terraform test)
  • Code formatted (prettier --check, terraform fmt -check)
Implementation plan
  • 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.

Generated by Coder Agents on behalf of @EhabY.

@35C4n0r
35C4n0r enabled auto-merge (squash) December 2, 2026 16:01
@35C4n0r
35C4n0r merged commit 650eac9 into coder:main Dec 2, 2026
8 checks passed
35C4n0r pushed a commit 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._
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.

2 participants