feat: add horizontal column virtualization (S3)#3
Merged
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implements planColumns() as the horizontal equivalent of planViewport(), using binary search for efficient visible-range detection with pinned-left column support and configurable overscan. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…wport Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add scrollLeft and width fields to GridCoreViewportState and update the setViewport equality check to suppress duplicate emissions on all four fields. Fix all TypeScript callers with placeholder values (0) to be wired up in later tasks. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Integrates planColumns() from layout-core into createDomRenderSnapshot, virtualizing columns when viewportWidth is provided while remaining backwards compatible when it is omitted. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace CSS grid layout with absolute cell positioning, which is required for column virtualization where only a subset of columns will be in the DOM. The surface now iterates renderSnapshot.columns instead of the full columns array, using plannedCol.left and plannedCol.width for positioning. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…cking Adds viewportWidth to usePretableModel, measures the DOM viewport width in PretableSurface via useLayoutEffect, and threads scrollLeft/viewportWidth through to createDomRenderSnapshot so column virtualization is active. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add S3 to bench app query parsing, bench-runner P0a validation list, and bench-matrix default scenarios. S3 supports scroll only — no interaction scripts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… fallback Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Apr 30, 2026
5 tasks
blove
added a commit
that referenced
this pull request
May 9, 2026
* docs(specs): B2 follow-up #3 — autosize end-to-end wiring design End-to-end autosize harness wiring (pretable + ag-grid + mui; tanstack unsupported), with H22 comparator-parity hypothesis evaluator reusing the min-repeat gate from PR #125, and a full B2 matrix re-run with autosize included. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * docs(plans): B2 follow-up #3 — autosize wiring implementation plan Six-task plan for wiring autosize through the bench harness end-to-end, adding evaluateH22 with the min-repeat gate, and re-running the B2 matrix with autosize included. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * feat(bench-runner): accept autosize script through harness pipeline Adds "autosize" to the bench-runner supportedScripts allowlist (gated to S2 and to pretable | ag-grid | mui — tanstack remains unsupported per the B2 spec), to the apps/bench query-state parser, and to the BenchScriptName Extract narrow in bench-types. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * feat(bench): measureBenchAutosizeRun helper for autosize script Adds a single-event autosize latency helper that awaits the adapter's autosize callback and one rAF, reporting interaction_latency_ms as "call-to-paint" timing. Mirrors the shape of measureBenchKeySequenceRun. Also unblocks the now-accepted "autosize" script in the query-state parser by retargeting the existing fallback-to-defaults test to an unrelated bogus value. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * feat(bench): wire onAutosizeReady on pretable/ag-grid/mui adapters Pretable, AG Grid, and MUI adapters now publish their autosize entry point through a new onAutosizeReady callback. bench-app.tsx captures it in autosizeApiRef and dispatches measureBenchAutosizeRun on the autosize script, mirroring the updateApiRef + measureBenchUpdatesRun chain. Replaces AG Grid's pre-emptive onGridReady autosize branch (which only ran at mount) with a callback so autosize fires on bench-script dispatch. MUI now exposes apiRef via useGridApiRef so the harness can call apiRef.current.autosizeColumns({ includeOutliers: true }) — async on v7+. TanStack accepts the prop for harness uniformity but the bench-runner returns "unsupported" before the adapter ever mounts. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * feat(bench-matrix): evaluateH22 autosize comparator-parity hypothesis Adds H22 ("pretable autosize is within a single 60Hz frame and within 10% of the best ag-grid/mui comparator on S2"). Reuses the H1 comparator-parity pattern: 16 ms single-frame floor, 10% parity band, ≥10 repeats per side before resolving a tight-zone (0.9–1.2) ratio. Hoists COMPARATOR_PARITY_MIN_REPEATS to module scope so H1 and H22 share a single source of truth. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * chore(bench): B2 matrix re-run with autosize; H22 evaluated S2/hypothesis/Chromium, all 13 scripts including autosize, repeats=3, ~5 min wall-clock. H22 satisfied: pretable autosize 5.3 ms vs MUI 11 ms (ratio 0.482, outside the tight zone — gate does not apply). H1 also flipped from failing → satisfied vs the 2026-05-08 milestone (parity at n=3 with mui this run; matches the n=20 correction documented in the previous repo-memory entry). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * chore(format): prettier formatting for B2 follow-up #3 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
planColumns()to layout-core — binary search for visible column range with overscan clamping and pinned column supportGridCoreViewportStatewithscrollLeftandwidthfor horizontal scroll trackingviewportWidthprovided, returns all columns when omitted)Verification
Test plan
pnpm lint && pnpm typecheck && pnpm testnode --test scripts/__tests__/bench-matrix.test.mjspnpm bench:matrix -- --project=chromium --adapters=pretable --scenarios=S1,S2,S7 --scripts=scroll --scale=dev --repeats=3(regression)pnpm bench:matrix -- --project=chromium --adapters=pretable --scenarios=S3 --scripts=scroll --scale=dev --repeats=3(S3 smoke)