Fix stale default-open doc comments per argus's review

ClassifyCtx's tool_use-id correlation gates markdown-vs-plain body
format for a recv result, not open/collapsed state — that's always
the operator's uniform preference now. 5 backend comments still
described it as controlling "default-open" rendering, contradicting
the actual render path and this PR's own rewritten docs.

Also fixed useAgentState.ts's stale comment promising an
SSE-triggered refresh model "in a later commit" — that's permanently
off the table now that the terminal stream's kind tag is gone by
design (argus flagged this as a drive-by, not blocking, but it's a
one-line cause-and-effect of this same PR so fixing it here).
This commit is contained in:
iris 2026-08-30 21:28:34 +02:00
commit 907567ef76
4 changed files with 32 additions and 29 deletions

View file

@ -101,14 +101,13 @@ impl TermMsg {
/// Per-connection/per-request classification state. A live SSE stream keeps
/// one of these alive for the connection's lifetime — `tool_use` id → name
/// correlation, so a `tool_result` can tell it's answering a `recv` call and
/// render as a default-open markdown message body. The history endpoint
/// render its body as markdown instead of plain text. The history endpoint
/// uses a fresh one per page: correlation only works within the page
/// actually returned, not across the live/history boundary. Accepted
/// degradation (same shape as the turn-timestamp fallback documented in
/// `docs/terminal-rendering.md`) — the only user-visible effect is a `recv`
/// result whose `tool_use` fell on the other side of a page/reconnect
/// boundary rendering as a plain block instead of default-open markdown,
/// not a functional loss.
/// degradation — the only user-visible effect is a `recv` result whose
/// `tool_use` fell on the other side of a page/reconnect boundary rendering
/// its body as plain text instead of markdown (open/collapsed state is a
/// uniform client-side preference either way, not affected by this).
#[derive(Default)]
pub struct ClassifyCtx {
tool_name_by_id: HashMap<String, String>,