Repository navigation
feat(sidebar): self-healing workspace status + set-status --workspace verb - #79
Merged
amirlehmam merged 1 commit intoJul 9, 2026
Merged
Conversation
The sidebar workspace status is driven solely by shellState, which is written only by the in-pane shell integration. A shell that emits "running" but is killed before returning to its prompt (e.g. an orchestration agent reaped at teardown) never emits the matching "idle", so the row is stranded on "Running" -- and a workspace left with only markdown surfaces can never correct it. - auto-heal: reset a workspace's shellState to "idle" when a shell PTY exits if it was still "running" (useTerminal onExit) - add `wmux set-status --workspace <id> --state <idle|running|interrupted> [--text "<label>"]` to set a named workspace's status from anywhere, including outside a pane; --text renders as "Done: <label>"
Owner
|
Merged — thanks Todd! The stuck Running badge has been a long-standing annoyance, and resetting Shipping this in v0.20.0 shortly. |
Closed
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.
Problem
The sidebar workspace status is driven by
shellState, which is written only by the in-pane shell integration (report_shell_state:runningon command start,idlewhen the prompt returns). A shell that emitsrunningbut is killed before returning to its prompt — e.g. an agent's interactive TUI reaped at teardown — never emits the matchingidle. Once the workspace has only non-terminal surfaces left (markdown/browser), nothing can clear it, so the row stays stuck on "Running" indefinitely. An idle-but-open Claude session hits the same wall when the PTY observer doesn't catch the completion marker.Separately, there's no way for a driver outside a pane (e.g. an orchestration coordinator) to set a named workspace's status —
set-status/set-progress/logcarry no surface target and are dropped in the renderer.Changes
useTerminalonExit), reset the owning workspace'sshellStatetoidleif it was stillrunning— a shell whose PTY has exited can't be the running command. Clears the badge the moment a pane/agent is torn down.wmux set-status --workspace <id> --state <idle|running|interrupted> [--text "<label>"]. Sets a named workspace's status from anywhere, including outside a pane (keyed onworkspaceId, notsurfaceId).--textrenders asDone: <label>(green). Wiring: CLI verb →workspace.set_statusbroadcast in main → a renderer branch that resolves byworkspaceIdand updates{ shellState, notificationText }. The pre-existing positionalset-status <key> <value>form is unchanged.Testing
npm run buildclean;npm testgreen.set-status --workspace … --state idle --text "…"painted the rowDone: …from a separate terminal.