Repository navigation
Defer Markdown far from the view so long threads open fast - #463
Merged
Merged
Conversation
Hosted CI's approved 500 ms cold-open gate failed on runner variance: a cold open spent ~110 ms parsing Markdown for every visible answer. Turns before the newest eight now show their text as written until it nears the transcript's view, then parse once and stay parsed; scroll anchoring keeps the reader's place. The budget probe waits for parsed Markdown. Local five-launch median ~190 -> 88 ms; 3x throttled 806-870 -> 312-340 ms. The gate is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Code coverage overviewLanguages: TypeScript TypeScript / code-coverage-agent
View coverage of the 2 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 1, 2026
This branch was successfully deployed
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.
Val chose "Defer offscreen answers" on 2026-10-30 after the hosted cold-open analysis. This PR is for Val's review before it is queued.
Why. The approved 500 ms five-launch cold-open gate (
e2e/transcript-measure.spec.ts) failed on hosted runner variance. Across 33 hosted runs on 2026-10-30 the median was 377.7 ms. Run 41056164788 failed at 781.9 ms on application code identical to a 436.1 ms pass two minutes earlier. Traces show a cold open is one renderer task of 150–180 ms (locally), about 110 ms of it parsing Markdown for every visible answer.Change.
DeferMarkdown(Markdown.tsx) wraps every turn before the newest eight (ThreadView.tsx). Its Markdown shows as written (escaped text,.md-deferred) until it comes within 1,500 px of the transcript's view, then parses once and stays parsed.The gate is unchanged. The budget probe now also requires the last answer to be parsed Markdown, so a deferred answer can't count as opened.
Results (local, M5 Max).
companion.spec.ts:44, which is unrelated and passed when rerun alone.Tests.
e2e/markdown-defer.spec.ts:overflow-anchor: nonethis case fails, moving 96 px.test/markdown-render.test.ts.For review.
Evidence:
docs/reviews/2026-10-30-deferred-markdown.md;status.mdupdated.🤖 Generated with Claude Code