VS Code: reflect Workspace union onto native chrome (tab title + view badge)#197
Merged
Conversation
…badge) Surface each webview's Workspace union (computeWorkspaceUnion over the host AlertManager, filtered to that router's ownedPtyIds) onto VS Code native chrome. Each surface uses the indicator its primitive supports, matching the in-app `<title> <bell> [TODO]` pattern: - Editor tab (WebviewPanel): panel.title gains " 🔔" (ringing) and " [TODO]" (todo); mascot iconPath unchanged. - Panel view (WebviewView): a presence badge — view.badge.value 1 when anything owes attention, 0 to clear. view.title can't be used (a single-view bottom- panel container shows the static container title, with no runtime API), and the badge must clear with value 0 — VS Code ignores `undefined` on a panel container. Both confirmed on-device. - workspace-chrome.ts: workspaceTitle() + workspaceBadge() helpers. - message-router: attachRouter gains onUnion; notifyUnion() projects the union over ownedPtyIds, firing on owned-PTY alert-state changes and on claim/release. - extension.ts sets panel.title; webview-view-provider sets view.badge. - specs (vscode/glossary/alert): mark VS Code chrome reflection implemented; terminal ring/TODO only (browser-surface TODO stays webview-local). Always-on in VS Code (the host has no localStorage to read the workspaces flag); host-side gating is a merge-time decision. Standalone window persistence untouched. Verified: esbuild clean; no new type errors; full test suite green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Deploying mouseterm with
|
| Latest commit: |
0a29746
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2bab7ccf.mouseterm.pages.dev |
| Branch Preview URL: | https://workspaces-vscode-chrome.mouseterm.pages.dev |
dormouse-bot
approved these changes
Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Surfaces each VS Code webview's Workspace union status (ring / TODO) onto native chrome, building on the merged stage-2b primitives (#190). Each hosting primitive uses the indicator it actually supports, following the in-app
<title> <bell> [TODO]pattern.What it does
WebviewPanel):panel.titlegains a suffix —Dormouse·Dormouse 🔔·Dormouse [TODO]·Dormouse 🔔 [TODO]. The bell is the emoji stand-in for the in-app bell icon (a tab title is plain text);[TODO]is the bracketed word. The mascoticonPathis unchanged.WebviewView): a presence badge —view.badge.value = 1whenever anything owes attention, with the ring-vs-TODO detail in the tooltip.view.descriptionstays the shell name.Both confirmed on-device.
How
workspace-chrome.ts—workspaceTitle()/workspaceBadge()formatters.message-router.ts—attachRoutergains anonUnioncallback (alongside the existingonSaveState);notifyUnion()projects the union over the router'sownedPtyIdsvia the sharedcomputeWorkspaceUnion, firing on owned-PTY alert-state changes and on PTY claim/release.extension.tssetspanel.title;webview-view-provider.tssetsview.badge.Notable constraints (documented in
vscode.md)ownedPtyIds(PTY-backed terminals); a browser surface's TODO stays webview-local until a future webview→host Surface-state channel exists.value: 0, notundefined— VS Code hides a 0-value badge but does not clear one set toundefinedon a panel container (verified). Contained inworkspaceBadge.localStorageto read the standaloneworkspacesflag, so this is unconditional in VS Code; whether to add a host-side gate (a VS Code setting) is a follow-up decision.Verification
pnpm testgreen (dor-lib-common, dor, lib 729, standalone, website);pnpm buildclean; vscode-ext esbuild bundle + targeted typecheck clean.vscode.md,glossary.md,alert.md) to mark VS Code chrome reflection implemented.🤖 Generated with Claude Code