Repository navigation
fix(desktop,mobile): keep a long reply whole instead of folding its notes away - #1627
Merged
Merged
Conversation
…otes away A settled reply was folded onto its last paragraph, hiding everything before it behind "查看过程". Measured on this machine's Agent store (4,713 replies with prose): the fold hid a median of 10 prose blocks and ~15 KB per reply, and in 78% of replies more than half of all the prose. A long run that narrates its work between tool calls therefore read as a single line — one reported reply showed 59 characters of 7,221. The fold only helps the commonplace shape: one answer with a couple of notes on the way there. Past a ceiling of two hidden prose blocks or 800 hidden characters the reply is now returned whole. That leaves 5.5% of replies folding, hiding a median 26% of their prose, so short replies keep the convenience while a narrated run keeps its reasoning. The desktop and the phone each carry this rule and must agree; both get the same ceiling and the same tests.
huichen
enabled auto-merge (squash)
November 16, 2026 02:18
huichen
added a commit
that referenced
this pull request
Nov 16, 2026
#1627 put a ceiling on the fold — a reply stayed whole once it would hide more than two prose blocks or 800 characters — so a completed reply that narrated its work between calls came back as five paragraphs with its tool rows interleaved, the shape the `detailed` display level exists for. The fold is not a judgement to make reply by reply: a settled reply is its answer plus the work that produced it, and that work belongs behind one row the reader can open, however much of it there is. A reader who wants the work in place picks `detailed` once, in settings. Streaming is unchanged and was never part of the ceiling: while the reply is being written nothing is folded away. Drops FOLD_PROSE_BLOCKS / FOLD_PROSE_CHARS from both clients and the tests that pinned them; the tests now pin the opposite — a reply narrating ten notes, or thousands of characters of them, still folds onto its last prose. Both clients keep the same rule and the same cases.
huichen
added a commit
that referenced
this pull request
Nov 16, 2026
…1632) #1627 put a ceiling on the fold — a reply stayed whole once it would hide more than two prose blocks or 800 characters — so a completed reply that narrated its work between calls came back as five paragraphs with its tool rows interleaved, the shape the `detailed` display level exists for. The fold is not a judgement to make reply by reply: a settled reply is its answer plus the work that produced it, and that work belongs behind one row the reader can open, however much of it there is. A reader who wants the work in place picks `detailed` once, in settings. Streaming is unchanged and was never part of the ceiling: while the reply is being written nothing is folded away. Drops FOLD_PROSE_BLOCKS / FOLD_PROSE_CHARS from both clients and the tests that pinned them; the tests now pin the opposite — a reply narrating ten notes, or thousands of characters of them, still folds onto its last prose. Both clients keep the same rule and the same cases.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A settled reply was folded onto its last paragraph, hiding everything before it behind the fold toggle. Measured on this machine's Agent store (4,713 replies with prose), that fold hid a median of 10 prose blocks and ~15 KB per reply, and in 78% of replies more than half of the prose — so a long run that narrates its work between tool calls read as a single line (one reported reply showed 59 characters of 7,221). This PR puts a ceiling on the fold: a reply that would hide more than two prose blocks or more than 800 characters is returned whole, on both the desktop and the phone.
Commits
fix(desktop,mobile): keep a long reply whole instead of folding its notes away — the same ceiling and the same tests on the desktop (replyBlocks.ts) and the phone (ReplyBlocks.tsx); 5.5% of replies still fold, hiding a median 26% of their prose.Verification
Local, at
5bd6e5e97, Node 26.3.0,ulimit -n 8192:npx tsc --noEmitclean;npx eslint src/features/agent/replyBlocks.ts src/features/agent/replyBlocks.test.tsclean;npx vitest run src/features/agent/replyBlocks.test.ts→ 23 passednpx tsc --noEmitclean;npx jest --runInBand src/features/chat/__tests__/replyBlocks.test.ts→ 12 passedUser-visible changes
5bd6e5e97.