Files
t3code/apps
Ben DavisandClaude Opus 5 5b519775f5 fix: unify assistant text merge and detach status text from unknown
Two defects that reach users who have never touched Hermes.

The append-vs-replace rule for assistant message text was hand-written in
three projections. `textOperation: "replace"` shipped to two of them: the
live client reducer appended revised snapshots instead of replacing them,
so a provider revising cumulative output mid-turn rendered
"Hello worldHello, world!" in every connected browser until a refresh
pulled the corrected text from the server projection.

Extract one `mergeAssistantMessageText` into contracts and have the
projector, the projection pipeline, and the client reducer all call it, so
the next payload field that changes text semantics cannot land in two of
three implementations.

Generic provider activity was keyed on `itemType: "unknown"`, which Codex
deliberately emits as its "could not classify this item" sentinel and
relies on being inert. Codex threads consequently grew activity rows
summarized as the literal string "Provider activity". Add an explicit
`status_text` item type for renderable provider status lines, restore
`unknown` to inert, and prefer the status detail over the generic title
when summarizing.

Also adds the optional `model` field to connection.hello so Hermes can
report its real configured model instead of a placeholder, and ignores
__pycache__.

Regression tests cover both: the reducer test fails with the exact
"Hello worldHello, world!" corruption when the replace branch is removed,
and Codex's unknown sentinel is asserted to produce no activity.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-07-24 22:09:20 -07:00
..