Found while gating #1412; it merged at 31f7c1c4 mid-review, so filing here rather than as a post-hoc PR comment. The head I reviewed and the merged head are the same sha, and I re-confirmed all three facts below against origin/main.
#1412 is a good change — the missing-comma fix is real and I verified it repairs exactly what it should (details at the bottom). This is the one thing it introduces.
The defect
V2AgentBYO.tsx:562 promotes .v2-byo__hint from <span> to <p>:
<p className="v2-byo__hint">{t('agentByo.hosted.latencyHint')}</p>
.v2-byo__hint (v2.css:6155) sets only font-size and color — no margin: 0. It never needed one, because every prior use in this panel was a <span>: inline, so the UA default margin: 1em 0 had no vertical effect. As a <p> it now does.
The parent is .v2-byo__result (v2.css:6120) — display: flex; flex-direction: column; gap: 18px. Flex items do not margin-collapse, so the UA margins add to the gap on both sides rather than merging into it.
Measured, in a real browser
jsdom has no layout engine, so I served the real v2.css over http and measured computed geometry. Both variants in one page, identical markup, the only difference being margin: 0:
|
as shipped |
with margin: 0 |
| parent |
flex / gap 18px |
flex / gap 18px |
.v2-byo__hint margin |
12px / 12px |
0 / 0 |
| stats → hint |
30px |
18px |
| hint → cta-row |
38px |
26px |
| stats → cta-row total |
85px |
61px |
+24px of unintended vertical space. Sheet integrity confirmed alongside it (cssRules.length = 1121), so this isn't a parse artifact.
I first measured this at +13px with a plain-div parent and it was wrong — block-flow margin collapsing absorbed about half. The flex parent is what makes it 24px. Worth stating because the smaller number is what you get if you reason about it without running it.
Fix
One line, matching the convention already in the file — the sibling <p> class .v2-byo__memory-done (v2.css:6191) sets margin: 0 for exactly this reason:
.v2-byo__hint {
font-size: 12px;
color: var(--v2-text-tertiary);
margin: 0;
}
Check the pre-existing <p class="v2-byo__hint"> at V2AgentBYO.tsx:666 when applying — different parent (.v2-byo__memory), so it may be relying on the current spacing.
Two unrelated things noticed nearby
What I verified about the comma fix (all clean)
- Parsed
v2.css with postcss at both base and head: rules 1177 → 1177, selectors 1401 → 1402, same last selector. +1 selector, nothing lost — the swallowed descendant selector correctly splits into the two intended ones.
- Swept the whole stylesheet for the same defect class (a root-ish class appearing mid-selector, or two
:lang( in one selector): 0 remaining instances.
- i18n: only two locales exist, both updated.
statLatency / statLatencyValue have 0 remaining references anywhere in frontend/ — no orphans. latencyHint defined in both.
- CI at
31f7c1c4: 11/11 pass including Test & Coverage, E2E and Playwright; swept gh run list --branch for startup_failure runs invisible to gh pr checks — none.
cc @ux-lead — spacing call is yours; I'm reporting the number, not prescribing the design.
Found while gating #1412; it merged at
31f7c1c4mid-review, so filing here rather than as a post-hoc PR comment. The head I reviewed and the merged head are the same sha, and I re-confirmed all three facts below againstorigin/main.#1412 is a good change — the missing-comma fix is real and I verified it repairs exactly what it should (details at the bottom). This is the one thing it introduces.
The defect
V2AgentBYO.tsx:562promotes.v2-byo__hintfrom<span>to<p>:.v2-byo__hint(v2.css:6155) sets onlyfont-sizeandcolor— nomargin: 0. It never needed one, because every prior use in this panel was a<span>: inline, so the UA defaultmargin: 1em 0had no vertical effect. As a<p>it now does.The parent is
.v2-byo__result(v2.css:6120) —display: flex; flex-direction: column; gap: 18px. Flex items do not margin-collapse, so the UA margins add to the gap on both sides rather than merging into it.Measured, in a real browser
jsdom has no layout engine, so I served the real
v2.cssover http and measured computed geometry. Both variants in one page, identical markup, the only difference beingmargin: 0:margin: 0flex/ gap18pxflex/ gap18px.v2-byo__hintmargin+24px of unintended vertical space. Sheet integrity confirmed alongside it (
cssRules.length = 1121), so this isn't a parse artifact.I first measured this at +13px with a plain-
divparent and it was wrong — block-flow margin collapsing absorbed about half. The flex parent is what makes it 24px. Worth stating because the smaller number is what you get if you reason about it without running it.Fix
One line, matching the convention already in the file — the sibling
<p>class.v2-byo__memory-done(v2.css:6191) setsmargin: 0for exactly this reason:Check the pre-existing
<p class="v2-byo__hint">atV2AgentBYO.tsx:666when applying — different parent (.v2-byo__memory), so it may be relying on the current spacing.Two unrelated things noticed nearby
.v2-byo__listen-noteis undefined inv2.cssbut applied atV2AgentBYO.tsx:547, on the hosted-state line directly above this change. Pre-existing, not from fix(byo): Wren's critique of #1368 — zh comma bug + three deltas #1412 — a dead class name, so that line renders unstyled.font-weight: 750→700in fix(byo): Wren's critique of #1368 — zh comma bug + three deltas #1412 was right: zero750values remain inv2.css, so the file is now internally consistent.What I verified about the comma fix (all clean)
v2.csswith postcss at both base and head: rules1177 → 1177, selectors1401 → 1402, same last selector. +1 selector, nothing lost — the swallowed descendant selector correctly splits into the two intended ones.:lang(in one selector): 0 remaining instances.statLatency/statLatencyValuehave 0 remaining references anywhere infrontend/— no orphans.latencyHintdefined in both.31f7c1c4: 11/11 pass including Test & Coverage, E2E and Playwright; sweptgh run list --branchforstartup_failureruns invisible togh pr checks— none.cc @ux-lead — spacing call is yours; I'm reporting the number, not prescribing the design.