perf(web): format minimap previews only when opened - #11181
Conversation
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This localized web optimization defers minimap text formatting until a preview is opened while preserving navigation targets and displayed content. The supporting tests cover the extracted logic, and no schema, deployment, security, billing, default, or static-analysis behavior is changed. No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
8c1b016 to
3b9cf6e
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughChangesTimeline minimap
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Refactor Sequence Diagram(s)sequenceDiagram
participant MessagesTimeline
participant deriveTimelineMinimapItems
participant resolveTimelineMinimapPreview
MessagesTimeline->>deriveTimelineMinimapItems: pass timeline rows
deriveTimelineMinimapItems-->>MessagesTimeline: return minimap items
MessagesTimeline->>resolveTimelineMinimapPreview: resolve active item
resolveTimelineMinimapPreview-->>MessagesTimeline: return normalized preview or null
Merge Risk: ⚪ Minimal · up to The minimap change preserves source text for indexing while resolving formatting only for the active preview, with no identified merge-blocking behavior regression. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
## What's Changed * fix(pr): update labels and reviewers without redundant reloads by @maria-rcks in pingdotgg/t3code#11117 * fix(chat): fold question answers into tool activity by @maria-rcks in pingdotgg/t3code#11014 * fix(usage): flag unpriced model activity instead of showing $0.00 by @maria-rcks in pingdotgg/t3code#11021 * fix(server): let Claude launch args override the derived permission mode by @maria-rcks in pingdotgg/t3code#11026 * fix(editors): accept root paths and Windows servers in Zed remote links by @maria-rcks in pingdotgg/t3code#11044 * fix(web): center pull request unavailable states by @maria-rcks in pingdotgg/t3code#11110 * fix(web): remove sidebar pull request link icon by @maria-rcks in pingdotgg/t3code#11179 * fix(ui): color linked pr counts by aggregate status by @maria-rcks in pingdotgg/t3code#11180 * fix(preview): render website favicons for browser tool activity by @maria-rcks in pingdotgg/t3code#11032 * fix(web): simplify pull request summary sections by @maria-rcks in pingdotgg/t3code#10612 * fix(web): preserve drafts when compacting context by @maria-rcks in pingdotgg/t3code#11103 * fix(server): queue messages during context compaction by @maria-rcks in pingdotgg/t3code#11107 * perf(web): format minimap previews only when opened by @juliusmarminge in pingdotgg/t3code#11181 * perf(web): reuse completed Markdown prefixes while streaming by @juliusmarminge in pingdotgg/t3code#11193 * perf(web): resume syntax highlighting from completed lines by @juliusmarminge in pingdotgg/t3code#11196 * perf(web): preserve completed code-line DOM while streaming by @juliusmarminge in pingdotgg/t3code#11198 * perf(web): huge-thread switch no longer blanks the chat pane by @juliusmarminge in pingdotgg/t3code#11169 **Full Changelog**: pingdotgg/t3code@v0.0.41-nightly.20260911.1520...v0.0.41-nightly.20260911.1533 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.41-nightly.20260911.1533
Streaming updates eagerly compacted every loaded prompt and response for the timeline minimap, including when its preview was closed. Keep the source text in the minimap index and compact only the selected preview. Message targets and preview content stay the same.
Five rotated-order runs, 120 measured updates per run, 12 stable TypeScript fences and a growing prose tail. Same browser, origin, viewport and synthetic data; no concurrent builds or local checks. The measurements compare ab67795 with this PR's unchanged runtime implementation. Later commits adjust test fixtures only. CI validates integration with newer main. These are client rendering measurements, not provider/network throughput or production user percentiles.
A separate 200-response × 20KB stage benchmark reduced minimap item construction from 21.25 ms to below 0.1 ms. This is an isolated stage saving, not a whole-app multiplier. An open preview still formats its selected response in full.
Exploration and rejected experiments · Production samples · Minimap stage samples · Benchmark source and reproduction notes
Impacts the web timeline and the web renderer used by desktop. Mobile, server, providers, wire contracts and file/diff implementations are unchanged. No new dependency, truncation, observer or state-library migration. Conditional HTML parsing, toolbar measurement observers, and code-block memoization were discarded after compatibility or timing checks; this PR contains only lazy preview formatting. Further measured improvements are separate layers in #11193, #11196 and #11198.
Validation: 103 focused timeline tests, web typecheck, targeted lint with pre-existing timeline warnings, and current-head CI. Browser checks cover minimap keyboard navigation, long-history navigation, selected text/DOM identity through 30 streaming updates, Markdown disclosures, a 10,000-line file to EOF, and split/collapsed working-tree diffs. No new flicker was observed in these checks. Native mobile and Electron shell behavior were not exercised.
Before navigation and streaming:
https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/56590efe867cdef9/before-demo.webm
After navigation and streaming:
https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/789dea2b5f537b59/after-demo.webm
Recordings show visual states and compress dropped-frame intervals; timing comes from separate unrecorded runs. 0.8 seconds of recorder-induced startup was trimmed. No private transcript or authentication data is included. The source tree contains no probe or evidence files.
Model: GPT-6. Harness: Codex.