Hide approved automatic review warnings in the TUI (#39605)

## What changed

- Ignore Guardian warning notifications that report a successful automatic approval review, keeping approved reviews out of TUI history.
- Continue displaying all other Guardian warnings.
- Extend the approved-review history test to cover the notification path.

GitOrigin-RevId: 719e84bc5b20c0a5364d10f84be9c6ac96158719
This commit is contained in:
Eric Traut authored and copyberry committed 2026-08-20 05:54:19 +00:00
1 parent 3434c2545b
commit 430bc36fb2
2 files changed
+13 -1

No files matched your search

@@ -163,6 +163,13 @@ async fn guardian_approved_exec_is_hidden_from_history() {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(/*model_override*/ None).await;
chat.show_welcome_banner = false;
chat.handle_server_notification(
ServerNotification::GuardianWarning(GuardianWarningNotification {
thread_id: "thread-1".to_string(),
message: "Automatic approval review approved (risk: low, authorization: high): Narrowly scoped to the requested file.".to_string(),
}),
/*replay_kind*/ None,
);
chat.on_guardian_assessment(GuardianAssessmentEvent {
id: "thread:child-thread:guardian-1".into(),
target_item_id: Some("guardian-approved-target".into()),