From c244760b67af3fd5cd846abf6837542d69856e4a Mon Sep 17 00:00:00 2001 From: Hunter Bown Date: Sun, 3 May 2026 07:18:02 -0500 Subject: [PATCH] feat(stash): /stash pop reports remaining count (#440 polish) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After popping, the user wants to know whether to keep popping or move on. Currently the message just shows the restored preview — silent on stash depth. Adds a parenthetical: Restored stashed draft: (3 more parked) Restored stashed draft: (1 more parked) Restored stashed draft: (stash now empty) Mirrors the queue-edit confirmation pattern so users get consistent depth feedback whether they're popping a draft or editing a queued message. --- crates/tui/src/commands/stash.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/crates/tui/src/commands/stash.rs b/crates/tui/src/commands/stash.rs index 766f877d..1723e440 100644 --- a/crates/tui/src/commands/stash.rs +++ b/crates/tui/src/commands/stash.rs @@ -71,7 +71,16 @@ fn pop(app: &mut App) -> CommandResult { app.input = entry.text.clone(); app.cursor_position = app.input.len(); let preview = preview_first_line(&entry.text, 60); - CommandResult::message(format!("Restored stashed draft: {preview}")) + // Tell the user how many drafts remain so they can plan + // whether to keep popping or move on. Matches the + // confirmation pattern used by the queue surface. + let remaining = composer_stash::load_stash().len(); + let suffix = match remaining { + 0 => " (stash now empty)".to_string(), + 1 => " (1 more parked)".to_string(), + n => format!(" ({n} more parked)"), + }; + CommandResult::message(format!("Restored stashed draft: {preview}{suffix}")) } None => CommandResult::message("Stash empty — nothing to pop."), }