Repository navigation
feat(sidebar): add set-indicator / clear-indicator for a workspace pill - #461
Merged
amirlehmam merged 3 commits intoNov 17, 2026
Merged
Conversation
A small pill beside the workspace name, set from the CLI with free text and an optional colour, so a caller can flag a state (for example a session running on a remote machine) without renaming the workspace and so without switching off wmux's own naming. - wmux set-indicator [--workspace <id>] --text <text> [--color <#rrggbb|name>] - wmux clear-indicator [--workspace <id>] - workspace.set_indicator V2 method; defaults to the caller's workspace - text is cut at 16 characters; an unusable colour falls back to the accent - in memory only, never written to saved sessions An older wmux rejects both commands as unknown, which callers treat as "not supported". Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
stlindenau
marked this pull request as draft
November 16, 2026 13:27
- cli-indicator: the shipped CLI against a fake pipe sends workspace.set_indicator with the right params, refuses blank text, and clear-indicator sends empty text - workspace-row-indicator: WorkspaceRow renders the pill with its text and colour, nothing without an indicator, and never touches the title - regenerate resources/cli/wmux.js, which verify:resources requires to match the build of src/cli/wmux.ts Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
stlindenau
marked this pull request as ready for review
November 16, 2026 13:36
…lags - The CLI read --workspace/--text/--color pairwise, so `set-indicator --workspace --text SSH` sent workspaceId "--text". Both verbs now go through flagsOrFail (amirlehmam#247). - workspace.set_indicator answered { ok: true } whether or not any workspace took the pill: an unknown --workspace, a stale WMUX_SURFACE_ID, or a call from outside any pane all looked like success. Main now validates the params (-32602), asks every window through window.__wmux_setWorkspaceIndicator, and answers with the workspace that took it or -32000. - Routed in routeSpecialV2 instead of the V2 switch, which was one case over sonarjs/max-switch-cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
Thanks, merging this. I pushed one fix commit on top before merging:
|
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.
What
Adds a small pill beside a workspace's name that a caller can set from the CLI with free text and an optional color:
Why
Today the only way for a tool to flag a state on a workspace (for example "this session runs on a remote machine") is
rename-workspace. That clearstitleIsDefault, so wmux stops naming the workspace from its cwd/title.set-status --workspace --textis not a substitute: it rendersDone: <text>in a state-defined color and is overridden by agent activity. A workspace'scustomColorcan only be set from the sidebar menu.How
workspace.set_indicator {workspaceId?, text, color?}; empty text clears it. WithoutworkspaceIdit resolves the caller's workspace fromWMUX_SURFACE_ID.WorkspaceInfo.indicatoris rendered byWorkspaceRownext to the[WT]badge, using the existingworkspace-row__badgestyles.coloraccepts#rgb,#rrggbbor a preset name; an unusable color is dropped, so the pill falls back to the accent instead of the call failing.docs/DEVCONTAINER.mddocuments the commands.Testing
tests/unit/workspace-indicator.test.ts: color resolution and text normalization.tests/unit/cli-indicator.test.ts: the shippedresources/cli/wmux.jsagainst a fake pipe.set-indicatorsendsworkspace.set_indicatorwith the right params, refuses blank text, andclear-indicatorsends empty text.tests/unit/workspace-row-indicator.test.ts:WorkspaceRowrenders the pill with its text and color, nothing without an indicator, and never changes the title.resources/cli/wmux.jsis regenerated, sonpm run verify:resourcespasses.npm run typecheckand eslint on the touched source files are clean; verified by hand in a dev build.vitest runhas the same 25 failing files on an unmodifiedmasterand on this branch (remote-console-terminal-tapis flaky and fails intermittently on both). None are in files this change touches.workspace.set_indicatorhandler and theApp.tsxmessage handler that applies it.🤖 Generated with Claude Code