Skip to content

feat(sidebar): sleep every workspace of a project or project group - #6

Open
decrypted wants to merge 2 commits into
mainfrom
feat/sleep-project-and-group
Open

decrypted wants to merge 2 commits into
mainfrom
feat/sleep-project-and-group

Conversation

@decrypted

Copy link
Copy Markdown
Owner

What

A Sleep N Workspaces entry in the "…" menu of a project and of a project group.

  • Project: sleeps every sleepable workspace of every host copy of the project.
  • Project group: sleeps every sleepable workspace in the group, nested groups and folder workspaces included, scoped to the group's owner host like "Delete group".
  • Uses exactly the multi-select Sleep path:
    • eligibility: hasSleepableWorkspaceActivity;
    • the twin confirmation and runSleepWorktrees (now shared as sleepWorktreesConfirmingTwins);
    • the existing failure toasts.
  • Hidden when nothing can sleep. Workspaces that are being deleted are left out.

Why

When switching between clients or project sets, putting a whole project or group to sleep currently means selecting every workspace by hand.

Testing

  • pnpm check:changed passed on the box (31/31); after the follow-up commit, oxlint, oxfmt, pnpm tc and the sidebar tests (30 files, 107 tests).
  • project-scope-sleep-targets.test.ts, a pure function with hardcoded expectations, covers:
    • a nested group with a folder workspace;
    • idle and mid-delete exclusion;
    • owner-host scoping;
    • projects with several host copies.
  • Not tried in the running app yet.

Risk

Low. It only adds menu entries that reuse the existing batch sleep. The count is computed only while the menu is open.

🤖 Generated with Claude Code

@decrypted
decrypted force-pushed the feat/sleep-project-and-group branch 2 times, most recently from 9a792c9 to c419108 Compare November 18, 2026 08:42
decrypted added a commit that referenced this pull request Nov 18, 2026
Upstream 8abbc91..2f5abbc (245 commits). Branches rebased onto it:
fix/linux-port-scan-inode-cache (#1; now on upstream's linux-proc-net-listeners
parser, which gained a uid field), feat/port-detection-setting (#2),
feat/remote-autoconnect-setting (#3), feat/reduce-motion-setting (#4),
feat/keep-awake-timed (#5), feat/sleep-project-and-group (#6),
feat/project-group-filter (#7; group hider composed over upstream's
folder-nested exemption), fix/worktree-create-missing-base-hint (#8), ci/fork-build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@decrypted
decrypted force-pushed the feat/sleep-project-and-group branch from c419108 to 0e43187 Compare November 19, 2026 08:18
decrypted added a commit that referenced this pull request Nov 19, 2026
Upstream 2f5abbc..7bc705a (345 commits). Branches rebased onto it:
#1 fix/linux-port-scan-inode-cache, #2 feat/port-detection-setting, #3 feat/remote-autoconnect-setting,
#4 feat/reduce-motion-setting, #5 feat/keep-awake-timed, #6 feat/sleep-project-and-group,
#7 feat/project-group-filter, #8 fix/worktree-create-missing-base-hint; plus ci/fork-build.

- #2: upstream stablyai#43836 took the refreshing flag away from the background scanner; the
  detection-off reset no longer clears it.
- #4: upstream's HoverScrollText and the composer glow use the motion-safe / motion-reduce
  variants; the bot activity list scrolls with motionSafeScrollBehavior.
- #7: kept upstream's bot-listed workspace exclusion next to the project-group scope.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@decrypted
decrypted force-pushed the feat/sleep-project-and-group branch 6 times, most recently from baf4d20 to e887e71 Compare November 27, 2026 08:13
decrypted and others added 2 commits November 30, 2026 11:53
Project and project-group header menus get "Sleep N Workspaces", which
sleeps every workspace multi-select Sleep would (live terminals, browser
tabs or host-owned chats, not mid-delete) across the project's host
copies, or the group's subtree of projects and folder workspaces on the
group's owner host. It goes through the same twin confirmation and
runSleepWorktrees batch as multi-select.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The entry owns its leading separator so a hidden entry leaves no doubled
separator in the project menu.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@decrypted
decrypted force-pushed the feat/sleep-project-and-group branch from e887e71 to a9c4d57 Compare November 30, 2026 11:10
decrypted added a commit that referenced this pull request Nov 30, 2026
Upstream a788fad..9fa1d98 (1236 commits). Branches: #2 port detection,
#3 remote auto-connect, #4 reduce motion, #5 keep-awake (squashed to one commit), #6 project sleep,
#7 project-group filter, #8 base-branch hint, #9 mouse history buttons (new in local/build), ci/fork-build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant