Repository navigation
fix(tui): stop repeating session completion in the feedback strip - #717
Merged
Merged
Conversation
`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.
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.
What
A session that finishes while another one is selected announced itself twice.
push_toastwrites the toast and the feedback strip, so one completion painted[✓] Session completedas a two-second toast and a seven-second row inside the conversation pane. The completion notice now usespush_overlay, raising the toast alone. The session row'sattentionflag 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
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 -- --checkclean.cargo clippy --package forge-tui --all-targets --locked -- -D warningsclean.cargo test --package forge-tui --locked multi_task54 passed,toast9,feedback15.Not in this PR
set_feedback-only call sites are untouched; the feedback strip's wider fate is a separate decision.Attentionarm hardcodesFeedbackSeverity::Ok, so aFailedturn still arrives as[✓] Session failed. Preserved deliberately to keep this diff focused.Note
app::tests::chrome::completed_turn_renders_unfinished_checks_without_claiming_failurefails 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 onsession.active_task.lifecyclebefore any TUI code runs.