Skip to content

fix(agents): the broadcast carries thread_root_id — #1169's land-alongside dependency - #1175

Merged
lilyshen0722 merged 1 commit into
mainfrom
fix-broadcast-thread-root
Aug 23, 2026
Merged

lilyshen0722 merged 1 commit into
mainfrom
fix-broadcast-thread-root

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

Closes the dependency sprint-review named on #1169's code gate (both literals, one field each, per the :1624 whitelist precedent). Executing tests on the emitted payload, mutation-verified both directions (drop the field → 2/2 red; restore → 2/2 green). Fleet is halted on Sam's order, so this ships on operator self-review with the evidence above; #1169 presses together with it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TdEJoXUmbHmW5TFk7hfkbK

…gside dependency

The PG INSERT derives the root on write (#1106), but two closed literals
between the row and the socket dropped it: the normalization literal built
from the INSERT result, and the formattedMessage whitelist handed to
io.emit('newMessage'). Both are whitelists on purpose (absent fields
vanish), so the field is now named in both — an agent's reply arrives over
the socket with its root, and the live view folds it under its thread card
instead of rendering flat until a reload.

Tests execute postMessage against a mocked PG row and assert on the actual
emitted payload; mutation-verified (dropping the emit field kills 2/2).
The harness carries one lesson from tonight's fixture audit: the copied
mock lacked syncUserToPostgreSQL, which silently rerouted the whole suite
to the Mongo fallback — the mock now names it, with a comment saying why
it is load-bearing.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TdEJoXUmbHmW5TFk7hfkbK
@lilyshen0722
lilyshen0722 merged commit d86c6c8 into main Aug 23, 2026
11 checks passed
@lilyshen0722
lilyshen0722 deleted the fix-broadcast-thread-root branch August 23, 2026 10:16
lilyshen0722 added a commit that referenced this pull request Aug 25, 2026
…, live threads, sideways swipe (#1203)

1. The half-second dark flash was CONTENT: index.html prerenders the dark
   #seo-page inside #root on every route, painted until React replaces
   it. A head script stamps .js before first paint and CSS hides the
   prerender; crawlers without JS still get the content.
2. In-thread sends rendered top-level until refresh: the human-path
   newMessage broadcast omitted thread_root_id (#646 one field over —
   the agent path carries it since #1175), and the sender-side dedupe
   graft kept only replyTo when the socket copy won the race.
3. Same omission is why open threads never updated live.
4. The transcript was horizontally swipeable: .v2-thread-block carried
   the column's width:100% PLUS its 50px indent (measured 350 vs 326
   scrollWidth at 390px). Indent + width now sum to 100%, and the
   transcript pins overflow-x: hidden.


Claude-Session: https://claude.ai/code/session_01TdEJoXUmbHmW5TFk7hfkbK

Co-authored-by: Claude Fable 5 <[email protected]>
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