Skip to content

Show chat-only workspaces as active before the first message - #33815

Merged
brennanb2025 merged 7 commits into
mainfrom
brennanb2025/chat-only-workspace-active
Oct 26, 2026
Merged

brennanb2025 merged 7 commits into
mainfrom
brennanb2025/chat-only-workspace-active

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​262 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​260
Prod 6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​34 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​31

Problem

Opening a new workspace with only a chat tab (no Setup terminal) showed a grey Inactive dot in the sidebar until the first message was sent. Users read that as the workspace being broken or asleep, even though the chat is open and ready. Tracked in STA-12186.

The dot only counted running terminals and browser tabs. A chat tab has no running process until its first message, so it never counted. The sleeping-workspace indicator already treats a chat that has not been explicitly put to sleep as awake, so the dot and that indicator disagreed.

Change

A workspace with a chat tab that has not been explicitly put to sleep now shows the green Active dot, the same as a workspace with a terminal or browser tab. A chat put to sleep still shows as inactive (or the moon icon). Sidebar cards and the parent-workspace picker keep agent states such as Working, Needs permission and Done ahead of Active. Cmd+J keeps its existing Working, Needs permission and background-task priority; it does not show settled results, an existing limitation.

This applies everywhere the workspace dot is drawn: sidebar cards, the parent-workspace picker, and the Cmd+J switcher.

Notes

  • The chat rule matches the sleeping-workspace indicator: any chat not explicitly slept, including one whose sleep state has not arrived yet. The existing hide-sleeping filter still waits for a host answer before listing restored chats; that listing policy is unchanged.
  • The phone's workspace list derives its status separately on the host and isn't changed here.

Review path: light

  1. Small: ~30 changed production lines across 5 production files (worktree-status.ts, use-worktree-activity-status.ts, use-worktree-activity-statuses.ts, palette-live-status.tsx, structured-chat-slept-at.ts).
  2. Outside the risky areas: renderer-only display derivation; reads existing in-memory store state, writes nothing, no saved data, lifecycle, IPC or defaults.
  3. Not a repeat: last 30 days on these files has A slept native-chat workspace reads asleep and hides #28457 (slept chat workspaces read asleep and hide), a different symptom in the same family; no revert or incident.
  4. Local effect: one pure function plus the three hooks that feed the workspace dot.

Plan

Reuse the sleeping-workspace check's chat rule (chat tab not explicitly slept) as one more "active" input to the shared worktree status resolver, next to live terminals and browser tabs. Agent states keep their priority over Active.

Validation

CI is green on eae4389e81c: all five unit-test shards, static analysis/typechecks, relay integration and both package jobs passed. The added real-store suite covers N/10N tab and mounted-reader operation bounds plus live chat-status updates in all three consumers.

Branch screenshot validation passed on the same head: sidebar, sidebar parent picker, and workspace switcher all show green Active for an unsent native chat, with zero live terminal/browser activity at capture. The switcher was opened through Search; its keyboard trigger was not verified in the hidden run. No agent conversation or lifecycle run is required for this display-only change.

…ssage

A workspace whose only tab is a native chat showed the grey Inactive dot
until a message was sent, because the dot counted only live terminals and
browser tabs. Count a chat that is not explicitly slept, the same rule the
sleeping-workspace check already uses, in the sidebar cards, the parent
picker and the Cmd+J switcher.
@brennanb2025
brennanb2025 marked this pull request as ready for review October 26, 2026 07:17
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a7927565-805c-42fa-acff-c299d74a2e74
Commits

Reviewing files that changed from the base of the PR and between 2151e3b and 7f24803.

Files selected for processing: 1
  • config/flaky-test-pattern-baseline.txt
Files with no reviewable changes: 1
  • config/flaky-test-pattern-baseline.txt

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

Walkthrough

Worktree status calculation now considers awake structured chats alongside live PTYs and browser tabs. The sidebar selectors, sidebar activity hook, and palette status dot pass structured-chat activity into status checks. Tests cover an agent-session tab being active before its pane receives a sleep timestamp and inactive afterward.

Priority: Normal

Merge Risk: Minimal · up to 7f248

The baseline update addresses the reported static-analysis failure. No actionable merge risk remains from the supplied change.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 8 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 and concisely describes the main behavior change: chat-only workspaces now appear active before the first message.
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.
Description check Passed The description is detailed and on topic. It explains the problem, user-visible behavior, implementation plan, scope, validation results, screenshots, priorities, and out-of-scope behavior. Minor temp…
Full details: Description check

Explanation

The description is detailed and on topic. It explains the problem, user-visible behavior, implementation plan, scope, validation results, screenshots, priorities, and out-of-scope behavior. Minor template gaps remain: it references STA-12186 without an actual issue link or Fixes reference, and it does not reproduce the template headings and checkboxes exactly.

Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 076e9ace-051e-430f-af68-eecb2583b59c
Commits

Reviewing files that changed from the base of the PR and between b759a95 and cbe6e53.

Files selected for processing: 7
  • src/renderer/src/components/cmd-j/palette-live-status.tsx
  • src/renderer/src/components/sidebar/use-worktree-activity-status.test.tsx
  • src/renderer/src/components/sidebar/use-worktree-activity-status.ts
  • src/renderer/src/components/sidebar/use-worktree-activity-statuses.test.ts
  • src/renderer/src/components/sidebar/use-worktree-activity-statuses.ts
  • src/renderer/src/lib/worktree-status.ts
  • src/renderer/src/store/slices/structured-chat-slept-at.ts

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

Comment thread src/renderer/src/components/cmd-j/palette-live-status.tsx

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d82da559-3410-4246-b700-85d1807b0a22
Commits

Reviewing files that changed from the base of the PR and between cbe6e53 and 5674312.

Files selected for processing: 1
  • src/renderer/src/components/terminal-pane/pane-title-update-global-scan-budget.test.tsx

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 491ce84c-6eae-4de1-85ee-574bfee79d05
Commits

Reviewing files that changed from the base of the PR and between a839137 and 2151e3b.

Files selected for processing: 1
  • src/renderer/src/components/terminal-pane/pane-title-update-global-scan-budget.test.tsx

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

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Opening a workspace with only an unsent native chat used to show the grey Inactive dot because the display counted terminals and browser tabs only. The dot now shows Active for a chat that has not been explicitly put to sleep, including while its sleep answer is still unknown. No process is started by this display change.

The sidebar, parent-workspace picker and Cmd+J use the new fallback. Sidebar/parent agent results keep their priority. Cmd+J's existing omission of settled results and the hide-sleeping filter's existing wait for a host answer are unchanged.

Light-path review completed in one adversarial round and one test-only fix/recheck, followed by trivial formatting, ratchet and fixture corrections. The fix adds real-store N/10N operation bounds and live subscription checks for all three consumers. No production follow-up changes or unresolved findings. The fresh comparison labels the quiet Active presentation intended under the requested behavior.

Validation: CI run 40292974788 passed on eae4389, including static analysis/typechecks, all five unit shards, relay and package jobs. The 12-test real-store suite passed, including N/10N operation contracts and live updates for all three consumers. Screenshot-only UI validation on Windows covers the branch's three changed surfaces; no agent conversations or lifecycle run was required. All three branch captures passed on eae4389: sidebar, the sidebar context-menu parent picker, and workspace switcher show a green Active dot for an unsent native Codex chat. Capture-time audits record zero live terminals/PTYs and browser activity, no user messages, and no agent status. The switcher was opened through Search after hidden CDP shortcuts did not open it; keyboard triggering was not verified. Copies stopped gracefully, ports were released, and Windows real config hashes stayed unchanged. Main was merged once as 5674312; it did not change the reviewed production files or added contract test. Local dependency installs, builds and tests were not run.

For Brennan's review

Sidebar before the first message:

sidebar-chat-only-active.png

Sidebar “Set Parent Worktree…” picker:

parent-picker-chat-only-active.png

Workspace switcher:

cmd-j-chat-only-active.png

The key behavior is the awake-chat predicate and the Active fallback.

@brennanb2025
brennanb2025 merged commit dff068f into main Oct 26, 2026
33 checks passed
@brennanb2025
brennanb2025 deleted the brennanb2025/chat-only-workspace-active branch October 26, 2026 17:45
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