Skip to content

fix(sidebar): Hide sleeping keeps a paired server's active workspaces (dark) - #30624

Merged
Jinwoo-H merged 2 commits into
mainfrom
sidebar-flip-hide-sleeping
Oct 19, 2026
Merged

Jinwoo-H merged 2 commits into
mainfrom
sidebar-flip-hide-sleeping

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​123 $\color{#cf222e}{\Huge{\mathbf{−}}}$​5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​118
Prod 6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​201 $\color{#cf222e}{\Huge{\mathbf{−}}}$​17 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​184

ELI5

"Hide sleeping" hides workspaces with nothing running. When the desktop is connected to a paired Orca server, the server runs the terminals in its own workspaces. With the sidebar-inputs build switch on, the desktop's main process decided "sleeping" from its own records only, so it never saw those terminals, nor the browser tabs the desktop had open there, and it hid workspaces that were in use. Now it asks the owner: the server's own report says which of its workspaces have live terminals or agents, and the desktop adds the browser and chat tabs it holds there. Switch-off builds (every shipped build) are unchanged.

What Changed

All runtime changes run only with ORCA_SIDEBAR_INPUTS=main (found by #30461, listed as a must-fix before the flip).

  • The server's report is read off its own rows. The paired server's worktree.ps rows already carry liveTerminalCount, unverifiableTerminalCount, status and workingMode. normalizePairedServerRow now turns those into activity: { terminal, agent }. Older servers that omit them report nothing, so their rows read as before.
  • Main's activity feed domain now lists paired-server workspaces too (buildPairedServerActivityFacts). It combines the server's report with the browser and native-chat tabs from this desktop's saved session for that server. This is the same rule the phone's server catalog already applies (stampDesktopSidebarView). This host's own rows win an id both list, like the review domain.
  • Loss of contact is unverifiable, never asleep. While a server is out of contact, its last-known live terminals read unverifiable, which keeps the row shown (docs/reference/ssh-execution-boundary.md).
  • Wiring. The domain re-reads on paired-row changes and on session writes for runtime hosts. The new field is kept out of the published pairedServerRows domain, so other-version readers see the same rows as before and a terminal-count change does not resend rows.
  • getWorkspaceSessionTabActivity splits the existing session reader into browser and chat sets. getWorkspaceSessionTabActivityIds still returns the same union, so its switch-off callers are unchanged.

Known differences, switch-on only:

  • A server terminal that only another client opened (the phone, say) now keeps the row awake, because the server counts it. The window's own path counts only its own tabs. This matches what the phone shows. It is listed as a known gap in the parity suite.
  • Server counts refresh on the server's change events, on reconnect, or on the 30 s fallback. This is the same freshness the phone gets.
  • Activity is still keyed by bare id, as the review domain is. A local idle workspace sharing a bare id with an active server workspace reads awake. This predates this PR.

Why

The server owns its terminals, so it is the one that should report their liveness. Its rows already said this, and the phone already used it. Reusing that report avoids a second channel. The other option was to sync the desktop's server-side tabs into main's own activity producer. That would duplicate state the server already reports, and it would still miss terminals other clients opened.

Linked Issue

Follow-up to #30461 (must-fix before the sidebar flip).

Visual Proof

N/A: dark behind a build switch that is off in every shipped build. Behaviour is proven by the switch-on e2e below.

Testing

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

  • New paired-server-activity-facts.test.ts: terminals, unverifiable counts, agents, the out-of-contact downgrade, desktop browser tabs, and older servers.

  • Parity suite (sidebar-list-parity.test.tsx) has two new "Hide sleeping" scenarios: a desktop terminal in a server workspace, and a desktop browser tab in a server workspace. The window, the window reading main's feed, and the phone all agree. Negative control: with the paired-server facts removed from the feed, both scenarios fail.

  • e2e, switch-on build, hidden window (ORCA_BACKGROUND_LAUNCH=1): paired-mobile-desktop-mirror-workspace-visibility fails before the fix, at its Hide-sleeping browser-tab step, and passes after. sidebar-desktop-reads-main passes.

  • pnpm tc, related unit suites (46 files, 431 tests), oxlint, anti-slop audit, check:code-quality:changed, focus-read ratchet, max-lines ratchet.

Review

An Opus review found no correctness bugs. Applied: keep the new field off the published rows and make it tolerant (.catch), and note the other-client terminal difference in the parity suite's known gaps.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

SSH: a paired server reached through an SSH host is not in contact here and keeps its last rows as unverifiable. Folder workspaces: these match through the same folder: key on both sides. Mixed versions: the published feed rows are unchanged, and the activity domain only gains entries.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

…rt (dark)

With ORCA_SIDEBAR_INPUTS=main, main's activity domain now lists a paired
server's rows: their terminals and agents as the server's worktree.ps
reports them, plus the browser and chat tabs this desktop's saved session
holds there. A server out of contact keeps live terminals unverifiable.
Switch-off builds are unchanged.
Review: a strict field on paired rows could drop a whole row for an older
reader; the activity domain already carries it.
@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0f941136-7f83-4fb0-bf51-381790cd92f4
📥 Commits

Reviewing files that changed from the base of the PR and between 5be871e and 935619f.

📒 Files selected for processing: 9
  • src/main/runtime/sidebar-inputs/paired-server-rows-producer.test.ts
  • src/main/runtime/sidebar-inputs/sidebar-inputs-feed-domains.ts
  • src/renderer/src/components/sidebar/sidebar-list-parity.test-fixture.ts
  • src/renderer/src/components/sidebar/sidebar-list-parity.test.tsx
  • src/shared/sidebar-list/paired-server-activity-facts.test.ts
  • src/shared/sidebar-list/paired-server-activity-facts.ts
  • src/shared/sidebar-list/paired-server-rows.ts
  • src/shared/sidebar-list/workspace-activity-facts.ts
  • src/shared/workspace-session-tab-activity.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

📝 Walkthrough

Paired-server rows now include normalized terminal and agent activity. A new builder combines those facts with browser and structured-chat activity from matching runtime host sessions. The runtime activity feed includes paired-server facts and watches paired-server revisions and relevant session writes. Parity fixtures and tests cover paired-server terminal and browser-tab activity.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 93561

Paired-server activity can refresh after saved session changes. No identified issue remains to block merging after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 76.92% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 9 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly summarizes the main change: Hide sleeping no longer hides active paired-server workspaces.
Description check Passed The description is complete and follows the repository template. It explains the user impact, implementation, rationale, linked issue, visual-proof exception, testing, review notes, compatibility cons…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description is complete and follows the repository template. It explains the user impact, implementation, rationale, linked issue, visual-proof exception, testing, review notes, compatibility considerations, and checklist status.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Jinwoo-H
Jinwoo-H merged commit 5f2bb93 into main Oct 19, 2026
36 checks passed
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