c320dac131
Only visible assistant reply text, a pending form or an unresolved permission request is unread. Tool results, user prompts, harness notices/agent reports and blank deltas only drive the working state.
22 lines
1.1 KiB
Markdown
22 lines
1.1 KiB
Markdown
# Chat list: tool calls no longer mark a chat New
|
|
|
|
Follow-up to 985cc355 ("Fix chat session unread attention state").
|
|
|
|
Root cause: that fix made unread purely frame-driven
|
|
(`lib/features/chat/ui/sessions/session_attention.dart`), but it still listed
|
|
a returned tool result (`kind: tool`, status `completed`/`error` with content or
|
|
error) and any `kind: user` frame as unread content. Every finished tool call in
|
|
a background chat therefore raised the New badge even when the agent had said
|
|
nothing yet. Text frames carrying a `message_kind` (harness `notice`, subagent
|
|
`agent_report`, often emitted around tool calls) and whitespace-only deltas also
|
|
counted.
|
|
|
|
Now only visible assistant reply text (`kind: text`, non-blank delta, no
|
|
`message_kind`, matching the server's own `finalReplyTextLocked`), a pending
|
|
form, or an unresolved permission request marks a chat New. Tool frames only
|
|
drive the working indicator. The open chat stays excluded (`activeSessionId`).
|
|
|
|
Tests: `test/features/chat/ui/sessions/chat_sessions_live_new_test.dart`
|
|
(tool call case, open-chat case), `session_attention_test.dart` (frame table).
|
|
Not browser- or device-verified.
|