Skip to content

feat(bench): B2 follow-up #5b — sort + filter comparator wiring#131

Merged
blove merged 7 commits into
mainfrom
b2-followup-5b-sort-filter-comparators
May 10, 2026
Merged

feat(bench): B2 follow-up #5b — sort + filter comparator wiring#131
blove merged 7 commits into
mainfrom
b2-followup-5b-sort-filter-comparators

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented May 10, 2026

Summary

  • Open the sort / filter-metadata / filter-text gate in validateSupportedP0aRequest to all four adapters on S2/S7 (was pretable-only).
  • Wire each comparator adapter to apply the bench BenchInteractionPlan via its native library API:
    • AG Grid: gridApi.applyColumnState + setFilterModel
    • TanStack: table.setSorting + setColumnFilters (Table instance captured in a ref synced each render; filterFn: equalsString for filter-metadata)
    • MUI: apiRef.current.setSortModel + setFilterModel
  • Widen bench-app.tsx's interaction dispatch to all four adapters; comparators pass undefined for readInteractionStateOverride (telemetry override stays pretable-only). All four adapters now receive interactionPlan={interactionPlan}.
  • Re-run matrix S2 × {sort, filter-metadata, filter-text} × 4 adapters × 3 repeats (~2 min wall-clock). Milestone: status/milestones/2026-05-10-b2-sort-filter-comparators.hypotheses.json.

Hypothesis status delta

H# Before After Notes
H6 satisfied satisfied Pretable sort 16.5 / 16.8 ms within thresholds; comparator data captured (ag-grid 58.3, mui 35.0, tanstack 34.4 ms).
H7 satisfied satisfied Pretable filter-metadata 16.0 / 16.7 ms within thresholds; comparator data captured.
H8 satisfied satisfied Pretable filter-text 17.7 / 16.6 ms within thresholds; comparator data captured.

H6/H7/H8 evaluators remain pretable-only — comparator data lives in the per-run status/chromium-<adapter>-default-s2-hypothesis-{sort,filter-metadata,filter-text}-*.summary.json files.

Per-adapter latency (n=3 medians; interaction_latency_ms / settle_duration_ms)

Script pretable ag-grid tanstack mui
sort 16.5 ms / 16.8 ms 58.3 ms / 9.2 ms 34.4 ms / 31.6 ms 35.0 ms / 25.0 ms
filter-metadata 16.0 ms / 16.7 ms 49.9 ms / 15.5 ms 15.7 ms / 26.5 ms 33.4 ms / 25.0 ms
filter-text 17.7 ms / 16.6 ms 50.0 ms / 16.7 ms 40.2 ms / 24.7 ms 33.3 ms / 25.0 ms

Findings: Pretable beats AG Grid Community 3–3.5× on every interaction script (16–18 ms vs 50–58 ms). Pretable beats MUI 2× across the board. TanStack mixed: filter-metadata latency narrowly beats pretable (15.7 ms vs 16.0 ms) but settle is 1.6× slower; sort/filter-text slower on both axes.

What's NOT in this PR

  • Comparator-aware H6/H7/H8 evaluators (data already on disk under status/chromium-…summary.json; would require a new multi-adapter evidence shape).
  • Comparator post-filter row-count reporting (data-bench-result-row-count reads the full dataset; latency/settle metrics are still valid because the bench-runtime settle loop watches DOM signature change).
  • Homepage narrative refresh to surface the 2–3.5× wedge (separate editorial follow-up).

Test plan

  • pnpm --filter @pretable-internal/bench-runner test — bench-runner test rewrites positive comparator parity assertions
  • pnpm --filter @pretable/app-bench test — comparator interaction-dispatch test flipped to positive assertion
  • pnpm -w typecheck
  • pnpm -w lint
  • pnpm format
  • pnpm bench:matrix … --scripts=sort,filter-metadata,filter-text — 36/36 runs completed across all four adapters

🤖 Generated with Claude Code

blove and others added 7 commits May 10, 2026 09:48
Plan for the second slice of B2 follow-up #5: open the sort /
filter-metadata / filter-text gate for ag-grid + tanstack + mui, wire
library-native sort + filter dispatch in each adapter, re-run the
matrix to capture comparator data for H6/H7/H8.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Drop the pretable-only gate on sort/filter-metadata/filter-text — all
four bench adapters now wire their native sort/filter API. The
scenario gate (S2/S7 only) remains.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…lumnState + setFilterModel

Wire the interactionPlan prop into the AG Grid adapter so the bench
harness can drive sort/filter via the library's native gridApi.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ting + setColumnFilters

Capture the Table instance in a ref synced each render so a useEffect
can drive sort/filter via TanStack's library-native API. filter-metadata
mode uses the equalsString filterFn to match the bench plan's equals
semantics.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ortModel + setFilterModel

Wire the interactionPlan prop into the MUI adapter so the bench
harness can drive sort/filter via the library-native apiRef.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Drop the pretable-only gate around measureBenchInteractionRun. All
four adapters now run sort + filter through the interaction probe.
Telemetry-based state reading remains pretable-only; comparators
fall back to DOM-default state reading (undefined override).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…idence

Append the 2026-05-10 entry covering the gate-opening + per-adapter
wiring, n=3 latency table, and H6/H7/H8 status delta. Ship the matrix
re-run milestone alongside.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pretable Ready Ready Preview, Comment May 10, 2026 5:04pm

@blove blove enabled auto-merge (squash) May 10, 2026 17:04
@blove blove merged commit 96ea54e into main May 10, 2026
11 checks passed
@blove blove deleted the b2-followup-5b-sort-filter-comparators branch May 10, 2026 17:06
@github-actions
Copy link
Copy Markdown
Contributor

Vercel preview ready

Preview: https://pretable-k6e1ayb7q-cacheplane.vercel.app
Commit: 14d8025bba882a371b83f68e46d83bc0e964696b

Updated automatically by the deploy-preview job.

blove added a commit that referenced this pull request May 11, 2026
Three editorial surfaces (ComparisonTable interaction rows + trail-marker
labels + new /bench Interactions section) driven by the PR #131 sort +
filter comparator data. No source changes; new aggregated milestone
summary file built from per-run JSONs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
blove added a commit that referenced this pull request May 11, 2026
* docs(plans): B2 follow-up — homepage interaction wedge refresh plan

Six-task plan: aggregator script + milestone summary, ComparisonTable
rows + labels, tests, /bench Interactions section, repo-memory, gates +
PR (no auto-merge).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* chore(bench): aggregator for sort/filter milestone summary

* fix(website): ComparisonTable adds 3 interaction rows + trail-marker label refresh

* test(website): update ComparisonTable trail-marker regex assertions

Three labels changed in the prior commit (AG Grid + TanStack + MUI X)
to reflect the interaction wedge from PR #131. Regex assertions
updated to match the new label phrasings:

- AG Grid: "1.7× slower scroll, 3× slower interaction; row-height drift"
- TanStack: "Headless; ~2× slower interaction (filter-metadata ties pretable)"
- MUI X: "Scroll-p95 parity; 2× slower interaction"

The pretable "Recommended path" assertion is unchanged.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* feat(website): /bench page Interactions section with sort + filter comparator data

Replaces the placeholder paragraph that said "comparative interaction
evidence is on the roadmap" with a real section paralleling the H1
scroll layout. Driven by the new aggregated milestone summary at
status/milestones/2026-05-10-b2-sort-filter-summary.json (built from
PR #131's per-run summaries).

New loader (loadInteractionSummary) + verdict helper
(interactionVerdictFor) mirror the existing scroll-side patterns. The
verdict helper computes per-script ratios against the fastest adapter
and annotates the TanStack filter-metadata tie inline ("2.1–2.6×
slower (filter-metadata ties pretable)").

Per-adapter latency table + two prose paragraphs match the H1 section's
structure for visual consistency.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* docs(research): repo-memory entry for homepage interaction wedge refresh

Documents the three editorial surfaces touched (ComparisonTable rows +
trail-markers, /bench Interactions section, aggregated summary file),
the deliberate non-goals (ReceiptsBand owned by PR #129, n=20 follow-up
deferred), and the remaining open threads from B2.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* chore: prettier-format milestone JSON + plan/spec docs

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant