Repository navigation
fix(clients): collapsed turns show one context-compacted divider - #34177
juliusmarminge merged 1 commit into
Conversation
A finished turn that compacted more than once kept every compaction divider visible when folded, stacked under the Worked for row and reading as one duplicated line. A folded turn now keeps only its latest divider; earlier ones fold with the turn's other work and reappear in place when expanded. Single-compaction turns are unchanged. Fixes pingdotgg#33825
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Collapsed turns on web and mobile retain the latest context-compaction divider while folding earlier ones into existing hidden activity. The change is presentation-only and leaves conversation data and compaction behavior unchanged. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
EvidenceRun the same synthetic turn on both commits: three reads with two completed context compactions interleaved. Once finished, expand Worked for and collapse it again. Base shows two stacked dividers while collapsed; head shows one. Expansion restores both dividers between reads 1/2 and 2/3 on all four clients. Environments: Chromium web 1280×800 CSS; Linux Electron 1100×780; iPhone 18 Pro / iOS 27.2 native client (402×874 captures); Pixel 9 / Android API 36 native client (1080×2424 captures). Light theme, separate fresh databases, identical replay fixture; each native client loads its commit’s Metro bundle. All stills passed a pixel-identical second capture at least 500 ms later.
Recordings show collapsed → expanded → collapsed:
Drivers: synthetic seed, native thread opener, native recording driver, attempted scenario, scenario replay fixture. The scenario runner did not produce a successful paired proof; the evidence above is the manual comparison. AI-assisted; verified with the tests and tools listed above. |
|
Note Written by Verified in a real dev environmentHead
main: the collapsed turn shows all four "Context compacted" dividers stacked under "Worked for 2m 41s". PR: the collapsed turn shows only the latest divider (68.1K -> 7.50K). Expanding restores all four in place between the reads. Collapsing again goes back to one. Nearby behavior on the PR build:
CI on Not verified
|




















Problem
When a finished turn that compacted context more than once is collapsed, every "Context compacted" divider stays visible, stacked directly under "Worked for". They look like one line shown twice, while expanded they sit far apart among the tool calls.
Change
A collapsed turn keeps only its most recent compaction divider visible, so it still shows that context was compacted (the reason 2797dbb kept dividers out of the fold). Earlier dividers fold with the rest of the turn's work and reappear in place when it is expanded. Turns with one compaction are unchanged.
Mobile has its own copy of the fold logic (
threadActivity.ts) with the same skip, so it gets the same change.packages/client-runtimehas no turn-fold logic.Scope and approval
Bug fix for #33825. Logic-only change in the two fold functions.
Verification
MessagesTimeline.logic.test.ts. Two compactions in one turn: collapsed shows one fold row and only the second divider; expanded shows both in order. It failed on main (both dividers visible) and passes now (96 tests).threadActivity.test.ts; failed on main with[100000, 90000], passes now (49 tests). The two clients have separate fold implementations, so each has its own case.vp run check:changed origin/main: format, lint, knip, typecheck, tests and React compiler checks pass.Fixes #33825