Skip to content

tray: review changes in its own window; keep rows busy until the list refresh lands - #458

Merged
m4ttheweric merged 3 commits into
mainfrom
review-sheet-collapsible-files
Sep 25, 2026
Merged

m4ttheweric merged 3 commits into
mainfrom
review-sheet-collapsible-files

Conversation

@m4ttheweric

Copy link
Copy Markdown
Collaborator

Summary

Review uncommitted changes now opens in its own resizable window with every file collapsed, and a worktree row stays busy after an action until the refreshed list actually drops or moves it.

What changed

Review window (WorktreeReviewWindow.swift, WorktreeReviewSheet.swift)

  • Replaces the sheet with one resizable window (960x760 default, frame autosaved); Review on another row retargets it
  • Adds a disclosure header per file on the card colour over the neutral diff body; all start collapsed
  • Option-click on a header opens or closes every file
  • Swaps dismiss for an onClose the window host owns; the panel closing closes it too

Busy until the list lands (WorktreePanelController.swift, Triage.swift)

  • Adds TriageSettleLedger: a finished action waits on the query started after it, applied rows release earlier waiters, a failed query only its own
  • Keeps a row busy on success until that query applies; a refusal clears it at once so the footer error is usable
  • Holds "Clean up N safe" at its last progress label until the refresh lands, and skips rows already busy

Also

  • Adds two files to the diff fixture and a review-sheet-expanded snapshot

Verification

  • New check for the ledger failed before TriageSettleLedger existed; mattstack-checks 529/529 green
  • Snapshots checked light and dark, collapsed and expanded
  • Live in mattstack-dev: a real "look" tree (4 files) opened in the window, files collapsed, Discard and dispose kept the row spinning until it dropped from the list

🤖 Generated with Claude Code

m4ttheweric and others added 2 commits September 25, 2026 09:04
Review opens a resizable window (one, retargeted per row) instead of a
sheet capped by the Worktrees window. Each file is a disclosure header on
the card colour over a neutral diff body; all start collapsed, and
option-click opens or closes them all.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A finished action cleared the row's busy state on the daemon's reply,
then waited seconds for the triage query, so a disposed row sat at rest
looking untouched. Rows now stay busy until a query started after the
action applies (or fails), via TriageSettleLedger. Clean up N safe does
the same and skips rows already busy.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 30 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 85 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 3988d91b-8762-461c-bc5e-3808d6e55728

📥 Commits

Reviewing files that changed from the base of the PR and between 1d37692 and 83be7a8.

📒 Files selected for processing (11)
  • rt-tray/Sources-core/Worktree/Triage.swift
  • rt-tray/Sources/AppDelegate.swift
  • rt-tray/Sources/WorktreePanelController.swift
  • rt-tray/Sources/WorktreePanelView.swift
  • rt-tray/Sources/WorktreeReviewSheet.swift
  • rt-tray/Sources/WorktreeReviewWindow.swift
  • rt-tray/Sources/WorktreeSnapshot.swift
  • rt-tray/Sources/WorktreeTokens.swift
  • rt-tray/Tests/MattstackCoreChecks/TriageChecks.swift
  • rt-tray/Tests/fixtures/worktree-triage-catalog.json
  • rt-tray/Tests/fixtures/worktree-triage-diff.json

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

- a fresh identity per Review show, and teardown on close, so the same
  row reviewed again reloads its diff instead of acting on the old one
- close the review window from the panel's willClose (onDisappear never
  fires for the reused panel window)
- disable the review buttons while the row is busy or a bulk clean runs
- let loading/failed states shrink with the window
- a settle waiter always forces its query; bulk skips busy rows in the
  view too; catalog fixture lists charlie's three files

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@m4ttheweric
m4ttheweric merged commit 97f4870 into main Sep 25, 2026
6 checks passed
@m4ttheweric
m4ttheweric deleted the review-sheet-collapsible-files branch September 25, 2026 16:06
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