Skip to content

feat(core): C10 zoom-out LOD — hold nodes/links at fit-all, resolve clicks via the spatial index - #99

Merged
davcs86 merged 9 commits into
mainfrom
claude/roadmap-next-items-7y0lrz
Oct 10, 2026
Merged

davcs86 merged 9 commits into
mainfrom
claude/roadmap-next-items-7y0lrz

Conversation

@davcs86

@davcs86 davcs86 commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

Implements the approved C10 zoom-out level of detail (design Amendment A2, docs/design/2026-10-07-c10-lod-zoom-out/), which supersedes the label-only LOD planned in the original C10 design.

  • LOD state in Culling — at scale ≤ 0.16 (LOD_SCALE_ON) nodes and links are held (paint hidden via the existing data-pfd-transient attribute; <g>, accessible name and focusability stay); labels and zones stay painted. Off above 0.20 (LOD_SCALE_OFF). Entering is budgeted (HIDE_BUDGET/frame); leaving is synchronous, including while culling is inert. data-pfd-lod = off / entering / on. No public option: culling: false disables it; an @internal lod:false harness switch gives the perf gate a same-build baseline.
  • Exemptions — selected (first 200, sticky, ascending slot order), focused and just-created elements stay painted; slot state is cleared when a slot is reused.
  • Click/dblclick resolver — a capture-phase listener resolves pointer clicks on held elements through the spatial index (visible node/label wins; zones transparent; nearest hidden node, then link within 4 px) and re-dispatches <class>.click|dblclick. Events are marked in a WeakSet (features/resolvedEvents.ts); Zoom's background handler and MouseEvents' per-element listeners skip marked events, so nothing is delivered twice and d3-zoom's double-click zoom still runs. Ignored while the link tool is active; keyboard/synthesised clicks stay native.
  • Gates — unit tests, an extended editor property test (LOD ops, ghost-exemption and sync-exit invariants, resolver op), Playwright wronglyHeld oracle + real-mouse resolver cases for both arms, G4/G5/G6 re-run under LOD, perf arms.
  • Docs / release — READMEs, CLAUDE.md files, ROADMAP C10 row, ledger, changesets (core minor; viewer/interactive-viewer/editor patch).

Measurements (pinned container, n = 6; lod-measurements.md)

Fit-all pan p95, 23k elements Median Range
LOD on 16.8 ms 16.7–33.3 ms (29 of 30 pans one frame)
LOD off (same build) 117–150 ms 100–167 ms

Separation safeguard holds in every run (6.9–8.9× better). New budgets in perf-budget.json: fitAllPan 50.1 ms (+ separation assertion), lodCrossing 1052 ms worst frame.

Known limitations (stated, not hidden)

  • Entering LOD is a ~350–440 ms long task in the zoom call itself (worst frame ≈ 570–700 ms) before the bounded drain; exit to scale 1 is ~100 ms. An exit landing just above 0.2 reveals more and costs more; larger viewports scale with the in-view count.
  • Fit-all shows topology only through labels and zones; hover, drag, resize, context menu and link-tool picking need a painted element (zoom in).
  • Thresholds are provisional measured values tuned for the default node size (25).
  • Zoom ticks are not improved; reroute / boot / SearchPanel / Selection O(N²) remain out of scope; the aggregate overlay is deferred (Stage 2).
  • A manual assistive-technology pass over LOD is still outstanding; the detail > 0 pointer discriminator is verified in Chromium only.

Test plan

  • pnpm lint, pnpm format:check, pnpm typecheck, pnpm test (incl. editor property test)
  • culling.spec.ts (G1–G7 + LOD + resolver, interactive and editor arms) locally and in the E2E lane
  • perf.yml (pinned) green with the new budget assertions
  • Manual AT pass over LOD (outstanding)

🤖 Generated with Claude Code

https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk

claude added 9 commits October 9, 2026 02:29
…ons (C10 LOD steps 3-6)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…(C10 LOD steps 7-8)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…on record (C10 LOD step 9)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…ord-only budgets (C10 LOD step 10)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…s (C10 LOD steps 11-12)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…step 13)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
…ep 10)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016V6PyVUq4G2LMR9EfXZEMk
@davcs86 davcs86 changed the title docs(design): C10 LOD step 2 — spike measurements and conditional Go feat(core): C10 zoom-out LOD — hold nodes/links at fit-all, resolve clicks via the spatial index Oct 10, 2026
@davcs86
davcs86 merged commit 60c88d5 into main Oct 10, 2026
5 checks passed
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.

2 participants