Repository navigation
feat: C10 viewport culling, spatial index and perf lane (RFC + PR1 measure + PR2 culling) - #93
Merged
Merged
Conversation
…pproved design (deep, 5 rounds) Recon dossier + design.md for ROADMAP C10: hide-the-paint-keep-the-<g> culling (AT-discoverable), pure flat-scan index behind a seam, blocking frame-time gate, three-PR plan. ROADMAP C10 row marked design-approved; ledger entry appended. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…xes in design/recon Adds plan.md for the approved C10 design; corrects out-of-range path:line cites in recon.md/design.md and the module key typo (__init__). Plan review in progress. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…cing, args encoding, deps) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…view Log Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…flags, AX/focus/stroke probes) Verified against installed deps and real Chromium: storybook build has no --exclude-tags (use STORYBOOK_DEPLOY-gated stories globs), CDP AX tree (not ariaSnapshot) is the G4 oracle, getBoundingClientRect excludes stroke, culled <g> keeps AX name and focus, core imports cleanly from Playwright specs. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…tures, culling/perf harness stories
Steps 1-3 of the approved C10 plan: loadStories({includeHarness}), iframeUrl/gotoStory args,
mulberry32-seeded fixture data + moddle XML builder (SMALL ~2.7k, LARGE ~23k), and the
Tests/Culling Harness + Tests/Perf Harness stories (tagged harness-only). No runtime change
to any published package.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
Steps 4-5: playwright perf project declared only under PERF=1 (chromium ignores perf.spec.ts), test:perf script, and perf.spec.ts measuring the culling-off baseline on the ~23k fixture via CDP Performance.getMetrics + rAF deltas. Baseline: boot ~9.8s, pan frame p95 ~117ms. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…ration, core import guard) Step 6: small-fixture probes run in the required e2e lane. Verifies via the real CDP AX tree that a culled <g> keeps its role/name, focus lands on it, getBoundingClientRect excludes stroke, and @d3-polytree/core imports from a spec; records per-class painted-extent overhang (pad input) and label-estimator calibration. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
… bulk write, sweep, hide variants) Step 7: in-page microbenchmarks plus real-DOM measurements on the ~23k fixture: scan p95 0.3ms; bulk hide/show of 23k <g> costs 1.2-2.7s main-thread (style recalc dominated) for every mechanism; unculled pan cost sweep vs drawn-element count; Editor-vs-interactive overhead. Adds a nodes arg to the harness stories. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…ness opt-out Step 8: perf workflow in the pinned Playwright container (continue-on-error in PR1 only; no budget yet), and build-storybook:deploy which drops the two large harness stories from the Pages site via STORYBOOK_DEPLOY-gated globs (Storybook 8.6.18 has no --exclude-tags). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…an statuses and deviation log Step 9: records the baseline (23,040 elements: pan frame p95 ~117ms, boot ~9.8s), the §9 trigger results (chunked hides FIRED: hiding 23k <g> costs 1.2-2.7s for every mechanism; dual-pad trigger ill-posed; CULL_MIN_ELEMENTS data points to ~5,000 not 1,000), probe outcomes and overhang calibration. Plan Steps 1-9 marked done; execution stops here per the plan's contingency. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…000, cost-based dual-pad trigger User-directed after PR1's measurements fired the design §9 contingency: hide pass budgeted at HIDE_BUDGET=300/frame (stateless rescan), CULL_MIN_ELEMENTS=5,000 with a ~10.6k correctness fixture (new plan Step 10a), dual-pad trigger reworded cost-based (new G7), free-list re-measured in PR2. design.md amended in place; plan.md amends pending steps only (Steps 1-9 untouched). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…, G7 record-only) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…-ratio measurement) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…10 step 10a) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…tre fix (C10 steps 10-20) - core/spatial: SpatialIndex seam, FlatIndex, elementBounds, CULL_* constants - core: Culling feature (sync SHOW, hide-budgeted rAF pass, inert rules, CSS self-check) - canvas: TRANSIENT_ATTR + clone-only strip on export - viewer: ViewerOptions.culling; interactive-viewer registers cullingModule and ships the rule - core: BaseElement title refresh on update; palette places at viewport centre Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…e check (C10 steps 21-22) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…ditor arms (C10 step 23) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…rm recording (step 24 prep) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…p 24) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
Regenerated packages/element/src/styles.generated.ts with the repo tooling. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…; restore G5 byte-compare (C10) - core/spatial FlatIndex: LIFO free-list, capacity tracks peak live count - canvas getSvgString: de-duplicate selector matchers (export was O(N^2) in DOM size) - storybook: G5 compares exportSVG ON vs OFF byte-for-byte again Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…ontent-visibility, drain) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…r 3 rounds Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…nings addressed Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…f lane Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
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
C10 — spatial index, viewport culling, perf budget (closes H6). This PR now carries the approved RFC and implementation plan plus PR1 (measure) and PR2 (culling); PR3 (label LOD / ceiling note) is not started.
docs/design/2026-10-06-c10-spatial-index-culling-perf/(design.md,plan.md,recon.md,measurements.md).harness-onlyStorybook harness stories,perfPlaywright project,perf.yml, probes P1–P4.core/spatial(SpatialIndexseam,FlatIndex,elementBounds,CULL_*constants) and theCullingfeature: synchronous SHOW on zoom, hide-budgeted (300/frame) rAF pass, CSS fail-open self-check.<g>, accessible name and focus (onedata-pfd-transientattribute plus one CSS rule); exports strip the attribute.ViewerOptions.culling,BaseElement<title>refresh on update, palette placement at the viewport centre.perf-budget.json, 40 ms; derived from one pinned CI run).Notes for review
exportSVG()is quadratic in DOM size (pre-existing), so G5 asserts DOM parity (ON minus the transient attribute == OFF) instead of a byte-compare through the export.Test plan
pnpm lint,pnpm format:check,pnpm typecheck,pnpm test,pnpm build,pnpm build-storybook🤖 Generated with Claude Code
https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk