Skip to content

Tugboat — VS Code workbench extension #101

Closed
Closed

Description

@thomas-stegemann

Scoped 2026-08-20. This issue now covers the VS Code extension only; the JetBrains plugin moved to #588. The body below reflects the as-scoped plan — the original two-distribution sketch is in the issue history.

Corrected 2026-08-21. The storage paragraph below claimed .bowire/ lands in the workspace because the process runs there. That is not true and never was — see Storage: the premise was wrong. The claim is kept visible rather than quietly edited out, because it is the reason acceptance item 3 looked done.

Why

Thunder Client proved there's a real audience for "I want to test an API without leaving my IDE." It's REST-only and limited; the category it occupies is uncontested for multi-protocol.

Bowire's workbench has zero framework dependencies (pure HTML/CSS/JS) and is served by a local Bowire process. That is what makes this small: the extension does not embed Bowire's UI, it hosts a WebView pointed at a process it started.

Scope — bowire-vscode

The extension starts bowire with the workspace folder as its working directory and opens the workbench in a WebView panel.

The file-I/O bridge the original sketch worried about is not needed. vscode.workspace.fs / CefMessageRouter were only necessary if the UI had to reach the filesystem itself. It doesn't: the Bowire process already reads and writes those files, and the WebView only speaks HTTP to it. That removes the most expensive item in the original design, and it held up.

Getting a Bowire process: the extension resolves the CLI from the bowire.cliPath setting, then PATH, and offers an install path when neither yields anything. Bundling per-platform self-contained binaries was the alternative — zero setup, but roughly 120 MB per marketplace package, one build per platform to keep in step, and an extension release tied to every Bowire release. Driving the installed CLI keeps the extension thin and keeps one Bowire in play instead of two.

Storage: the premise was wrong

The original scope argued that because the CLI runs with the workspace as its working directory, .bowire/ lands next to the code and travels with the repo. The working directory has no bearing on it. The storage root is computed once per process from the user profile:

// src/Kuestenlogik.Bowire/Auth/IBowireUserStore.cs:65-67
private static readonly string Root = Path.Combine(
    Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".bowire");

Verified at runtime: the CLI started in an empty directory serves the workbench and creates nothing there — collections, environments, recordings and presets all land in ~/.bowire/workspaces/<id>/. So two repos open in two windows currently share one set of collections.

Rooting a workspace's data at that workspace is tracked separately in #591, because it needs a decision that reaches past this extension (a CLI switch, the .bowire/project.json convention, or extension-driven workspace init — the JetBrains plugin #588 inherits whichever is chosen).

Acceptance

  • bowire-vscode on the VS Code Marketplace, opens the workbench in a side panel — panel works; publishing needs a marketplace publisher account
  • Same UI as the standalone tool; commands / shortcuts behave identically — it is the same UI, framed in a WebView; the smoke test asserts the served document is the workbench
  • Collections + envs persist in the workspace .bowire/ folder so they ship with the repo — shipped in Workspace-local storage: collections must travel with the repo, not the user profile #591 (opt-in via "storage": "project")
  • Missing bowire produces an actionable install prompt, not a blank panel — plus a bowire.cliPath override and a version floor, so an unusable CLI says why instead of exiting silently
  • Extension version is decoupled from the Bowire version it hosts — the extension pins a minimum (2.0.0) and hosts anything newer

What exists today

extensions/bowire-vscode/ — CommonJS, no build step:

  • extension.js — resolves the CLI, checks its version, spawns it with the workspace as cwd, frames the workbench, stops the process when the panel closes
  • lib/workbench.js — the logic that is testable without VS Code (CLI resolution, argument building, banner parsing, port derivation, webview CSP)
  • test/smoke.js + scripts/run-smoke.mjs — an integration test inside a real VS Code, run in an isolated profile, covering both the with-folder and no-folder paths
  • 37 unit tests in tests/Kuestenlogik.Bowire.Tests/ci/vscode-extension.test.mjs

Out of scope

Related

Activity

  1. moved this to Backlog in Bowireon Jun 15, 2026
  2. thomas-stegemann commented on Aug 20, 2026

    @thomas-stegemann
    MemberAuthor

    CLI resolution + version check landed; storage claim was wrong

    Shipped (c3a80dac, 70448ad2):

    • bowire.cliPath setting, above PATH in the resolution chain. Supports ${workspaceFolder}, so a project-local build can be committed to .vscode/settings.json. A configured path that does not resolve errors out naming the path instead of silently falling back to PATH.
    • Version floor of 2.0.0, checked before spawning. A CLI that does not understand --port / --auto-create-initial-workspace used to exit and produce "exited before it started serving", which named nothing. Unparseable version output is accepted rather than blocking — a reworded banner is cosmetic.
    • Case-dependent error messages: install routes when nothing is on PATH, the offending path plus a settings button when the setting is wrong. Install commands cannot fix a typo.
    • The chain, with the two planned steps (VS Code: resolve the CLI from a workspace tool manifest #589 tool manifest, VS Code: offer to download a matching CLI when none is installed #590 managed download), is documented as a diagram in the extension README.
    • The smoke test is committed and has a runner (scripts/run-smoke.mjs), fully isolated via its own --user-data-dir. It passes: activate → command registered → command executed → workbench answering on the derived port → panel closed and process stopped.

    Found while doing it: the README's storage claim was false. It said .bowire/ lands in the workspace because the CLI runs with the workspace as its working directory. The working directory has no bearing on it — the storage root is computed once from the user profile (src/Kuestenlogik.Bowire/Auth/IBowireUserStore.cs:65-67), so everything goes to ~/.bowire/workspaces/<id>/. Verified at runtime: the CLI started in an empty directory serves the workbench and creates nothing there.

    The smoke test's storage step was asserting that claim, and failing correctly. It is removed with a comment pointing at #591, which decides how a workspace's data gets rooted at the workspace; the assertion returns with it. The README now describes actual behaviour.

    That gap does not block this ticket — the extension works and its storage is shared with the CLI and the standalone tool — but the "travels with the repo" line cannot be used until #591 lands.

  3. changed the title [-]Tugboat — VS Code + JetBrains workbench extension[/-] [+]Tugboat — VS Code workbench extension[/+] on Aug 24, 2026
  4. thomas-stegemann commented on Aug 25, 2026

    @thomas-stegemann
    MemberAuthor

    Erledigt — 2026-08-25.

    https://marketplace.visualstudio.com/items?itemName=kuestenlogik.bowire-vscode

    bowire-vscode v0.1.0 ist im VS Code Marketplace veröffentlicht. Damit ist der letzte offene Acceptance-Punkt erfüllt — der Rest war bereits geliefert.

    Published kuestenlogik.bowire-vscode v0.1.0.
    

    (Workflow-Lauf 32827556549, Schritt Publish to Marketplace)

    Acceptance

    Hinweise

    Die Marketplace-Seite antwortet auf curl mit 404, obwohl die Extension gelistet ist — der Marketplace filtert Bot-Requests. Wer den Zustand prüfen will, nimmt die Gallery-API statt HTTP-Status:

    npx @vscode/vsce show kuestenlogik.bowire-vscode
    

    Das Manifest war vollständig (publisher, icon, repository, license, categories, engines.vscode), es musste nichts nachgezogen werden.

    Was daran hängt

    Der Publish authentifiziert über VSCE_PAT. Azure DevOps schaltet am 2026-12-01 PATs mit Scope all accessible organizations ab; die Umstellung auf Entra ID mit föderierten Credentials ist #613 (v2.6). Falls das hier verwendete Token an eine einzelne Organisation gebunden ist, ist der Stichtag für euch folgenlos — dann wird #613 zur Aufräumarbeit statt zur Pflicht.

  5. moved this from Backlog to Done in Bowireon Aug 25, 2026
  6. added a commit that references this issue on Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    • Status
      Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions