Skip to content

feat(sidebar): Smart Done means finished and unread (dark) - #30425

Merged
Jinwoo-H merged 2 commits into
mainfrom
jinwoo/sidebar-done-unread
Oct 18, 2026
Merged

Jinwoo-H merged 2 commits into
mainfrom
jinwoo/sidebar-done-unread

Conversation

@Jinwoo-H

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

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​123 $\color{#cf222e}{\Huge{\mathbf{−}}}$​18 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​105
Prod 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​63 $\color{#cf222e}{\Huge{\mathbf{−}}}$​43 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​20

ELI5

In the new sidebar build (still switched off for everyone), Smart sort puts "Done" workspaces (an agent finished) near the top. Until now a Done row stayed there until the next prompt, even after you had looked at it. The owner decided Done should mean "finished and you haven't looked yet". So opening the workspace now moves it back down, the same moment its unread dot goes away.

What Changed

Behind the build switch ORCA_SIDEBAR_INPUTS=main only:

  • The one rule, tierRank in src/shared/sidebar-list/stamp-order.ts: a row counts as Done only while the existing workspace unread flag is set. A Done you have seen rests among the other rows by its Recent time, which puts a just-finished row at the top of that part of the list.
  • The next prompt still ends Done (the host moves the tier to Working).
  • The phone maps its unread field into the same rule (workspace-list-ordering.ts).
  • No new state, field or timer. The window and the phone already re-sort when the flag changes, because it lives on the row.

Before (switch on): finish in a background workspace, open it, read the reply: the row stays in Done until the next prompt.
After: the row leaves Done when you open it. A finish in the workspace you are looking at never shows as Done.

Why

Owner decision Q1 (2026-10-18). Every product checked clears "done" on view; several also clear on the next prompt. Reusing the unread flag means the sidebar dot and Smart's Done always agree, with nothing new to persist or expire.

Linked Issue

Follow-up to the sidebar sort stamps plan (#30284, #30401, #30404).

Visual Proof

N/A: dark behind a build switch; no shipped build changes.

Testing

  • I manually tested these changes locally

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

  • stamp-order.test.ts: unread Done ranks above Working; a seen Done, and a row from an older host without the flag, rest by Recent.

  • stamp-order-scenarios.test.ts (the design note's before/after rows): Done holds while unread with no fade; opening the workspace ends Done; the next prompt ends Done; a finish in the open workspace is never Done.

  • use-sort-order-stamps.test.tsx: clearing the flag re-sorts the live list.

  • Switch-on stamp golden re-recorded (the seen Done row moves below Working); switch-off goldens unchanged.

  • Mobile: workspace-list-stamp-order.test.ts adds a seen Done; mobile tsc, tests and format check pass.

  • e2e on a switch-on build, hidden window: sort-stamps order, sort-stamps, workspace rows: pass.

  • pnpm tc, all check:*ratchet* scripts, check:code-quality:changed, anti-slop lint, oxlint: pass. macOS only.

Review

Opus review in the foreground. Added from review: the live re-sort test.

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

  • The unread flag is raised by the desktop window. On a host with no desktop window attached (a headless server used only from the phone), a finished workspace is never flagged, so it goes straight to the rest of the list instead of Done. Closing that would need the host to raise the flag itself.
  • A bell in a background tab of the workspace on screen also raises the flag (the existing unread dot behaves the same), so a finish you watched can then show as Done.
  • Not verified: whether opening a folder workspace on the phone clears its flag on the host.

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)

Jinwoo-H and others added 2 commits October 18, 2026 17:22
Owner decision Q1: with ORCA_SIDEBAR_INPUTS=main, a Done row holds its tier only
while the workspace unread flag is set, so opening the workspace or sending the
next prompt ends it. Reuses the existing flag; no new state or timer.

Co-Authored-By: Claude <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 18, 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: 162e718f-3d3b-4c46-8ab5-8a37c0567046
📥 Commits

Reviewing files that changed from the base of the PR and between 3dbb804 and faa391c.

📒 Files selected for processing: 8
  • mobile/src/worktree/workspace-list-ordering.ts
  • mobile/src/worktree/workspace-list-stamp-order.test.ts
  • src/renderer/src/components/sidebar/__goldens__/sidebar-list-stamp-order/scenario-stamp-tiers.txt
  • src/renderer/src/components/sidebar/sidebar-list-goldens-stamp-order.test.tsx
  • src/renderer/src/components/sidebar/worktree-list/listing/use-sort-order-stamps.test.tsx
  • src/shared/sidebar-list/stamp-order-scenarios.test.ts
  • src/shared/sidebar-list/stamp-order.test.ts
  • src/shared/sidebar-list/stamp-order.ts

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

📝 Walkthrough

Smart sorting now treats a Done workspace as a smart tier only when it is unread. The shared comparator and mobile adapter use unread state for ordering. Tests and sidebar snapshots cover unread and seen Done rows, including workspace open and activity transitions.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to faa39

Unread Done workspaces retain their intended position, while read workspaces move out of Done. No issue identified here needs resolution before merge.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 7 files. (1 skipped: … 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 change: Smart Done sorting now applies to finished and unread workspaces.
Description check Passed The description is complete and matches the template. It explains the user-facing behavior, implementation, rationale, linked issues, testing, limitations, and checklist status. The visual proof secti…
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 matches the template. It explains the user-facing behavior, implementation, rationale, linked issues, testing, limitations, and checklist status. The visual proof section provides a reason for using N/A, and the testing details identify macOS-only coverage.

Full details: Docstring Coverage

Explanation

Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 7 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • 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 d3026df into main Oct 18, 2026
33 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