Repository navigation
Revert #12658: show PR status on active and done workspaces too (2 of 2) - #12825
Conversation
edc4f43 to
5a46791
Compare
81fabe7 to
cf5f12b
Compare
Stacked on the #12793 revert. Widens the passive-identity set from {inactive} back to {active, done, inactive}, so the PR/check glyph returns to the left status lane for workspaces that are actively being worked, not just idle ones. Tradeoff, deliberate: #12658 was not purely a regression. It also fixed #8813, where an active workspace with branch identity and no PR showed the grey branch glyph instead of the emerald Active dot. This revert reintroduces that, and removes its e2e guard. The left lane holds one glyph, so activity, branch identity, and review status cannot all be shown. This picks review status.
cf5f12b to
da322c8
Compare
📝 WalkthroughWalkthroughThe change updates worktree status selection so passive review or branch indicators replace active, done, and inactive activity statuses. Worktree cards now pass branch identity availability independently of the branch card-property setting. Component tests update PR status precedence, branch tooltip behavior, unread overlays, activity-status mocks, and linked PR status assertions. The quick-action test suite removes inactive status-dot coverage. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 8d7c03fc-3a14-4e98-b42c-6dfba8dbe95a
📒 Files selected for processing (6)
src/renderer/src/components/sidebar/WorktreeCard.pr-display.test.tsxsrc/renderer/src/components/sidebar/WorktreeCard.quick-actions.test.tsxsrc/renderer/src/components/sidebar/WorktreeCard.tsxsrc/renderer/src/components/sidebar/WorktreeCardStatusSlot.test.tsxsrc/renderer/src/components/sidebar/WorktreeCardStatusSlot.tsxtests/e2e/worktree-card-status-indicator.spec.ts
💤 Files with no reviewable changes (1)
- tests/e2e/worktree-card-status-indicator.spec.ts
|
|
||
| vi.mock('./use-worktree-activity-status', () => ({ | ||
| useWorktreeActivityStatus: () => activityStatus | ||
| useWorktreeActivityStatus: () => 'idle' |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Use a valid WorktreeStatus in this mock.
useWorktreeActivityStatus returns 'idle', but src/renderer/src/lib/worktree-status.ts defines WorktreeStatus as active, working, permission, done, or inactive. This mock exercises a state that production cannot provide and can bypass StatusIndicator behavior. Replace it with the valid status required by the test, such as 'active'.
…oo (stablyai#12825) Stacked on the stablyai#12793 revert. Widens the passive-identity set from {inactive} back to {active, done, inactive}, so the PR/check glyph returns to the left status lane for workspaces that are actively being worked, not just idle ones. Tradeoff, deliberate: stablyai#12658 was not purely a regression. It also fixed stablyai#8813, where an active workspace with branch identity and no PR showed the grey branch glyph instead of the emerald Active dot. This revert reintroduces that, and removes its e2e guard. The left lane holds one glyph, so activity, branch identity, and review status cannot all be shown. This picks review status.
…oo (stablyai#12825) Stacked on the stablyai#12793 revert. Widens the passive-identity set from {inactive} back to {active, done, inactive}, so the PR/check glyph returns to the left status lane for workspaces that are actively being worked, not just idle ones. Tradeoff, deliberate: stablyai#12658 was not purely a regression. It also fixed stablyai#8813, where an active workspace with branch identity and no PR showed the grey branch glyph instead of the emerald Active dot. This revert reintroduces that, and removes its e2e guard. The left lane holds one glyph, so activity, branch identity, and review status cannot all be shown. This picks review status.
Summary
Reverts #12658. Stacked on #12815 (the #12793 revert) — merge that one first.
Together the two PRs restore the pre-#12658 behavior of the worktree card's left status lane:
{inactive}back to{active, done, inactive}, so the glyph shows on workspaces being actively worked, not only idle ones.With this PR applied, the four touched sidebar files are byte-identical to their pre-#12658 state, verified with
git diffagainst003114dfad.Screenshots
Visual change — no screenshot captured yet, so stating the before/after precisely rather than claiming no visual change:
inactiveworkspaces;activeanddoneshow the activity dot instead.activeanddoneworkspaces also show the PR fork glyph in the left lane.workingandpermissionstill keep the activity dot.Screenshots to be attached before merge.
Testing
pnpm lint— full-repooxlint --format githubis clean, 0 warnings and 0 errors across 12,032 files. React Doctor and oxfmt clean on changed files.static analysiswith amax-lineserror inmobile/src/session/use-mobile-native-chat-controller.ts. That was a stale base, not this change — refactor(mobile): separate native chat controller contract #12826 shrank that file from 360 to 288 lines after I branched. Rebased onto currentmainand it is gone.pnpm typecheck— exit 0.pnpm test— full suite not run. Ran the three affected suites (WorktreeCardStatusSlot,WorktreeCard.pr-display,WorktreeCard.quick-actions): 70 tests passing across four consecutive isolated runs.pnpm build— not run.tests/e2e/worktree-card-status-indicator.spec.tsis removed along with the behavior it guarded. No new tests, since restoring prior coverage is the intent.AI Review Report
hasPathIdentityEnabledat this call site. Verified it is still consumed atWorktreeCard.tsx:424-427, so reverting its use here leaves no dead binding. Typecheck confirms.Security Audit
No security surface. No input handling, command execution, path construction, auth or permission logic, secrets, dependency changes, or IPC. It only changes which already-rendered glyph occupies a layout slot, from data the card already holds. No remote wire compatibility impact. No follow-up needed.
Notes
Known tradeoff, deliberate. #12658 fixed #8813: an active workspace with branch identity and no PR was showing the grey branch glyph instead of the emerald Active dot. This revert brings that back, and removes the e2e test guarding it.
The left lane holds exactly one glyph, so activity, branch identity, and review status cannot all be shown there. This PR picks review status.
If that turns out to be the wrong call, the middle path neither #12658 nor #12793 tried is to widen the set for review status only while keeping branch identity at
inactive-only. That satisfies #8813 and PR-on-left simultaneously, without #12793's relocation. Landing #12815 alone and closing this PR is also a valid stopping point.Merge order: this branch targets
brennanb2025/restore-worktree-pr-status, notmain. Retarget it tomainafter #12815 lands — a stacked PR merged into an already-merged parent branch reports MERGED with green checks while delivering nothing.