feat(minimald): add a save-changes-then-delete lane to the shell-exit prompt - #1124
Conversation
…e activation The keep-or-delete prompt asked users to decide without saying what a delete would lose. The host now baselines the workspace before the session process launches and the prompt lists the delta: added, modified, and deleted files (capped at 10 rows), or states that nothing changed — in which case the delete option says so. Change detection is best-effort: an unwalkable workspace or a failed re-walk renders the plain prompt and never blocks exit. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KyZLpkRf9G4A2hUDgDvn5f
… prompt The prompt's only destructive option threw away changed files. When the delta is non-empty a middle option archives the changed files to <state>/archives/<name>-<timestamp>.tar.zst and only then deletes, so deletion only ever follows a confirmed save; a failed archive write leaves the session intact and re-renders the prompt. The option is omitted when nothing changed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KyZLpkRf9G4A2hUDgDvn5f
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 43 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
Comment |
… exit walk Review follow-ups: the walk moves to walkdir (no symlink following, no hand-rolled recursion), file signatures gain a size-capped blake3 content digest so same-length mtime-preserved edits cannot masquerade as "no files changed", and the exit-time re-walk is bounded by a timeout that degrades to the plain prompt instead of blocking teardown. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KyZLpkRf9G4A2hUDgDvn5f
Carries the delta-branch review follow-ups into the archive lane; the save path's changed_paths/write_archive pick up the digest-bearing signatures unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KyZLpkRf9G4A2hUDgDvn5f
….git in the delta walk Review follow-ups: Binding::run's ProcessExited epilogue moves into a shell_exit_prompt associated fn (byte-identical channel output), and both workspace walks now skip the root-level .git directory — the delta reports working-tree files, and git-internal churn (index, refs, objects) would otherwise flood the capped row list the moment any git command runs in the session. Nested .git directories (vendored subrepos) remain ordinary workspace content. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KyZLpkRf9G4A2hUDgDvn5f
The extracted shell_exit_prompt helper carries the archive lane's extra save-then-delete arm (plus the archives_dir/name capabilities it needs), and the root .git exclusion now also keeps git-internal churn out of the save archive. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KyZLpkRf9G4A2hUDgDvn5f
# Conflicts: # Cargo.lock # crates/minimald/src/session_delta.rs # crates/minimald/src/session_host.rs
a3bd2d9 to
b458aa8
Compare
Stacked on #1123 (base is its branch; rebases onto main when it merges). The exit prompt's only destructive option throws away changed files; a middle lane archives the delta and only then deletes, so deletion only ever follows a confirmed save.
Save changes to <state>/archives/<name>-<timestamp>.tar.zst, then delete— shown only when files changed; archives added+modified files, then destroys the session.🤖 Generated with Claude Code
https://claude.ai/code/session_01KyZLpkRf9G4A2hUDgDvn5f
Note
Add save-then-delete lane to the shell-exit prompt in minimald
session_deltamodule with workspace change detection and archiving: walks the workspace before process launch to snapshot file state, re-walks on exit to compute added/modified/deleted files, and writes zstd-compressed tar archives of changed files.session_hostto display changed files (up to 10 rows) and offer a 'Save changes to , then delete' option when changes are detected; cancel defaults to keeping the session.save_changesroutine that re-computes changed paths and writes the archive before deletion, re-prompting on failure to prevent accidental data loss..git, never follows symlinks, and uses blake3 digests (capped at 4MiB) for modification detection.Macroscope summarized 2d88c04.