Skip to content

Studio: let a settled thread skip the code blocks it is not showing - #9047

Closed
danielhanchen wants to merge 5 commits into
mainfrom
perf-code-block-cv
Closed

danielhanchen wants to merge 5 commits into
mainfrom
perf-code-block-cv

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

What this changes

studio/frontend/src/index.css disables streamdown's rendering optimization on every code block
in the chat thread, forever:

.aui-thread-root [data-streamdown="code-block"] {
	content-visibility: visible !important;
	contain-intrinsic-size: none !important;
}

The flicker it was added for is real and is reproduced below. The reason given for making it
unconditional is not: the comment says "the rendering optimization is unnecessary for chat content
(thread length is bounded)", and #9016 measured threads from 25K to 300K characters, 20 to 220
messages and 4,048 to 43,422 DOM nodes.

So the override is scoped rather than removed. It is held while the thread is building, while a
message part is running and while a fence is still open, and released once the thread is quiet.

Read the numbers before the description: this does not speed up scrolling. It was written
against the scroll roughness in #9016's table and that number does not move. What it does move is
the message action menu, by 4.0x at 300K characters, and the reason is in the attribution below.

The flicker, reproduced first

tests/studio/playwright_code_block_flicker.py mounts the real Thread, streams a reply ending
in code fences, and records every code block's rendered height on every frame.

Against streamdown's own defaults, that is the tree before the override existed, each fence does
this on the frame it closes, three times per reply, in all three repetitions:

block height before height at the floor frames height after
8 1722px 226px 1 1722px
9 1760px 226px 1 1760px
10 1760px 226px 1 1760px

226px is streamdown's inline contain-intrinsic-size: auto 200px fallback plus the wrapper's
padding and its language header. The cause is not the IntersectionObserver on its own: the
code-block DOM node is REPLACED when its fence closes. StreamdownBlockContent returns a bare
<Block> while the fence is open and a <Block> wrapped in <div className="relative isolate">
once getCodeFence matches, and React reconciles a changed element type by unmounting and
remounting. CSS Sizing 4 attaches the last remembered size to the element, and both Chromium and
WebKit clear it when the element is disconnected, so the block that finishes streaming is a new
element with nothing recorded and is laid out at the fallback until the engine decides it is
close enough to the viewport to render it.

Why the override must keep contain-intrinsic-size alone

This is the part that makes releasing safe, and it is why the second declaration is deleted
rather than rescoped.

CSS Sizing 4 §5.2.1: the last remembered size is recorded whenever an element has the auto
keyword in contain-intrinsic-size and is not skipping its contents, with no condition on
content-visibility; and it is ERASED as soon as that keyword goes away. Overriding
contain-intrinsic-size to none therefore does not merely fail to help, it throws away the
measurement that a later release depends on.

Measured on Chromium 151.0.7922.34, WebKit 26.5 and Firefox 153.0, switching a column of rendered
off-screen elements from content-visibility: visible to auto:

what the element carried while visible column height before after
contain-intrinsic-size: auto 200px 9,720px 9,720px on all three engines
contain-intrinsic-size: none 9,720px 7,320px Chromium, 4,320px WebKit and Firefox

So a block that has been rendered once keeps its exact height when it starts skipping, and that
is what the hold guarantees for every block.

The simpler scopings, measured rather than assumed

Same fixture, same three repetitions, every variant applied as a stylesheet after the tree's own
so only the code-block rules differ. collapses is the flicker; sweep shift is frames in which
a block's document-space top moved while scrolling from the bottom of the thread to the top,
which is the page moving under the user.

Chromium 151.0.7922.34 and WebKit 26.5, three repetitions each, per-repetition collapse counts
in brackets.

variant what it is collapses, chromium collapses, webkit sweep shift frames thread grew by
tree this change 0 [0,0,0] 0 [0,0,0] 0 / 0 0px / 0px
legacy the override as it shipped 0 [0,0,0] 0 [0,0,0] 0 / 0 0px / 0px
streamdown no override at all 3 [3,3,3] 3 [3,3,3] 5 / 7 4,668px / 6,535px
released override dropped, nothing in its place 3 [3,3,3] 3 [3,3,3] 5 / 7 4,668px / 6,535px
statusonly held only while [data-status="running"] 1 [1,1,1] 0 [1,0,0] 5 / 7 4,668px / 6,535px
lastmessage held only for the last message, CSS only 0 [0,0,0] 0 [0,0,0] 6 / 7 5,601px / 6,535px

Worst single shift during the sweep is 933px on every variant that shifts at all, on both engines.

Two results decided the shape of the fix:

  • statusonly still flickers. Scoping by the streaming status alone is the obvious CSS-only
    answer and it does not work: the node replacement at fence close can land in the same commit
    that flips the message out of its running status. Every Chromium repetition caught it and one
    WebKit repetition in three did. That is what the settle window after the run ends is for, and
    an intermittent failure is a worse thing to ship than a reliable one.
  • lastmessage trades the flicker for a worse sweep. It survives finalization, since the
    message being finalized is the last one, but it can never give an earlier message's blocks a
    first render, so a freshly opened thread holds every off-screen block at the fallback and
    scrolling back up moves 5,601px of content around.

What it costs and what it buys

tests/studio/playwright_heavy_thread.py from #9016, unchanged, run against two worktrees that
differ only by this change. Five rounds, alternating which side goes first, three repetitions
inside each run, so each cell is the median of five medians. Chromium, vite dev server, on a
shared machine at a load average between 40 and 80: the ratios are the result, the milliseconds
are context.

The message action menu, open and close

25K 100K 300K
wall, main 372.6ms 1377.0ms 3808.9ms
wall, this change 226.3ms 418.2ms 963.2ms
ratio 0.61x 0.30x 0.25x
longest stall 183.3 to 110.3ms 668.0 to 193.0ms 1859.5 to 469.1ms
worst frame 180.3 to 107.8ms 664.6 to 186.8ms 1854.2 to 465.3ms

The five per-round medians do not overlap at any size (300K: main 3695, 3836, 3917, 3809, 3534;
this change 971, 946, 1183, 963, 873).

Chromium's Performance.getMetrics says exactly where it went, and it is one line:

300K, menu main this change
style recalculation 3180.5ms 540.6ms
layout 0.4ms 0.3ms
recalculations 10 10

The Radix modal layer puts document.body into pointer-events: none while the menu is open, so
style is invalidated for the whole thread twice for a three-item popover. A skipped subtree does
not take part in that, and the 300K thread holds 55 code blocks, all of which are eligible to be
skipped once it settles.

Scrolling, which is what this was written against, and which does not move

300K, 20 steps of 400px main this change ratio
frames over 33ms 9 9 1.00x
worst frame 116.8ms 116.7ms 1.00x
longest stall 125.2ms 124.6ms 1.00x
wall 1066.7ms 1066.6ms 1.00x
task time 700.8ms 715.7ms 1.02x
layout 3.8ms 6.8ms 1.79x
style recalculation 9.7ms 11.8ms 1.22x

The attribution is the answer. Of the 700ms of task time the gesture costs at 300K, layout and
style are 13.5ms, under 2%. #9016 read the scroll as "the layout is already done at mount, so the
per-gesture cost is roughly per pixel", and that is right, but it is the reason there is nothing
here to win: the per-pixel cost is paint and raster of what is on screen, and skipping off-screen
content does not reduce it. What skipping does change is visible in the two rows that did move,
layout and style going UP, because a block entering the live region has to be rendered on the way
in. That is a real cost and it is 3ms per gesture at 300K.

Bottleneck 5 in #9016's table is therefore not addressed by this, and I do not think
content-visibility can address it.
Whatever the 700ms is, it is not layout and not style.

Everything else

action 25K 100K 300K reading
leave and re-open 0.88x 0.98x 0.98x mount cost is unchanged by design: the thread is held while it builds
keystroke 1.00x 0.97x 1.03x flat
delete a message 1.06x 0.94x 1.10x spreads overlap (300K main 461, 474, 577, 378, 548; this change 523, 545, 463, 570, 475)
jump to the top 0.99x 1.05x 1.07x spreads overlap, though layout count rises 5 to 8 at every size

What it looks like

Same scene, same scroll offset, thread sitting still, on two builds:

  • main against this change: 18,427 of 1,014,800 pixels differ (1.82%), all of it subpixel
    antialiasing on the long def lines inside horizontally scrollable code blocks. Opened at 4x
    and at 10x: identical glyph shapes, identical positions, identical colours, different
    antialiasing fringes.
  • The same tree photographed twice differs by 0 pixels, so that 1.82% is not run-to-run noise.
  • The head build with content-visibility forced back to visible is byte-identical to main,
    which attributes the whole difference to content-visibility: auto and none of it to the
    attribute, the signal component or the scoping. content-visibility: auto applies layout, style
    and paint containment whether or not the element is skipped, and that changes how Chromium
    rasterizes text in a scrollable code block.

There is no photograph of the flicker frame itself in here, and that is a limitation rather than
an omission. The event is one frame; CPU throttling stretches the frame but a CDP screenshot still
captures the composited frame after the relevance update, so every attempt produced a picture of
the block already correct. The frame-level height log above is the evidence for it.

Trade-offs worth stating

  • Find-in-page on older WebKit. The spec requires skipped content to stay available to
    find-in-page, tab order and the accessibility tree, and Chromium and Firefox implement that.
    Safari shipped content-visibility: auto in 18 with skipped content NOT findable and fixed it
    in Safari 26 (WebKit bug 283846). Unsloth Desktop on macOS is WKWebView, so on a system older
    than Safari 26 a code block that is currently skipped will not be found by the browser's own
    find. This is streamdown's default behaviour that the override had been suppressing.
  • A block mounted after the thread settles is a fresh element again, with nothing recorded.
    Measured rather than reasoned: closing and re-opening all 8 tool result panes on a settled 100K
    thread, three repetitions per side, produced 0 collapses and 0 placeholder frames on both sides.
    The pane mounts where the user clicked, so the block is on screen and is rendered rather than
    skipped.
  • A skipped block cannot be counted from script. checkVisibility({ contentVisibilityAuto: true }) answered true, and a child's getBoundingClientRect() came back at its full 800px, on
    boxes provably skipped at the 202px placeholder: reading layout out of skipped content forces the
    engine to render it. The evidence that skipping is happening is the style-recalculation collapse
    above, not a count.

Tests

studio/frontend/tests/code-block-layout-controller.test.ts, 9 tests over the release state
machine with an injected clock, and tests/studio/test_code_block_flicker_contract.py, 22 tests
over the flicker detector against hand-written frame logs including the ones it must NOT report,
plus the two rules this change rests on.

Every test was run against a deliberately broken tree, 26 mutations in all, and every mutation is
caught by at least one test and every test fails against at least one mutation. A few of the
pairings:

mutation caught by
controller starts released instead of held 6 of the 9 controller tests
release armed with no frame pair in front of it "releases only after a frame pair and then the settle delay"
a run starting inside the settle window does not cancel the release "a run that starts inside the settle window cancels the release"
settle delay dropped to one frame "the shipped settle delay outlasts a frame at 60Hz"
contain-intrinsic-size: none put back on a thread code block "the thread does not clobber contain-intrinsic-size on code blocks"
the override made unconditional again "the override is conditional rather than blanket"
the detector stops requiring a recovery 4 tests, including "a block that goes short and stays short is not a flicker"
missing blocks read as zero height "blocks appearing and disappearing are not collapses"
the harness stops requiring any variant to flicker "the run drives a variant that is required to flicker"

npm test 2945 passed, npm run typecheck clean, npm run build clean, biome clean on the new
source files.

Notes for review

@danielhanchen

Copy link
Copy Markdown
Member Author

The visual record

Same scene, same scroll offset, thread sitting still, on two builds of Studio: main at this
PR's merge base, and this PR.

steady state before and after

Quantified rather than eyeballed, because two screenshots that look alike is also what a broken
pair looks like:

pair pixels differing, of 1,014,800
the same build photographed twice 0
main against this PR 18,427 (1.82%), all antialiasing fringes on the long def lines
main against this PR with content-visibility forced back to visible 0

The last row is the attribution: nothing about the attribute, the signal component or the scoping
changes a pixel. The 1.82% is content-visibility: auto itself, which applies layout, style and
paint containment whether or not the element is skipped, and that changes how Chromium rasterizes
text inside a horizontally scrollable code block.

There is no photograph of the flicker frame in here. The event is one frame; CPU throttling
stretches the frame but a CDP screenshot still captures the composited frame after the relevance
update, so every attempt produced a picture of a block that was already correct. The per-frame
height log in the description is the evidence for it: 1722px, one frame at 226px, 1722px, once per
fence, on both Chromium and WebKit.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9223d06717

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

rootRef: RefObject<HTMLElement | null>;
settleMs?: number;
}): null {
const isRunning = useAuiState(({ thread }) => thread.isRunning);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep code blocks held while thread history loads

When opening a saved thread whose history takes longer than the two frames plus 900 ms to load, thread.isRunning remains false, so this signal marks the root settled before any messages mount. This is realistic because the history adapter awaits both stored messages and research state (runtime-provider.tsx:1302-1325), while the UI separately recognizes thread.isLoading (thread.tsx:1666-1669). Code blocks that arrive afterward therefore have no remembered size but immediately regain content-visibility: auto, causing off-screen blocks to use the 200 px fallback and shift the thread when reached. Treat loading as a building state and arm release only when both loading and running are false.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, and reproduced. The controller is only ever handed thread.isRunning (code-block-layout-signal.ts:38 and :64); thread.isLoading is never consulted, so a thread whose history mounts after the settle window arms release with nothing remembered. Measured with the seed delayed 3s past the window at 100K chars: 18 of 20 blocks sit at the 200 px placeholder on Chromium, 17 of 21 on WebKit, 19 of 20 on Firefox, scrollHeight 25,944 against 45,297, and sweeping the thread shifts content on 18 of 60 frames with a worst shift of 1984 px. The merge base shows 0 shift frames and the correct height in the identical scenario. Noting for the record that this branch is being recommended for closure on separate grounds, so the fix is being recorded here rather than applied: gate release on thread.isLoading, isResearchActive and isQueueRunning as well as isRunning, or re-arm on message-count change.

@danielhanchen

Copy link
Copy Markdown
Member Author

Verification before merge: recommending this branch be closed

Not because it is wrong. Because its only real win is Chromium-only, is confined to one action, is removed entirely by #9051, and it costs measurable scroll roughness on WebKit and layout shift on Firefox.

The mechanism, which is real

An earlier attempt at this measured nothing, and the reason turns out to be scope rather than a property of content-visibility. At 300K characters of thread, 81.6 percent of the DOM nodes live inside [data-streamdown="code-block"] (35,416 of 43,422, almost all Shiki spans). On the message action menu, style recalc drops from 4098.8 ms to 622.2 ms across the same 10 recalcs, an 84.8 percent reduction that matches the 81.6 percent node share. So the effect is genuine and its size is explained.

Why that does not justify merging

That entire bucket is what #9051 removes. Chromium, 300K characters, medians with [min, max], n=12 per arm.

axis merge base this branch #9051 both this/base stacked/9051
menu open + close 3886 [3443, 6122] 1051 [950, 1373] 58 [54, 94] 58 [53, 84] 0.27 1.00
menu recalc style 3192 [2926, 5184] 567 [503, 734] 4 [4, 5] 4 [3, 5] 0.18 0.90
menu longest stall 2675 [2086, 3026] 636 [579, 711] 28 [21, 64] 27 [22, 51] 0.24 0.94
scroll gesture 1108 [666, 1838] 1100 [667, 1533] 1208 [666, 1550] 1141 [666, 1417] 0.99 0.94
leave and re-open 3794 [3144, 4911] 3566 [3067, 4149] 3725 [3353, 4633] 3686 [3213, 4159] 0.94 0.99
delete a message 500 [411, 989] 479 [376, 627] 593 [497, 834] 591 [457, 837] 0.96 1.00
scroll layout time 5.2 [2, 11] 8.2 [7, 11] 5 [2, 8] 8 [6, 11] 1.58 1.61

Stacked on #9051 this branch buys nothing on any axis. On the actions #9051 does not touch it is flat against base: scroll 0.99, re-open 0.94, delete 0.96, keystroke 1.00, which matches this PR's own claim that it does not speed up scrolling. The one consistently signed effect it has left when stacked is layout time going up, which is the cost of un-skipping a block on the way in.

Cross engine, where it gets worse

WebKit 26.5 shows no menu win at any size (0.89, 0.98, 0.89 at 25K, 100K, 300K) and a scroll regression whose spreads do not overlap at 25K or 100K:

axis 25K 100K 300K
scroll frames over 33 ms 0 [0, 1] to 5 [4, 7] 1 [0, 2] to 6 [5, 8] 2 [0, 7] to 7 [5, 7]
scroll worst frame 28 to 55 ms 41 to 65 ms 73.5 to 74 ms

That is the scroll roughness axis this branch was written against, moving the wrong way, on the engine Desktop ships on macOS and Linux. Playwright WebKit is a proxy for WKWebView and WebKitGTK, not those webviews.

Firefox 153 does support content-visibility (shipped in 125), so this is not a no-op there: 19 of 20 blocks are genuinely skipped. But Firefox also renders each skipped block 24 px shorter, making the thread 456 px shorter, and scrolling up shifts content on 36 of 60 frames against 0 on base.

What was verified as unaffected

At rest on Chromium and WebKit the rendered output is identical: same body text hash, same scrollHeight (45,297), same block heights, same block and message positions, same node and Shiki span counts. Find-in-page reaches text inside a skipped block on both sides with the same selection. Select all and copy is byte-identical (89,016 characters, same hash). Print output is byte-identical. The accessibility tree is deferred rather than lost: it converges to exactly the same 29,854 nodes and 24 code roles once the thread is swept.

A gap in the tests worth recording

Reverting thread.tsx so CodeBlockLayoutSignal is never mounted leaves both new suites fully green, while measurement confirms this disables the entire effect (attribute absent, 0 of 5 blocks skipped). The failure mode is safe, but nothing notices that the whole feature has been switched off.

If it is kept anyway

Gate release on thread.isLoading, isResearchActive and isQueueRunning as well as thread.isRunning, or re-arm on message-count change; add an assertion that fails when the signal is not mounted; and either scope the rule off WebKit or explain the WebKit scroll regression.

Absolute milliseconds are inflated: the box was under heavy concurrent load throughout. The tight A/B alternation is what makes the ratios usable, and the ratios are the argument.

@danielhanchen

Copy link
Copy Markdown
Member Author

Two corrections and a piece of prior art that settles the WebKit question

First, a correction to how I described this change

I called this "applying content-visibility to code blocks". That is wrong, and the distinction matters for the argument.

Streamdown already sets content-visibility: auto and contain-intrinsic-size: auto 200px inline on its code-block wrapper. The merge base then overrides both unconditionally:

.aui-thread-root [data-streamdown="code-block"] {
	content-visibility: visible !important;
	contain-intrinsic-size: none !important;
}

So this branch does not add the optimisation. It narrows an existing local override, letting the library's own default apply once the thread is settled, and stops clobbering contain-intrinsic-size. The base comment justifies the blanket override with "the rendering optimization is unnecessary for chat content (thread length is bounded)", which the measurements here do contradict.

That makes the honest framing "should we keep overriding upstream in the settled state", not "should we add a rendering change". It does not change the conclusion below, but the earlier wording overstated the novelty.

Second, the prior art, which is about correctness rather than speed

Open WebUI shipped exactly this optimisation and then had to gate it off for WebKit: open-webui#26805, merged 2026-07-24, "fix: blank chat messages on Safari caused by content-visibility virtualization".

Their description is the part that matters here:

Safari's implementation of content-visibility has known paint bugs (WebKit bugs 277573, 281570 and 283846) that can leave the contents of a message unpainted even when it is on screen. On iOS this makes assistant responses render as empty, both in Safari and as a PWA, while the same chats render fine in Chromium and Firefox.

That is not a performance regression, it is content that does not appear. It bears on us directly because Desktop ships two WebKit variants, WKWebView on macOS and WebKitGTK on Linux, and a code block that paints blank is a correctness failure rather than a trade.

Of the three bugs they cite, only 283846 is resolved (fixed 2025-03-30, in 292919@main), which is consistent with find-in-page and select-all passing here on WebKit 26.5. 277573 and 281570 were not verified. And what was tested here is Playwright's WebKit, which is a proxy for WKWebView and WebKitGTK rather than either of them, so the engines Desktop actually embeds were not exercised at all.

Taken with the WebKit scroll regression already measured (frames over 33 ms going 0 to 5 at 25K and 1 to 6 at 100K, non-overlapping spreads), and with the fact that the Chromium win is removed entirely by #9051, the recommendation to close stands and is stronger than it was.

If it is kept, it should be gated off WebKit explicitly, the way Open WebUI ended up doing, in addition to the release-gate fix noted on the inline thread.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9125a139da

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

rootRef: RefObject<HTMLElement | null>;
settleMs?: number;
}): null {
const isRunning = useAuiState(({ thread }) => thread.isRunning);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Hold blocks while edited responses remount

When a user saves an edit to a completed assistant response, thread.tsx:6480 switches from the textarea back to MarkdownText, creating fresh code-block elements, and update-thread-message.ts:134 imports the edited repository while the thread remains non-running. Because this signal only observes thread.isRunning, a root that was already settled is never put back into building; in a long response, its newly mounted off-screen blocks therefore immediately use Streamdown's 200 px intrinsic fallback and the thread shrinks and grows again as those blocks are reached. Re-arm the layout hold for this non-streaming message remount path as well.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, and fixed in 8caa9dc.

Reproduced at frame level in Chromium 151 on a 2,169px code block that is in view, recording [frame, block.offsetHeight, top of the following element]:

released   [0, 200, 301], [1, 2169, 2269.75], [2, 2169, 2269.75], ...
held       [0, 2169, 2269.75], [1, 2169, 2269.75], ...

Released, the remounted block paints one frame at streamdown's 200px contain-intrinsic-size fallback and everything below it moves 1,969px and back. Held, frame 0 is already the real height and nothing moves. That is the same reload-style flicker the CSS comment in this change exists to kill, so it is in scope by this PR's own standard.

The mechanism is as you describe, with one correction to the citation: the switch is at thread.tsx:6921, not 6480 (6480 is inside ContinueMessageBarForLastMessage). The edit state is read at thread.tsx:6849 and the save is at 6870-6896. The two branches at 6921 are different element types, a div and a fragment, so React unmounts one subtree and mounts the other rather than reconciling in place, which guarantees the remount. code-block-layout-signal.ts:38 and update-thread-message.ts:134 are both accurate.

Why the fresh element has nothing to fall back on, per css-sizing-4 section 5.2: the last remembered size is used only 'if auto is specified and the element has a last remembered size', and a never-rendered element has none, so the length branch applies. css-contain-2 section 4.3 names the same case: 'only freshly-loaded tweets will be forced to rely on the 200px height estimate'.

The fix adds a remeasure() entry point to the controller and calls it from a useLayoutEffect keyed on the editing message id. useLayoutEffect rather than useEffect is load bearing: a passive effect runs after the browser has painted the commit that created those elements, and that paint is the flicker frame.

Two properties of remeasure() that the tests pin, because both are easy to get wrong: it is deliberately not idempotent, since two saves in a row are two remounts and each needs its own settle window; and it does not arm a release while a run is in flight, or a remount landing mid-stream would settle the thread inside the reply that is still writing into it.

Four cases added to the existing pure decision-module tests. Suite is 4122 pass, 0 fail.

One related case this does not cover, recorded rather than folded in: expanding a collapsed reasoning or tool section on a settled thread is the same remount shape, since components/ui/collapsible.tsx wraps Radix CollapsibleContent with no forceMount. The general fix is a MutationObserver on the thread root that watches for added code-block nodes while settled, and remeasure() is already the primitive it would call. Left for a follow-up because the expand path was not instrumented here.

@danielhanchen

Copy link
Copy Markdown
Member Author

Closing this

The measurements above settle it, and the standing rule we are working to makes the call straightforward: we do not change what the user sees unless performance improves dramatically enough to justify it. This changes what the user sees on one engine and, once #9051 lands, improves nothing on any of them.

Three findings, in the order that decides them.

The Chromium win is not this branch's to claim. Stacked on #9051 it buys nothing on any axis: menu open and close 1.00, recalc 0.90, longest stall 0.94, scroll 0.94, re-open 0.99, delete 1.00. On the actions #9051 does not touch it is flat against base. The entire measured benefit lives in the bucket #9051 removes, and #9051 removes it more completely.

On WebKit it moves the axis it was written against, the wrong way. Frames over 33 ms go 0 to 5 at 25K and 1 to 6 at 100K, with non-overlapping spreads, and there is no menu win at any size. That is the engine Desktop ships on macOS and Linux, through WKWebView and WebKitGTK.

On Firefox it changes the layout. Each skipped block renders 24 px shorter, the thread 456 px shorter, and scrolling up shifts content on 36 of 60 frames against 0 on base. That is a visible difference at rest, not deferred work, and it is disqualifying on its own.

The prior art is the part I would want kept if anything from this is revisited. Open WebUI shipped this same optimisation and then had to gate it off for WebKit in open-webui#26805, because Safari's content-visibility paint bugs left message contents unpainted while on screen, rendering assistant replies blank on iOS. Of the three WebKit bugs cited, only 283846 is fixed. A code block that paints blank is a correctness failure, not a performance trade, and what was tested here is Playwright's WebKit, a proxy for the webviews Desktop embeds rather than those webviews themselves.

Two things worth recording before this closes.

The framing in the original description was wrong and I corrected it above: this does not add content-visibility, it narrows an existing local override so that Streamdown's own default applies once the thread is settled. The base comment justifying that blanket override says the optimisation is unnecessary because thread length is bounded, and the measurements here do contradict that. If the override is ever revisited, it should be on those terms.

And a gap that is worth more than this PR: reverting thread.tsx so CodeBlockLayoutSignal is never mounted leaves both new suites fully green, while the feature is entirely switched off, 0 of 5 blocks skipped. A test suite that cannot tell whether the feature exists is not evidence, and that pattern has turned up more than once in this batch.

Closing rather than reworking. The reasoning stays here so it survives the closure.

danielhanchen and others added 2 commits August 19, 2026 13:30
index.css disables streamdown's content-visibility on every code block in the
thread, unconditionally. The flicker it was added for is real: the code-block
node is REPLACED when its fence closes, so the block that finishes streaming
has no last remembered size and lays out at the 200px fallback for a frame.
Measured on this tree, 1722px to 226px and back, once per fence.

The reason given for making it unconditional is not real. The comment says the
optimization is unnecessary because thread length is bounded, and threads run
to 300K characters and 43,422 DOM nodes.

So hold the override rather than keep it: while the thread is building, while a
message part is running, and while a fence is still open. Release once the
thread is quiet, by which point every block has been laid out at its real height
at least once and `contain-intrinsic-size: auto` will skip it at that height
rather than at the guess.

Stop overriding `contain-intrinsic-size`. Clobbering it to `none` removes the
`auto` keyword, and CSS Sizing 4 erases the last remembered size the moment that
keyword goes, which is the measurement a release depends on.

The scroll gesture this was written against does not move: of the 700ms it
costs at 300K, layout and style are 13.5ms. The message action menu does, 3809ms
to 963ms at 300K, and the attribution says why: 3180ms of style recalculation
becomes 541ms.
@danielhanchen

Copy link
Copy Markdown
Member Author

Reopening this, because I closed it on a premise that turned out not to apply to what it actually does.

I closed it alongside the block-list windowing idea, which measurement did contradict. This is a different mechanism: the content-visibility override is scoped so it only applies while a block could be one the engine has not measured yet, and a settled thread is allowed to skip the code blocks it is not showing. That distinction is what I collapsed.

Rebased onto current main. The index.css conflict was entirely inside the comment block explaining the override, so I took this branch's version of the prose; the CSS rules merged cleanly. The tsconfig.app.json conflict was two test-harness include lists, resolved as their union. tsc --noEmit is clean.

Numbers

Measured on a real Studio at the 100K rung, 390,740 seeded characters, 4 repetitions with both arms interleaved inside one session, CPU-pinned, scored against a null control running under the same load.

metric main this branch change
reasoning pane close 582.0 ms 71.6 ms 8.1x faster
reasoning pane open 1651.0 ms 1334.0 ms 1.24x faster
jank index 34.5 32.2 6.5% lower
time in jank 6.3% 5.8% 8.7% lower

Paired spread on the close figure is 1.0% against a detection floor of 0.6%, so the effect is roughly a hundred times the noise.

It reproduces on three independent measurements: 89.0% at the fast tier, 87.4% against the raw branch head, 87.7% rebased. Different films, different sessions, different bases.

One caveat I want on the record

Measured against the raw branch head this PR also appeared to make the message menu 2.5x slower. It does not. The branch predated #8992, which took that menu from 1,077 ms to 52 ms, so the comparison was charging this branch for the absence of a fix that landed after it was cut. On the rebased build the menu difference disappears into the noise floor, while the reasoning pane result is unchanged. Worth knowing for anyone measuring a stale branch against current main.

UI parity across the eighteen scripted actions shows no difference in what is rendered.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ad68bc922b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +2584 to 2587
.aui-thread-root:not([data-code-block-layout="settled"]) [data-streamdown="code-block"],
.aui-thread-root [data-status="running"] [data-streamdown="code-block"],
.aui-thread-root [data-streamdown="code-block"][data-incomplete] {
content-visibility: visible !important;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Re-measure blocks after typography or width changes

When a settled thread is resized across the 36rem container breakpoint (index.css:2454-2461) or the user changes the code-font size in Appearance settings (index.css:623-627), off-screen blocks remain skipped even though their real heights have changed. Their contain-intrinsic-size: auto value therefore continues using the size remembered before the style change, and each block can resize and shift the thread when the user later scrolls it into view; CodeBlockLayoutSignal cannot re-hold them because it observes only thread.isRunning. Re-enter the building/measurement state for geometry-affecting changes before allowing these blocks to skip again.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The stale remembered size is real and I reproduced it, but nothing the user sees moves, so this is not a defect to fix here.

Reproduced, block above the viewport, thread settled:

rendered:                    2030px   scrollHeight 10030
skipped, remembered:         2030px   scrollHeight 10030
skipped after font 14 -> 24: 2030px   scrollHeight 10030    stale, no re-measure
rendered after the change:   6959px   scrollHeight 14959    corrected on render

and the spec says it should behave that way. css-sizing-4 section 5.2.1 records a new size only at ResizeObserver delivery time and only for an element that 'does not have size containment'; a skipping element has size containment. css-contain-2 section 4.5: 'the skipped contents of an element never change their size'.

The reason this is a reject rather than a bug: the invariant this change maintains is that a block must have been laid out at its real height at least once before it may skip. Here it has been. The recorded value is simply the pre-change one, and the engine re-records automatically the next time the block stops skipping. That is the designed behaviour of contain-intrinsic-size: auto, not a hole in it. Contrast the sibling item on the edit remount, which throws the measurement away entirely and falls back to a 200px guess, a 91 percent error, on an element the user is looking at.

And no content moves. Same fixture, 4000px gaps, marker element measured before and after:

before the change:          marker top 280.75   scrollTop 9889   block 2169   scrollHeight 14209
after the font change:      marker top 280.75   scrollTop 9889   block 2169   scrollHeight 14209
after scrolling into it:    marker top 3280.75 (280.75 + the 3000 scrolled)   block 3719

The marker's viewport position is bit-identical across the change, and Chromium's scroll anchoring absorbed the full 1,550px when the block was scrolled into. The chat viewport does not opt out: grep for overflow-anchor across src returns only the hub catalog, the research panel and the debugging tab, never the thread viewport. What is left is a scrollbar thumb proportioned to the old typography, which css-contain-2 section 4.3 names as the known cost of the feature.

The width half of the item does not reach the state at all. index.css:2523 gives code blocks overflow-x: auto and pre stays unwrapped, so code-block height is independent of container width. The 36rem container query bites only by changing font-size, so it collapses into the case above rather than being a second one.

Finally the cost. Re-entering the building state for geometry-affecting changes means forcing content-visibility: visible on every block in the thread, a full re-layout of a 300K-character thread, on each commit of an Appearance slider and on window-resize frames, to correct a scrollbar the user cannot act on. That spends the thing this change was built to buy on a defect nobody sees.

@danielhanchen

Copy link
Copy Markdown
Member Author

Measured: CONFIRMED

Protocol: studiobench standard tier, 100K rung, 4 repetitions split into 2 shards, with an in-band null control running concurrently under the same load, scored through the three gates (per-metric detection floor = max(|null delta|, null spread), sign consistency across every paired ratio, and the effect must exceed its own scatter).

This clears all three gates.

Metric Delta Spread Floor
reasoning_toggle.close_ms -62.3% 1.4% 4.7%
reasoning_toggle.open_ms -13.6% 2.4% 6.1%
jank_index -10.6% 4.8% 7.8%

UI parity is clean across 64 action pairs.

What was measured

The branch was measured rebased onto current main, not at its raw head. That matters: a raw head is compared against the main it was cut from, so the delta it reports includes every commit that has landed since the branch was cut. On a branch of this age that is not a small correction, and it is the difference between measuring this change and measuring branch age.

Unrelated, but before merge

CI on this PR is currently red. The failure is an assertion in tests/crypto-uuid-boot.test.ts (line 35):

error: 'smoke-code-block-flicker.html must load /crypto-boot.js'

The smoke-code-block-flicker.html page added here is not loading /crypto-boot.js. It reproduces on both the Linux and Windows frontend unit test jobs. It has nothing to do with the measurement above, but it should be fixed before this merges.

Resolves the thread.tsx import conflict by keeping both sides: main's
CompactionNotice and context-truncation imports alongside this branch's
CodeBlockLayoutSignal.

Also adds the /crypto-boot.js script to smoke-code-block-flicker.html.
Main gained a repo-wide assertion in tests/crypto-uuid-boot.test.ts that
every smoke page loads it before its module entry, and this branch's page
predates that rule, which is what turned the Linux and Windows frontend
jobs red.
Leaving the edit textarea on a completed reply swaps the whole message
body back for its rendered parts, so React mounts a brand new element for
every code block in that reply. The signal only watched thread.isRunning,
so a thread that had already settled stayed settled, and those fresh
elements have no last remembered size: Chromium lays them out at
streamdown's 200px contain-intrinsic-size fallback for one frame.

Measured in Chromium 151 on a 2,169px block that is in view. Released, it
paints one frame at 200px and everything below it moves 1,969px and back.
Held, it is 2,169px from the first frame and nothing moves.

useLayoutEffect rather than useEffect is load bearing: the attribute has
to be back on the root within the commit that created those elements. A
passive effect runs after the browser has painted that commit, and that
paint is the flicker frame.

remeasure() is deliberately not idempotent, because two saves in a row are
two remounts and each needs its own settle window, and it does not arm a
release while a run is in flight, or a remount landing mid-stream would
settle the thread inside the reply still writing into it.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8caa9dc026

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

rootRef: RefObject<HTMLElement | null>;
settleMs?: number;
}): null {
const isRunning = useAuiState(({ thread }) => thread.isRunning);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Re-arm the hold when switching response branches

When the user clicks the existing branch picker in thread.tsx:7648-7682, assistant-ui can replace the displayed completed response with a sibling containing a different set of fenced blocks while thread.isRunning remains false and editingMessageId is unchanged. A root that is already settled therefore stays released, so newly introduced off-screen code-block elements have no remembered size and initially use Streamdown's 200px fallback, causing the same large layout shifts this change is intended to prevent when that branch is viewed or scrolled. Observe the selected branch/message revision and call remeasure() for this non-streaming remount as well.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, and it is broader than the branch picker. Two paths remount the same Streamdown subtree without going through editingMessageId: switching response branches, and expanding a settled reasoning pane. markdown-text.tsx:521 keys Streamdown on ${messageId}:${renderGeneration}, and each path changes one of those.

Measured on the real Thread with the real stylesheet, sampling offsetHeight and the top of the following element per frame:

path before after
edit clean clean
branch 1 frame at 226px instead of 1760px clean
reasoning 3 frames at 226px instead of 1760px clean

That is a 1534px collapse of the column and a snap back.

Rather than add a second useLayoutEffect per path I replaced the effect with a MutationObserver on the thread root, connected only while the controller is settled and disconnected before it reports. A MutationObserver callback is a microtask scheduled after the mutation, so whether it lands before the paint is an empirical question rather than one to reason about. I probed it against the real rule shape: it is frame-identical to a synchronous restore, and identical whether the mutation comes from a plain task, from inside a requestAnimationFrame callback, or from a microtask. That is why the layout effect could be removed rather than kept as a belt.

Termination has two independent reasons and the tests assert both: the disconnect happens before onRemount, and remeasure()'s only DOM effect is an attribute write on the observed root while the observer records childList only.

tests/studio/playwright_code_block_remount.py drives all three paths through the real components and gates on both directions, so it fails if the hold stops working and also if the fixture stops reproducing the collapse. npm test 4130 pass / 0 fail, 8 new.

b77c5ef.

@danielhanchen

Copy link
Copy Markdown
Member Author

Benchmarked at this head (6e82dded7) against its own merge base 338c36dfa, so the comparison
differs by this branch alone and not by anything main did afterwards. studiobench standard tier,
100K rung, 4 repetitions split into 2 shards, with an in-band null control running concurrently
under the same load, scored through the three gates: per-metric detection floor of
max(|null delta|, null spread), sign consistency across every paired ratio, and the effect must
exceed its own scatter.

metric base this head delta spread floor
reasoning_toggle.close_ms 840.6 ms 304.1 ms -63.5% 2.3% 2.4%
reasoning_toggle.open_ms 2,156.3 ms 1,852.8 ms -16.4% 7.9% 1.9%
jank_index -12.8% 6.7% 5.1%
time_in_jank_pct -7.0% 4.3% 6.1%
select_all_copy.select_all_ms 180.5 ms 229.9 ms +28.8% 24.9% 16.7%

UI parity clean across 64 action pairs. Two earlier standard-tier sessions on a rebase of this
branch gave -62.1% and -62.3% on close_ms, so the headline replicates three times across
independent sessions.

The regression, stated up front rather than left to be found

select_all_copy.select_all_ms is slower, it is reproducible, and it has an obvious mechanism that
I should have predicted: content skipped by content-visibility: auto has to be rendered before it
can be selected, so select-all forces layout of every skipped code block. That is a designed
consequence of this change, not an accident.

It showed +8.9% (void), +20.7% and +28.8% across three sessions, and in the run above both shards
agree independently: 180.5 -> 229.9 ms and 169.6 -> 220.1 ms.

Bounding it honestly:

  • about +50 ms on a step of ~180 ms
  • inside an action whose total is ~3,065 ms, so select_all_copy.total_ms stays void at +1.8%
  • select_all_copy.count.selected_chars is byte-identical at 194,992 on both arms, so nothing is
    lost from the clipboard

So it is a small absolute cost on a rare action, bought in exchange for 840 ms -> 304 ms on a
common one. Worth knowing before merge rather than after.

Method notes

Both numbers above come from the merged head, not from a raw branch head. Measuring a branch that
predates main against current main folds every commit landed since into the delta; an earlier
sweep of this branch produced a +391% message_menu.open_ms regression that was entirely another
merged PR's menu fix missing from the stale side, and vanished once the branch was rebased.

The rung matters too. At the 10K rung every metric here reads as a null, including the -63.5%. The
benchmark's own note says the UI work disappears under the scene's scripted timings at that size.

…path

The layout hold was armed from a useLayoutEffect keyed on editingMessageId,
so it only covered the edit round trip. Two other paths remount the same
Streamdown subtree and were left uncovered: switching response branches,
and expanding a settled reasoning pane. markdown-text.tsx keys Streamdown
on `${messageId}:${renderGeneration}`, and both paths change one of those.

Measured on the real Thread with the real stylesheet, sampling offsetHeight
and the top of the following element per frame:

  path        head                                    with the watcher
  edit        clean                                   clean
  branch      1 frame at 226px instead of 1760px      clean
  reasoning   3 frames at 226px instead of 1760px     clean

A 1534px collapse of the column, then a snap back.

Replaced the effect with a MutationObserver on the thread root, connected
only while the controller is settled and disconnected before it reports.
A MutationObserver callback is a microtask, so the question of whether it
lands before the paint is empirical, not a matter of reasoning: probed it
against the real rule shape and it is frame-identical to a synchronous
restore, from a plain task, from rAF and from a microtask alike. That is
why the layout effect could be removed rather than kept as a belt.

Termination has two independent reasons and the tests assert both: the
disconnect happens before onRemount, and remeasure()'s only DOM effect is
an attribute write on the observed root while the observer records
childList only.

New harness tests/studio/playwright_code_block_remount.py drives all three
paths through the real components and gates on both directions, so it
fails if the hold stops working and also if the fixture stops reproducing
the collapse.

npm test 4130 pass / 0 fail (8 new).
@danielhanchen

Copy link
Copy Markdown
Member Author

Pushed b77c5ef.

The review's branch-picker item was right, and generalising it found a third path. The hold is now armed by a MutationObserver on the thread root instead of a useLayoutEffect keyed on editingMessageId, so it covers the edit round trip, response branch switches and reasoning-pane expansion alike. Per-frame measurement of all three, before and after, is in the reply on that thread.

npm run typecheck, npm run build and npm test are green, 4130 pass / 0 fail.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: b77c5ef108

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen

Copy link
Copy Markdown
Member Author

Closing this in favour of #9462, which reaches the same goal by a different mechanism and does not carry the costs this one does.

The measurement

Both were measured at the 100K rung against a concurrent in-band null. #9462 wins on every metric except one:

metric this PR #9462
reasoning_toggle.close_ms -63.5% -53.7%
reasoning_toggle.open_ms -16.4% -43.3%
jank_index -12.8% -78.8%
time_in_jank_pct -7.0% -62.4%
select_all_copy.select_all_ms +28.8% -67.5%

close_ms is the only metric this PR wins, and it wins it by 9.8 points while losing jank_index by 66 and select_all_ms by 96.

The select-all regression replicated three separate times with both shards agreeing, and it has a known mechanism rather than being noise: content-visibility skipped content has to be rendered before it can be selected, so a document-wide selection pays back exactly what was skipped.

Why that is disqualifying here

Three differences, and it is worth separating them because they are not the same kind of thing.

The select-all cost is not a parity break. The selection contents, the clipboard payload and the character count are all unchanged; the spec keeps skipped content selectable. But it is a UX difference the user is on screen to pay: they press Ctrl+A and wait 28.8% longer. The off-screen exemption does not cover it. That exemption licenses not rendering what is not visible, and this is the bill for that licence coming due the moment someone performs a document-wide operation.

A 1.82% on-screen pixel delta. 18,427 of 1,014,800 pixels differ. content-visibility: auto applies paint containment whether or not an element is actually skipped, which changes text rasterisation inside code blocks that are visible. Forcing content-visibility back to visible makes the build byte-identical to main, which attributes the whole delta to that one property. This one is on screen by construction, so no exemption applies without a performance argument.

Find-in-page breaks on WKWebView below Safari 26 (webkit.org/b/283846): skipped content is not findable. That is a genuine parity break rather than a slowdown, and it lands on the macOS desktop app.

A dramatic performance win can justify a deliberate UI difference, but only where the difference is necessary to obtain the win. #9462 gets a larger win on the same rung with none of these three: scroll height unchanged to the pixel, selected character count unchanged, and the text stays a live text node, so selection, clipboard and find-in-page are structurally unaffected.

The two mechanisms do not compose

They would fight. The remount observer here fires on any added node matching [data-streamdown="code-block"]. Under #9462 every fence upgrade -- shell to highlighted block on first viewport reach -- replaces exactly such a node, which would trip the observer, drop the thread back to building and restart the 2-frame plus 900ms hold. A reader scrolling a long thread reaches a new fence far more often than once per second, so the combined build would sit permanently in building and this optimisation would essentially never engage, at the cost of a permanently connected subtree MutationObserver on the thread root.

It is also worth recording that the state machine and the remount observer are not a separable win. They never read, store or restore a height; the only height memory involved is the engine's own last remembered size, armed by leaving contain-intrinsic-size: auto alone. Their entire effect is to write data-code-block-layout, which is read by exactly one CSS selector. Remove the index.css hunk and they still run and change nothing rendered. They are the interlock this approach needs, not an independent improvement, which is why there is nothing here to salvage separately.

Two things in this PR's favour, for the record

I would rather these be on the thread than discovered later.

#9462 is default-off. Its deferral sits behind VITE_UNSLOTH_DEFER_FENCE_HIGHLIGHT, and fenceMode() returns off on an unset flag, so as it stands it ships no improvement to users. This PR changed default behaviour.

#9462's win is contingent; this one's was not. Its own numbers rest on 55 of 56 fences never being reached. A reader who scrolls their whole history converges back on today's cost plus the observer overhead. Skipping an off-screen block does not have that property: it applies whenever the block is off screen, however much was read earlier.

So "#9462 dominates" is true on the metrics and not yet true on what users actually get. It is still the right direction, because closing that gap from this side would cost the select-all regression, the rasterisation delta and the WebKit find-in-page break, which is the wrong trade. If the full-scroll case turns out to matter, the follow-up should be a mechanism that does not reintroduce those.

This is not a CI judgement

All 35 red checks here are janitor cancellations, not failures. Sampled jobs return "conclusion": "cancelled" with 45 to 70 second runtimes, and the last three commits have zero completed jobs of any kind. This PR has never had a genuinely green run at or near head, and it has never had a genuine red one either. It is being closed on policy and dominance. Nobody should later read this closure as "it was tested and it failed".

What survives

The flicker harness, as its own no-behaviour-change PR. It runs against main unmodified and is the only executable proof that the existing index.css override is load-bearing, which has now been re-litigated three times. Link to follow.

@danielhanchen

Copy link
Copy Markdown
Member Author

The harness is now #9464, cut against main with no behaviour change: 20/20 green against the tree as it ships.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants