Skip to content

row_height_error_p95_px cannot fail for a nowrap grid, and the bench page reads meaning into it anyway #414

Description

@blove

Found while verifying #400.

row_height_error_p95_px is computed as |max(cell.scrollHeight) + padding − row.height| (apps/bench/src/bench-runtime.ts:1982-2001). A cell's scrollHeight is floored at its clientHeight, so with white-space: nowrap and overflow: hidden nothing can ever overflow vertically and the metric is structurally incapable of returning nonzero.

All three comparator adapters render exactly that way (see #400), so their committed 0 is not an achievement — it is a metric that cannot fail. This is the same shape as the estimator issue recorded earlier: a metric that never consults the thing it claims to measure.

It matters because the published page reads meaning into the one nonzero value. apps/website/app/bench/page.tsx:388-393 interprets AG Grid's 2px as "a sign that wrapped-cell layout doesn't round-trip through its line-height pipeline as cleanly as pretable's text-core does" — an inference about wrapped-cell layout, drawn about a grid that is not wrapping.

Two things to fix, and they are separable:

  1. The metric should report not applicable rather than 0 when a grid renders no wrappable content, so a vacuous pass stops looking like a passing grade. Whatever the mechanism, it must be mutation-provable: show the metric failing for a grid that genuinely mislays a row.
  2. The page's AG Grid inference should go, or be re-derived once S2 comparative scroll is not like-for-like: only pretable wraps #400 lands and the comparators actually wrap.

Note that #400's fix changes the input here: once the comparators wrap, this metric starts being able to fail for them, and the numbers it produces will be real for the first time. That is a reason to fix the interpretation on the page in the same pass, not before.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions