Phase 4: unified TUI progress, help overlay, execute confirmation - #18
Open
zackkitzmiller wants to merge 2 commits into
Open
Phase 4: unified TUI progress, help overlay, execute confirmation#18zackkitzmiller wants to merge 2 commits into
zackkitzmiller wants to merge 2 commits into
Conversation
- the scan/fingerprint/analyze/group phase now renders inside the TUI (stage checklist with spinner, live analysis gauge, cost estimate, failure count) and hands off to the review screen; plain line output is kept for piped/non-tty runs - '?' opens a help overlay listing every key per mode (organize vs dupes) — any key closes it - 'x' now opens a confirmation modal summarizing what will happen (N files into M folders, or K duplicates staged to trash with byte total and the undo/purge hint) before anything executes - footer gains a '?' hint; terminal is always restored before pipeline errors propagate - deps: atty (RUSTSEC-advisoried) dropped for std::io::IsTerminal, dotenv swapped for maintained dotenvy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The longest wait in the app — scanning and AI analysis — happened as plain
println!lines outside the TUI, then the review screen appeared abruptly. There was no help surface for discovering keys, andxexecuted immediately with no summary of what was about to happen.Stacked on #17.
Changes
tui::run_pipeline_progress): a centered, review-theme-matched panel with a stage checklist (Scan → Fingerprint → Analyze → Group), braille spinner, live analysis gauge with cached-count and cost estimate, current-file line, and failure count. Runs on a blocking task fed byPipelineEvents; hands off to the review screen when the plan is ready. Ctrl-C aborts cleanly (exit 130 after restoring the terminal). Piped/non-tty runs keep the existing line output.?opens a keys reference (sections: Navigate / Organize-or-Dupes / Act) tailored to the active mode; any key closes.xnow shows what will happen first — Organize: "Move N files into M folders" with the top folder list; Dupes: "Stage K duplicates to trash (X MB)" plus the undo/purge reassurance.⏎/yproceeds,esc/nreturns to review.atty(RUSTSEC-2021-0145) →std::io::IsTerminal;dotenv(unmaintained) →dotenvy.Deferred (noted for a follow-up): in-TUI post-execute results screen; moving text preview/diff file reads off the render thread.
Test plan
cargo test— 376 passed (new: x-opens-confirmation-then-enter-executes, confirm-cancel, help open/close)cargo clippy --all-targets— clean;cargo fmtapplied