Repository navigation
fix(site): keep paragraph breaks in streamed chat text - #30551
Conversation
|
@codex review |
|
Chat: Review posted | View chat Review history
deep-review v0.13.0 | Round 1 | Last posted: Round 1, 2 findings (2 P2), COMMENT. Review Finding inventoryFinding inventory: PR #30551Findings
Contested and acknowledgedRound logRound 1Full panel (round 1). Netero first pass: 1 P4, 1 Note, no P0, panel proceeded. Panel: ging-ts, nami, melody (specialists), pariston, mafuuu (core), bisky (tests changed), gon, leorio (once-per-PR floor), knov (wildcard). Six reviewers reported no findings. Gon: 2 P2, 1 P3, 1 Nit. CRF-2 merges Netero's Note with Gon's P2 on the same divergence. The PR author asked in IC_kwDOGkVX1s8AAAABaoTeeA that the review be limited to P0, P1, and P2, so P3 and below and Notes are recorded but not posted. Drop gate for CRF-2 and CRF-3: kept at P2 because Gon's rubric sets P2 for wrong or restating comments and the downgrade argument (wording-only) was weaker than the rubric. Reviewed against 782fb30..5bd405d. About deep-reviewCRF = Coder Review Finding (P0-P4, Nit, Note)
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
There was a problem hiding this comment.
This PR keeps whitespace-only text and reasoning deltas that follow a block of the same type, so paragraph breaks survive in live streams and in stored per-delta parts. 2 P2 findings, both about comments. As you asked, only P0 to P2 findings are posted.
Out of scope (needs a ticket or explicit acceptance by a human):
coderd/x/chatd/chatprompt/chatprompt.go:1475: whitespace-onlytextparts are skipped when an interrupted turn is replayed to the model, so the model's history still has the joinedwriting.Like thistext this PR fixes in the UI.site/src/pages/AgentsPage/components/ChatConversation/streamState.ts:51: unchanged comment uses an em dash, whichmake lint/emdashis meant to reject.site/src/pages/AgentsPage/components/ChatConversation/messageParsing.ts:242: unchanged comment uses an em dash, whichmake lint/emdashis meant to reject.
🤖 This review was automatically generated with Coder Agents.
The chat transcript dropped every whitespace-only text or reasoning delta. A provider can stream a paragraph break as its own "\n\n" delta, so the live preview showed "writing.Like this" until the saved message replaced it. Interrupted turns stored one part per delta show the same joined text after the turn ends. Whitespace-only text now extends the preceding block of the same type and is dropped only where it would start a block, so a leading whitespace delta still does not end the starting phase.
appendText ignores part type, so it does not match appendTextBlock for whitespace after another part type. The stream state comment now gives only the reason for its check.
6d0d736 to
aad92cb
Compare
The chat transcript dropped every whitespace-only
textorreasoningdelta (appendTextBlock,appendText, and the stream state guard in front of them). A provider can stream a paragraph break as its own"\n\n"delta, so the live preview showedwriting.Like thisuntil the saved message replaced it, and markdown that depends on line starts (headings, lists) rendered as inline text until then. Interrupted turns stored one part per delta show the same joined text permanently. #29661 would stop storing new ones that way; this change also renders the existing rows correctly.Whitespace-only text now extends the preceding block of the same type and is dropped only where it would start a block. A leading whitespace delta therefore still leaves the stream state
null, so it does not end the "starting" phase, which is what the old guard was for.These tests fail on
mainand pass here:Decision log
streamState.ts:appendTextBlockalso drops the whitespace when rendering stored messages, andappendTexthad the same check for themarkdownfield, which renders user messages and notices and feeds "Copy message".parsed.markdowncan now end in whitespace when the last part is whitespace, so "Copy message" may include trailing newlines. Emptiness checks inmessageHelpers.tsalready use.trim().