Skip to content

fix(desktop,mobile): fold every settled reply onto its answer again - #1632

Merged
huichen merged 2 commits into
mainfrom
pr/huichen
Nov 16, 2026
Merged

huichen merged 2 commits into
mainfrom
pr/huichen

Conversation

@huichen

@huichen huichen commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

A settled reply should read as its answer plus the work that produced it, with that work behind one row the reader can open. #1627 put a ceiling on that fold — a reply stayed whole once folding 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. This removes the ceiling from both clients, so every settled reply folds back onto its last prose. Streaming is untouched: nothing is folded while the reply is still being written.

Commits

  • fix(desktop,mobile): fold every settled reply onto its answer again — drop FOLD_PROSE_BLOCKS / FOLD_PROSE_CHARS from the desktop rule and the phone copy, and flip the tests that pinned them to pin the opposite (ten narrated notes, thousands of characters, a wall of tool rows all still fold).

Verification

Run at 11d99c4b5 on a clean tracked tree (origin/dev-huichen tip), Node 26.3.0:

  • npx tsc --noEmit (desktop) → clean
  • npx eslint src/features/agent/replyBlocks.ts src/features/agent/replyBlocks.test.ts (desktop) → clean
  • npx vitest run src/features/agent/replyBlocks.test.ts (desktop) → 1 file / 22 tests passed
  • npx tsc --noEmit (mobile) → clean
  • npx eslint src/features/chat/messages/ReplyBlocks.tsx src/features/chat/__tests__/replyBlocks.test.ts (mobile) → clean
  • npx jest src/features/chat/__tests__/replyBlocks.test.ts (mobile) → 1 suite / 11 tests passed

User-visible changes

  • Settled replies fold again regardless of length. Before: a completed reply that hid more than two prose blocks or 800 characters of narration was shown whole, so long runs appeared as several paragraphs with tool rows interleaved. After: every settled reply folds onto its last prose, however much work precedes it — one collapsed row that expands on click. A reader who wants the work in place chooses the detailed display level in settings, where nothing is folded.
  • Both surfaces move together: the desktop and the phone keep the same rule, so a given reply reads the same on either.
  • Streaming is unchanged.
  • Revert commit: 687164b29 (restores the pre-fix(desktop,mobile): keep a long reply whole instead of folding its notes away #1627 behaviour and removes the ceiling constants).

Notes

This intentionally reverts the ceiling introduced by #1627; the reasoning that motivated that ceiling is recorded there. Nothing changes in data formats, defaults, or settings.

#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
huichen enabled auto-merge (squash) November 16, 2026 18:18
@huichen
huichen merged commit 3132c75 into main Nov 16, 2026
12 checks passed
@huichen
huichen deleted the pr/huichen branch November 16, 2026 18:38
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