diff --git a/local/recipes/tui/tlc/PLAN.md b/local/recipes/tui/tlc/PLAN.md index 2284b6c2a1..88b8cc3097 100644 --- a/local/recipes/tui/tlc/PLAN.md +++ b/local/recipes/tui/tlc/PLAN.md @@ -775,6 +775,19 @@ All 4 W6-series items complete: - **W6c**: Add search wrap-around notification — `last_wrapped` flag in both editor `SearchState` and viewer `Search`; "Search wrapped" message on wrap in both editor and viewer - **W6d**: Editor status bar tab width indicator — `Tab:{width}` in `status_string()`; hardcoded widget defaults verified as dead code (all rendering goes through `render_popup` which uses theme colors) +### 9.5 Progress Dialogs for File Operations (W7, 2026-07-06) + +Foreground copy/move/delete now spawn on a background thread and show the existing `ProgressDialog` (gauge, sparkline, ETA, cancel button) while the operation runs. The event loop polls the result channel every frame and applies the outcome when the thread finishes. + +- **DialogState::Progress** variant added — modal progress dialog with live OpHandle progress +- **PendingProgressOp** tracks kind/sources/destination/result channel/preserve+follow flags +- **spawn_op_with_progress()** spawns thread + shows modal progress dialog with title "Copying..."/"Moving..."/"Deleting..." +- **tick_progress()** polls channel via `try_recv()`, handles `Ok(Ok(()))` (success), `Ok(Err(DestExists))` (→ overwrite dialog), `Ok(Err(other))` (→ error dialog), `Empty` (keep waiting), `Disconnected` (→ "thread panicked") +- **ProgressDialog Cancel key** (Enter when cancel button focused) calls `handle.cancel()`; Tab toggles focus +- **Wired into app.rs event loop** — `fm.tick_progress()` runs in the timeout branch; re-render triggers every tick while `pending_progress.is_some()` or `tick_progress` completed + +All 1381 tests pass, zero warnings, committed `9024b87934`. + ## 10. REFERENCES - MC 4.8.33 C source: `local/recipes/tui/mc/source/` (read-only cross-reference)