Skip to content

fix(tui): give a failed session an error notice, not a success tick - #718

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

mohitranka merged 1 commit into
mainfrom
fix/session-notice-severity

Conversation

@mohitranka

Copy link
Copy Markdown
Contributor

What

The SupervisorEvent::Attention arm hardcoded FeedbackSeverity::Ok, so every out-of-band session notice arrived wearing a success marker:

  • a failed turn read [✓] Session failed
  • a turn stopped for input read [✓] Session needs input

The arm now destructures state (previously discarded with ..) and maps it through a new session_notice_severity, which follows the lifecycle grammar in FORGE-DESIGN.md §5.3:

turn state marker
Completed [✓] Ok
Failed [!] Error
Waiting [?] Warn
Interrupted [?] Warn
Cancelled `[

Cancelled is deliberately neutral rather than a success or a failure — the operator is the one who stopped it. Interrupted is a warning because both of its call sites carry "A prompt was interrupted; review it before retrying".

Verification

  • the_turn_state_picks_the_marker asserts each of the five states, and no_other_state_reports_success asserts no state other than Completed may announce itself as a success.
  • cargo test --package forge-tui --locked multi_task 54 passed, toast 9, feedback 15.
  • cargo fmt --all -- --check clean.
  • cargo clippy --package forge-tui --all-targets --locked -- -D warnings clean.

Scope

Split out from #717, which fixed the duplicate notice but deliberately preserved the hardcoded severity to keep that diff focused. The ~153 set_feedback-only call sites and the severity vocabulary unification are still untouched.

The `Attention` arm hardcoded `FeedbackSeverity::Ok`, so every out-of-band session notice arrived wearing a success marker: a failed turn read `[✓] Session failed`, and one stopped for input read `[✓] Session needs input`.

The severity now comes from the turn state, following the design system's lifecycle grammar: `[✓]` completed, `[!]` failed, `[?]` for a turn waiting on the operator or interrupted, and neutral for a cancelled turn the operator stopped themselves.

The arm binds `state` instead of discarding it with `..`.
@mohitranka
mohitranka merged commit 9574930 into main Sep 17, 2026
3 checks passed
@mohitranka
mohitranka deleted the fix/session-notice-severity branch September 17, 2026 15:53
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