Repository navigation
fix(workspace-sleep): show slept terminals as closed - #869
Merged
Merged
Conversation
- keep tab records and layout on sleep for agent resume while listing the workspace like its terminals were closed - track stopped terminals via `workspace.sleptTabs` and `workspaceSleepChanged` under `workspaceSleepStateV1` - clear slept state when a slept tab starts again so post-sleep terminals still show as running
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes Sleep now records the terminal tabs it stopped so desktop and mobile list a slept workspace as if those terminals were closed, until a slept tab starts again.
- Runtime sleep overlay
record_workspace_sleepstores terminal tab ids in runtime metadata,wake_workspace_for_tabclears the whole workspace when one of those tabs starts, and a tab created after sleep leaves the others asleep. - Additive protocol
workspaceSleepStateV1gatesworkspace.sleptTabsandworkspaceSleepChangedwithout a version bump, advertised in the control file,status.get, and the Dart capability const. - Sidebar snapshot Host counts and agent presence drop only live slept terminal records, and the snapshot exposes
sleptTabIdsByWorkspaceId. - Desktop listing
awakeTabsFor()drives sidebar rows, attention, activity, and the active filter; the controller watches the host list and applies the same ids optimistically on local sleep. - Mobile list Workspace list refreshes on
workspaceSleepChangedand uses the host-adjusted snapshot counts; it does not need the new verb or hello capability. - Coverage Store, snapshot, hide-slept, host conformance, desktop listing/controller, and mobile event tests pin the overlay and the post-sleep spawn path.
Grok | 𝕏
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 changed
workspace.sleptTabsand clears the record when a session starts again for one of them.workspaceSleepStateV1capability withworkspace.sleptTabsverb andworkspaceSleepChangedevent.sleptTabIdsByWorkspaceId, and only subtracts live records so a slept tab closed later does not hide new terminals.workspace.sleep, and broadcasts sleep changes.WorkbenchStateaddssleptTabIdsByWorkspaceIdwithawakeTabsFor()for sidebar rows, attention, activity, and active filtering.WorkbenchControllerwatches the host list and sets it optimistically on sleep so rows update before the snapshot arrives.RuntimeWorkbenchRepositoryimplements newWorkspaceSleepRepositoryviaworkspace.sleptTabs, gated by capability check.workspaceSleepChanged.docs/architecture.mdanddocs/workspace-storage.mdto describe sleep as visible but listed as closed.Why