Repository navigation
Description
Problem
When the extension runs in a web workbench (VS Code server-web build, browser UI, remote extension host on the user's machine), two things break that work on desktop:
- Restricted Mode hides the sidebar. The web build opens folders untrusted.
codev-vscodedeclares nocapabilities.untrustedWorkspaces, so it is disabled until the user clicks through two Workspace Trust prompts (workspace + git location) — the Codev sidebar is invisible on first open and the terminal is blocked. - Tower links point at the wrong machine. Several
vscode.env.openExternal(...)calls openhttp://localhost:4100/...(Tower dashboard). In a web workbench the browser is not on the machine running Tower, so those links are dead. They need to become the relay URL (https://<relay>/t/<tower>/...) whenvscode.env.uiKind === UIKind.Web/env.remoteNameis set, or go throughvscode.env.asExternalUri.
Verified on a server-web build: the extension host activates, env.appName reads the IDE product name, and the sidebar renders in IDE mode once trust is granted — so these are the only two web-mode gaps found.
Scope
- Declare
capabilities.untrustedWorkspaceswith a consideredsupported: 'limited'(ortrue) and the restricted-mode configuration allowlist; decide what the sidebar does before trust (read-only status is fine; spawning builders should require trust). - Centralise Tower URL construction in one helper that knows the relay URL (Tower exposes it via its local-only tunnel status endpoint, which the remote extension host may call) and use it for every
openExternal. - Document the web-mode degradation: no
browserView(CDP) embedded browser in a web workbench; iframe-class surfaces only.
Acceptance
- Opening an untrusted folder in a web workbench shows the Codev sidebar (limited if
limited) without a trust prompt; granting trust unlocks the rest. - Every Tower link opened from the sidebar in web mode lands on the relay URL; desktop behaviour unchanged; marketplace builds see no behaviour change outside web mode.
Desktop blast radius (added after architect review)
A capabilities.untrustedWorkspaces declaration is not web-only: it changes Restricted Mode behaviour for every host, desktop included. Today desktop users who open an untrusted folder get the extension disabled until they trust; after this change the extension activates in Restricted Mode everywhere. So the lane must:
- Enumerate exactly what the extension does before trust (status/tree reads only; no spawning builders, no running
afx/codevCLI against the workspace, no terminal creation, no reading workspace-configured commands) and enforce it in code, not just in the manifest. - Use
supported: 'limited'with an explicitrestrictedConfigurationslist rather thantrue, unless the review concludes nothing the extension does can be influenced by untrusted workspace content. - State the desktop behaviour change in the changelog and test it on desktop as well as in a web workbench.
Coordination: engine floor (#1608)
#1608 (bump engines.vscode to ^1.128) is open and may land before or during this work. capabilities.untrustedWorkspaces and UIKind.Web are available well below either floor, so there is no API dependency, but both touch package.json on the same surface — coordinate with the vscode-surface owner to avoid conflicting manifest edits, and rebase this lane on #1608 if it lands first.
Sequencing
Independent of the Tower prefix forward (#1668); can run in parallel.
Activity
amrmelsayed commentedon Sep 9, 2026
Routing note from the workspace's main seat (resent after an
afx sendtruncation): the codev-ide architect is already amending this issue with the two points that survived delivery — restating the first one here for the record. Thecapabilities.untrustedWorkspacesdeclaration is not web-scoped: it changes Restricted Mode behavior for desktop users everywhere. The lane should state the desktop blast radius explicitly (what the extension will and won't do in an untrusted desktop workspace once the declaration exists —limitedwith named restricted settings is the usual shape, not a blankettrue). Coordinate with the vscode architect, who owns this surface, and be aware of #1608 (engine floor to ^1.128) which may land before or during this lane.amrmelsayed commentedon Sep 23, 2026
Scope narrowing per triage on #1727: item 1 of this issue (the untrustedWorkspaces capability declaration) is superseded by #1727, which is now the canonical home for the manifest change (concrete restrictedConfigurations list, acceptance criteria, owner priority for the next extension release). This issue keeps its web-specific remainder: Tower links via relay URL, and whatever of the web double-prompt trust flow the manifest change alone does not cure. Re-verify the web flow after #1727 ships - the desktop fix likely removes one of the two prompts here.