Context
Codev: Run Dev Server (workspace + worktree variants) spawns the dev
PTY inside VSCode, but the user still has to find the URL and open it
themselves. A one-click "open the running app" affordance, surfaced
right in the sidebar, closes that gap.
Proposal
Strictly manual — no auto-open, no settings, no lifecycle tracking.
- New optional config in
.codev/config.json, sibling to
worktree.devCommand:
- New workspace-view row:
Open Dev URL, rendered immediately
below the existing Start Dev Server / Stop Dev Server row.
Visible whenever worktree.devUrl is configured — independent of
whether the dev PTY is currently running (the row click should work
even if the server isn't up; the browser shows whatever the server
is or isn't serving, which is the user's call).
- New command:
Codev: Open Dev URL. Backs the row click;
palette-visible for users who prefer keyboard.
- Click behavior:
vscode.env.openExternal(vscode.Uri.parse(devUrl))
— uses the user's default browser (or whatever they've mapped via
workbench.externalUriOpeners).
Why default browser, not VSCode's Simple Browser
A real browser is the honest fit for a dev preview:
- DevTools / Console / Network / breakpoints / React DevTools — the
dev loop is overwhelmingly DevTools-bound, and Simple Browser has
none of them.
- Real cookie jar. Simple Browser loads the target in an iframe inside
vscode-webview://, making it a third-party context; cross-site
OAuth / SSO can break because Chromium third-party cookie rules
block writes mid-flow.
- No framing restrictions — sites with
X-Frame-Options: DENY /
strict frame-ancestors (auth providers, dashboards) render fine
in a real browser, blank in Simple Browser.
Users who specifically want embedded preview can still invoke Simple
Browser themselves via Command Palette → "Simple Browser: Show".
Why no auto-open
Considered and dropped: there's no API to detect whether the user
already has the URL open in their browser, and vscode.env.openExternal
always opens a new tab. Any auto-firing rule either piles up tabs (if
fired on every event) or guesses wrong (no signal to base it on).
Making the action manual sidesteps the whole class of problem and is
arguably what a developer wants anyway — explicit, predictable, no
surprises during dev-server restarts. The row is one click away, which
is the same cost as a clever auto-open without any of the footguns.
Acceptance
Out of scope
- Auto-open on dev-server start (explicitly rejected — see rationale
above).
- Embedded Simple Browser preview (deferred; not relevant to a
DevTools-bound dev loop).
- Multi-URL dashboards (only the configured
devUrl).
- Browser tab activation / "switch to existing tab" (not possible via
standard APIs; manual click is explicit by construction).
Context
Codev: Run Dev Server(workspace + worktree variants) spawns the devPTY inside VSCode, but the user still has to find the URL and open it
themselves. A one-click "open the running app" affordance, surfaced
right in the sidebar, closes that gap.
Proposal
Strictly manual — no auto-open, no settings, no lifecycle tracking.
.codev/config.json, sibling toworktree.devCommand:Open Dev URL, rendered immediatelybelow the existing
Start Dev Server/Stop Dev Serverrow.Visible whenever
worktree.devUrlis configured — independent ofwhether the dev PTY is currently running (the row click should work
even if the server isn't up; the browser shows whatever the server
is or isn't serving, which is the user's call).
Codev: Open Dev URL. Backs the row click;palette-visible for users who prefer keyboard.
vscode.env.openExternal(vscode.Uri.parse(devUrl))— uses the user's default browser (or whatever they've mapped via
workbench.externalUriOpeners).Why default browser, not VSCode's Simple Browser
A real browser is the honest fit for a dev preview:
dev loop is overwhelmingly DevTools-bound, and Simple Browser has
none of them.
vscode-webview://, making it a third-party context; cross-siteOAuth / SSO can break because Chromium third-party cookie rules
block writes mid-flow.
X-Frame-Options: DENY/strict
frame-ancestors(auth providers, dashboards) render finein a real browser, blank in Simple Browser.
Users who specifically want embedded preview can still invoke Simple
Browser themselves via Command Palette → "Simple Browser: Show".
Why no auto-open
Considered and dropped: there's no API to detect whether the user
already has the URL open in their browser, and
vscode.env.openExternalalways opens a new tab. Any auto-firing rule either piles up tabs (if
fired on every event) or guesses wrong (no signal to base it on).
Making the action manual sidesteps the whole class of problem and is
arguably what a developer wants anyway — explicit, predictable, no
surprises during dev-server restarts. The row is one click away, which
is the same cost as a clever auto-open without any of the footguns.
Acceptance
worktree.devUrlrecognized in.codev/config.json(validation+ doc update).
Codev: Open Dev URLcommand registered (palette-visible).Start/Stop Dev Server row whenever
worktree.devUrlis set.Hidden when it isn't.
vscode.env.openExternal(devUrl)opens in the defaultbrowser; works regardless of whether the dev PTY is running.
row.
Out of scope
above).
DevTools-bound dev loop).
devUrl).standard APIs; manual click is explicit by construction).