Repository navigation
feat(mobile): fold a reply's step rows into one summary line - #656
Merged
Merged
Conversation
A long exchange produces a dozen thinking/tool rows, each a full line on a
phone-sized transcript, and they crowd out the prose between them. Fold
consecutive foldable step slices into a single summary line ("Thought 2× ·
Ran a command 3×") that opens into the individual rows, each of which still
expands to its own detail.
Prose, compaction dividers, failed calls, and the slice a streaming reply is
still on pass through unfolded — nothing that is still changing is hidden.
Render-only: the shared projection still carries every slice in stream order,
so the desktop transcript is unchanged.
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.
Why
A long exchange on a phone produces a dozen thinking/tool rows, each a full line, and they crowd out the prose between them — the transcript reads as an unbroken column of
思考中 / 已运行 / 思考中 / 已运行. Desktop (with the "show thinking" setting off, its default) does not have this problem: thinking segments render nothing, and consecutive same-kind completed bursts are already folded by the shared projection.What
Fold consecutive foldable step slices of an assistant reply into one summary line, expanded on tap:
Notes
buildReplyBlocksis applied in the view; the shared@future-os/thread-projectionoutput is untouched, so the desktop transcript and the wire contract are unaffected.chat.runCountkey for the aggregation — no new locale strings.Tests
Four cases in
TimelineCard.test.ts: folding into one summary line, two-tap drill-down to detail, failures never folding, and the streaming tail staying visible.Local (module-scoped, mobile only):
npm run typecheck✅ ·npm run lint✅ ·npm test— 95 suites / 1332 tests ✅