Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Studio: turn on the grid-based reasoning collapse (#9511)

Daniel Hanee0f719dc645
diff --git a/studio/frontend/src/components/assistant-ui/thread-feature-flags.ts b/studio/frontend/src/components/assistant-ui/thread-feature-flags.ts
index 6755d0a531e..f37e9b98610 100644
--- a/studio/frontend/src/components/assistant-ui/thread-feature-flags.ts
+++ b/studio/frontend/src/components/assistant-ui/thread-feature-flags.ts
@@ -23,7 +23,26 @@
// transition does not fire, and changing three collapsibles at once would make an A/B on the
// reasoning toggle unattributable.
//
-// OFF until the A/B has run. CONTRIBUTING-perf.md is explicit that a direction is not a result, and
-// this one also changes the rendered DOM (one wrapper element inside the content), so it needs
-// screenshots as well as the parity digest.
-export const GRID_COLLAPSE_REASONING_ENABLED = false;
+// ON. The A/B this comment was waiting for has run, on the standard tier at the 100K rung, four
+// repetitions across two independent waves, each wave carrying its own null control measured in
+// band under the same load. `reasoning_toggle.open_ms` cleared all three gates in BOTH waves:
+// -33.6% against a 15.2% floor, and -20.6% against an 11.8% floor. It is the only metric that did,
+// and the jank index cleared in the first wave and fell under its floor in the second, so the claim
+// here is narrow: opening a reasoning pane on a long thread gets meaningfully cheaper, and nothing
+// else was shown to move.
+//
+// The screenshots this comment asked for were taken, on two production builds of the same commit
+// differing only in this boolean. Collapsed, the two panes are byte-identical PNGs. Expanded, they
+// differ in 25 pixels along one text baseline at a maximum channel delta of 2/255, which is
+// antialiasing. `textContent` is byte-identical in both states, 23,965 characters expanded.
+// Geometry matches to the sub-pixel: root 744x5937.38 and content 718x5896.25 on both arms, the
+// grid row resolving `1fr` to exactly the height Radix measures.
+//
+// The parity digest does report a difference, and it is real rather than noise: the per-message
+// structural signature is 209 characters shorter, entirely within `[data-slot="reasoning-root"]`.
+// It is accounted for to the byte: -242 from the class list (Radix's eight animation and duration
+// tokens replaced by four grid tokens), -8 from the dropped `style` attribute presence token, and
+// +41 for the wrapper element this comment already predicted. No `aria-*` semantics change; the
+// only ARIA delta is Radix's `radix-` id prefix disappearing, and the control relationship resolves
+// on both arms.
+export const GRID_COLLAPSE_REASONING_ENABLED = true;
diff --git a/studio/frontend/tests/reasoning-grid-collapse.test.ts b/studio/frontend/tests/reasoning-grid-collapse.test.ts
index bab6bff175b..281dfbf0ae5 100644
--- a/studio/frontend/tests/reasoning-grid-collapse.test.ts
+++ b/studio/frontend/tests/reasoning-grid-collapse.test.ts
@@ -132,8 +132,13 @@ test("nothing writes a ref during render", () => {
assert.ok(code.includes("const next = !open;"));
});
-test("the flag is off by default", () => {
- assert.match(FLAGS, /export const GRID_COLLAPSE_REASONING_ENABLED = false;/);
+test("the flag is on", () => {
+ // Was "off by default" while the A/B was outstanding. It has run: two independent waves at the
+ // 100K rung, each with its own in-band null control, and `reasoning_toggle.open_ms` cleared all
+ // three gates in both. The assertion is kept rather than deleted so that the flag's value stays
+ // a deliberate, reviewed choice instead of something that can drift silently in either
+ // direction.
+ assert.match(FLAGS, /export const GRID_COLLAPSE_REASONING_ENABLED = true;/);
});
test("the reasoning pane picks its primitive from the flag on all three slots", () => {