Render all transcript message kinds live - #73
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1073b99711
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // kinds) use the same normalized /api/messages renderer immediately. | ||
| // This is deliberately fail-safe: an unknown kind costs one refresh | ||
| // instead of remaining invisible until agent_end. | ||
| if (!isReplay) void refreshMessages().catch((error) => console.error("Could not refresh completed transcript message", error)); |
There was a problem hiding this comment.
Preserve streamed content during live-message refreshes
When a custom or other non-streamed message_end arrives after assistant text/thinking deltas but before the assistant's own message_end, this full refresh clears the live assistant DOM and streaming state; /api/messages does not yet contain the partial assistant response, so the already-rendered prefix disappears and subsequent deltas show only the suffix until agent_end restores the final transcript. Append/reconcile the completed non-assistant entry without clearing active streaming content, or preserve and restore the streaming state around the refresh.
Useful? React with 👍 / 👎.
ReviewThe diagnosis and the projection work are right, but the delivery mechanism (broadcast the full transcript on every 🚫 Blockers1. The new e2e passes with the fix completely removedI checked out this branch, deleted the entire live-reconcile block from A stricter variant (wait for the card, then check Cause: the mock harness broadcasts Second gap: the mock bypasses For this to be a real guard: route mock events through the host event handler (or attach 2. A full transcript snapshot on every
|
This reverts commit efed400.
|
Addressed the review blockers in the latest commits:
Validation: typecheck, 167 unit tests, build, 147 desktop functional tests locally (2 skipped), targeted regression, and PR checks all pass. |
Re-review of
|
|
Addressed the re-review items in
Validation passes: typecheck, 169 unit tests, build, targeted E2E, and PR checks. |
Re-review of
|
|
Addressed the final re-review notes in
Validation passes: typecheck, 169 unit tests, build, targeted E2E, and PR checks. |
Re-review of
|
|
Thanks — addressed the two immediate follow-ups in
I also added the retry-error flake and first-load service-worker reload findings to #75. Replay recovery remains a non-blocking dedicated follow-up; the reviewed scratch verification confirms the current behavior. PR checks pass. |
Final pass on
|
Summary
Closes #70.
MessageDtointo a role-discriminated serializable unioncustomType,details,display, string/array content, and entry metadata during projectiondisplay: falsecustom messages and render visible custom messages distinctlymessage_endkinds through the same normalized/api/messagesbulk renderer used on initial loadValidation
npm run typechecknpm run test:unit— 167 passednpm run buildnpm test— all tasks and shards passedgit diff --checkThe full suite retried two unrelated existing tablet cases successfully; no test task failed.