Skip to content

Open a workspace as spin+<workspace> when Spinbox's own resolver is active - #25

Merged
aledbf merged 2 commits into
mainfrom
resolver-open
Nov 12, 2026
Merged

aledbf merged 2 commits into
mainfrom
resolver-open

Conversation

@aledbf

@aledbf aledbf commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Part of #24.

Opening a workspace (the command, the tree's action, a vscode://spin-stack.spinbox/open link) now asks first whether spin-stack.open-remote-ssh's spin+<workspace> resolver is there and active:

  • Detected, not assumed (src/remote/resolver.ts): the extension is installed, the build activates on onResolveRemoteAuthority:spin, and its activation goes through. Without the proposed API, VS Code throws from registerRemoteAuthorityResolver and the activation rejects, so activating it is the check.
  • Active: spin code runs as before (start, server prepared, progress), and its folder vscode-remote://ssh-remote+spin.<ws><path> opens as vscode-remote://spin+<ws><path>. The "VS Code downloads its own server" warning is not shown there, since the resolver refuses instead and says what to do. The status bar reads the spin remote too.
  • Otherwise: Remote-SSH as before, and Spinbox says once per reason (not installed / not allowed the proposed API) how to get the better path, with the exact line "enable-proposed-api": ["spin-stack.open-remote-ssh"] and a button that runs Preferences: Configure Runtime Arguments.

Why no extensionDependencies

A dependency that fails to activate keeps its dependent from activating. On VS Code stable without the argv.json line, open-remote-ssh's activation throws, so a hard dependency would leave Spinbox not activating at all, Remote-SSH fallback included. The same holds on VSCodium: its product.json allows jeanp413.open-remote-ssh, not spin-stack.open-remote-ssh. Checked with VS Code 1.145.2: code --install-extension of a VSIX whose dependency is in no gallery reports success and installs nothing else. So the dependency is checked at runtime, and the README says how to enable it.

Tests

  • Unit: detection (active, missing, a build without spin+, activation refused), both open paths, the URI rewrite, the fallback message: exact line, told once per reason, and the button. Planted bugs (routing a refused activation to spin, skipping the spin+ event check, telling every time, opening the ssh URI on the spin path, warning on the spin path, status ignoring spin) each turned a test red, then were reverted.
  • Integration: VS Code stable runs three times. At engines.vscode (1.120.0), alone, detection says missing. At versions.yaml's new vscode pin (1.145.2), with a stand-in resolver in test/integration/testdata/resolver/, it says disabled without the flag and spin with --enable-proposed-api spin-stack.open-remote-ssh, which is what argv.json's line gives. This is the "to verify on stable" from Spinbox opens workspaces through a remote resolver of its own, so a connection's failures are ours to see and fix #24's Limit.

Found on the way: 1.120 does not withhold proposed APIs

The first CI run had the disabled check on 1.120.0, and it failed. VS Code logged "CANNOT USE these API proposals 'resolvers'", yet the stand-in activated anyway. VS Code's isProposedApiEnabled at 1.119 through at least 1.128 is return true;// extension.enabledApiProposals.includes(proposal);, so any extension that declares a proposal gets every proposal. 1.138 and later check it again. On those older builds the resolver works without argv.json. Detection goes by activation rather than by version or setting, so there it rightly answers spin. Only the gated build can check the disabled path, hence the pin.

🤖 Generated with Claude Code

aledbf and others added 2 commits November 12, 2026 17:02
…ctive

spin-stack/open-remote-ssh resolves vscode-remote://spin+<workspace> through the
spin CLI and shows in VS Code what refuses a connection. On every open Spinbox
checks it is there and active: installed, a build that activates on
onResolveRemoteAuthority:spin, and its activation through - which VS Code lets
through only with "enable-proposed-api": ["spin-stack.open-remote-ssh"] in
argv.json, since without the proposed API registerRemoteAuthorityResolver
throws. Active, spin code's folder opens under spin+<workspace>; otherwise over
Remote-SSH as before, and Spinbox says once per reason what is missing, with
the exact argv.json line and a button to Configure Runtime Arguments.

The resolver is no extensionDependencies: a dependency that fails to activate
keeps its dependent from activating, so on VS Code without the argv.json line
Spinbox would not activate at all, Remote-SSH fallback included.

The integration suite runs VS Code stable twice with a stand-in for the
resolver: without the flag the detection says disabled, with
--enable-proposed-api (what argv.json gives) it says spin.

Part of #24

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
VS Code 1.120.0, which engines.vscode names, answers isProposedApiEnabled
true for any extension that declares a proposal (`return true;//
extension.enabledApiProposals.includes(proposal)`, through at least 1.128):
its "CANNOT USE these API proposals" only logs, and the stand-in activated
without the flag. There the resolver works without argv.json, and route()
saying spin is the truth. So the disabled and spin runs use versions.yaml's
vscode, 1.145.2, which enforces the gate, and the run at engines.vscode
expects the resolver missing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aledbf
aledbf merged commit 3d89cdc into main Nov 12, 2026
3 checks passed
@aledbf
aledbf deleted the resolver-open branch November 12, 2026 21:17
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.

1 participant