feat(scatterplot): show zoomed-in view indicator - #403
Conversation
Automated reviewDoes it solve #343? Yes — the PR derives a reactive Found 2 issues:
protspace/packages/core/src/components/scatter-plot/scatter-plot.ts Lines 1988 to 1994 in 56256d7
protspace/packages/core/src/components/scatter-plot/scatter-plot.ts Lines 1226 to 1235 in 56256d7 🤖 Generated with Claude Code |
|
Independent triage against current head
No code or PR state was changed as part of this triage. |
|
Implemented both review items in
Verification: focused Vitest |
| ${this.data | ||
| ? html` <div class="plot-indicator">${this._getVisiblePointCount()} points</div> ` | ||
| ? html` | ||
| <div class="plot-indicator"> |
There was a problem hiding this comment.
[P2] Announce the zoom status change
The new indicator is visual-only: in Chromium, the accessibility snapshot exposes 7831 points and · Zoomed in as generic nodes, while this chip, its shadow-root container, and the host have no role or aria-live. Because wheel/reset changes this text without moving focus, screen-reader users receive no zoom-state notification. Please expose the chip as a polite status (the nearby .connector-status already uses role="status" aria-live="polite"; aria-atomic="true" may also be appropriate) and add an accessibility assertion for zoom and reset.
There was a problem hiding this comment.
Fixed in 732de70b. The persistent point-count chip now mirrors the existing connector-status pattern with role="status" aria-live="polite"; the status role also provides implicit atomic announcements. The component regression requires the polite status semantics, and Playwright now locates the chip by role, verifies aria-live, and checks zoom/reset content. Verified with focused Vitest 2/2, zoom-indicator Playwright 1/1, strict OpenSpec validation, and pnpm precommit.
Adversarial reviewReviewed in an isolated worktree by three independent lenses (code quality, adversarial correctness, issue-resolution audit), with every finding then put through a refuter whose default position was that it is a false positive. 6 raised, 5 survived refutation. Cleanups considered but skipped
Issue resolution — resolves the issueThe scoping is defensible and I verified the two load-bearing triage claims myself rather than
Gaps found by the issue audit (7)
Findings needing a decision (4)These were left for you rather than auto-applied: each changes behavior, needs a product call, or reaches outside this diff. 1. Flipping the new reactive
|
|
Addressed the actionable findings from #403 (comment) in
The audit's zoom-out/pan indicator and reset-control suggestions remain explicit non-goals in this change. The point-count live region remains intentional per the accepted accessibility requirement; punctuation/pluralization changes were not added without cross-AT evidence. I did not change PR labels or other metadata, so the label-gated E2E job remains governed by the repository workflow. Verification: regression RED was 4/4 expected failures on the prior implementation; GREEN is focused Vitest 4/4, full core Vitest 1,389/1,389, isolated Playwright 1/1, strict OpenSpec validation, and fresh staged |
Summary
Zoomed inin the existing point-count chip whenever the scatterplot scale is greater than 1.Root cause
The scatterplot intentionally stored the full D3 transform as plain state to avoid a Lit render on every pan/zoom frame. The template therefore had no reactive representation of the zoom boundary, so users received no persistent indication that the view was magnified.
Reproduction
7831 points.Verification
pnpm precommit: passed immediately before push.Closes #343