Skip to content

fix(tui): stop repeating session completion in the feedback strip - #717

Merged
mohitranka merged 1 commit into
mainfrom
fix/session-completion-double-notice
Sep 17, 2026
Merged

mohitranka merged 1 commit into
mainfrom
fix/session-completion-double-notice

Conversation

@mohitranka

Copy link
Copy Markdown
Contributor

What

A session that finishes while another one is selected announced itself twice.

push_toast writes the toast and the feedback strip, so one completion painted [✓] Session completed as a two-second toast and a seven-second row inside the conversation pane. The completion notice now uses push_overlay, raising the toast alone. The session row's attention flag is untouched.

Why

The strip is the app's persistent status line — the "record" in FORGE-DESIGN.md §9.10 — and the toast is the interruption. A finished turn is an interruption, not a status line, and it was rendering as both at once.

Verification

  • New test a_finished_session_elsewhere_notifies_the_toast_only (crates/forge-tui/src/app/tests/multi_task.rs). Confirmed it fails without the fix: the same completion must not also write the feedback strip, got "Session completed".
  • cargo fmt --all -- --check clean.
  • cargo clippy --package forge-tui --all-targets --locked -- -D warnings clean.
  • cargo test --package forge-tui --locked multi_task 54 passed, toast 9, feedback 15.

Not in this PR

  • The ~153 set_feedback-only call sites are untouched; the feedback strip's wider fate is a separate decision.
  • The Attention arm hardcodes FeedbackSeverity::Ok, so a Failed turn still arrives as [✓] Session failed. Preserved deliberately to keep this diff focused.

Note

app::tests::chrome::completed_turn_renders_unfinished_checks_without_claiming_failure fails locally (left: Waiting, right: Completed). It fails identically on a clean tree with these changes stashed, so it is pre-existing and unrelated — it asserts on session.active_task.lifecycle before any TUI code runs.

`push_toast` writes the toast AND the feedback strip, so a session that finished while another one was selected painted `[✓] Session completed` twice: a two-second toast in the corner, and a seven-second row inside the conversation pane.

The completion notice now pushes to the toast only, via `push_overlay`. The `attention` flag on the session row is unchanged.

Adds `ToastState::has_toast` behind `#[cfg(test)]` so the new test can assert the toast fired while the strip stays empty.
@mohitranka
mohitranka merged commit 2048a1c into main Sep 17, 2026
3 checks passed
@mohitranka
mohitranka deleted the fix/session-completion-double-notice branch September 17, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant