Commit Graph

18 Commits

Author SHA1 Message Date
bd9d481e81 Add file-based locking to state mutations to prevent concurrent write races
Parallel operations (e.g. stale review cleanup in `list`) could
clobber each other via read-modify-write on the shared state file.
Also fix spinner lifecycle in `review` and simplify empty-list output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 11:04:33 -07:00
69ba73b3c3 Use patchSession to avoid race conditions in review flag updates
The load-modify-save pattern could overwrite concurrent state changes.
patchSession does an atomic read-patch-write, and the list command now
re-checks activity before clearing stale flags to avoid racing with a
review that just started.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 10:56:50 -07:00
2f524da292 Fix stale review flag healing and prevent concurrent state overwrites
Use already-loaded state in list command instead of re-reading. In review
command, patch in_review on fresh state to avoid clobbering concurrent
changes, and skip worktree save in print mode. Remove unused white import
and unnecessary nullish coalescing fallback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 23:55:49 -07:00
a682539db3 Batch stale review-flag writes and fix review cleanup ordering
Move in_review flag set before try block so it is always visible,
and consolidate per-session state writes into a single batch to
avoid repeated disk I/O during list. Also guard against missing
status entries with fallback defaults.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 23:38:02 -07:00
3ba550d80a Fix stale in_review flag handling and review lifecycle
Move in_review flag set inside try block so finally always clears it,
and actively clear stale flags in list when Claude is no longer active.
Previously a crash between setting the flag and entering try would
leave the session stuck in review state.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 23:28:42 -07:00
bc102e416c Add in_review status to sessions and self-heal stale review flags
Review status now requires Claude to be active, preventing stale flags
from showing after a crash. Consolidates icon/color maps into a single
styles record and defers setting in_review until the container is up.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 23:16:06 -07:00
92dbad3cad Add review status tracking to sessions
The list command needs to show when a session is under active
review so users don't interrupt it. Wrapping the review body in
try/finally ensures the flag is always cleared on exit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 23:08:41 -07:00
c07911bd70 Refactor review prompt for clarity 2026-03-11 21:25:41 -07:00
4a465f7787 Improve review prompt 2026-03-11 14:09:47 -07:00
3438dddd5c Add git diff instruction to review prompt 2026-03-11 07:50:24 -07:00
5cc102ccdf four! 2026-03-09 19:45:21 -07:00
e5e3a73cae whoops 2026-03-05 20:29:16 -08:00
b0ee848f39 this seems to work better 2026-03-05 07:39:28 -08:00
Chris Wanstrath
dc329ce446 new review 2026-03-04 13:49:40 -08:00
c2a082b780 Add optional prompt argument to review command 2026-03-01 21:04:03 -08:00
6114540764 Return exit code and output from claude() and retry without --continue on failure 2026-02-23 07:32:42 -08:00
e88de1aed3 save changes after review completes 2026-02-20 18:41:36 -08:00
14cad28488 Refactor cli.ts into per-command modules with shared utilities 2026-02-20 15:43:15 -08:00