Skip to content

feat(viewer): add controlled selection highlight - #232

Draft
LucaVor wants to merge 1 commit into
apple:mainfrom
LucaVor:feat/public-selection-highlight
Draft

feat(viewer): add controlled selection highlight#232
LucaVor wants to merge 1 commit into
apple:mainfrom
LucaVor:feat/public-selection-highlight

Conversation

@LucaVor

@LucaVor LucaVor commented Jul 23, 2026

Copy link
Copy Markdown

What changed

  • adds a typed selection?: DataPointID[] | null prop to the high-level EmbeddingAtlas API
  • initializes and reactively updates the existing shared highlight store
  • defensively copies caller arrays, preserves caller order, deduplicates ordered-equal updates, and supports clearing with null/undefined
  • adds focused store-level coverage for initialization, update, deduplication, copying, and clearing

Why

The dashboard already has an internal point-highlight store, but the high-level viewer API did not expose a controlled input. Embedders therefore could not mirror an external selection into the embedding and instances views without reaching through private internals.

Validation

  • npm run test -w @embedding-atlas/viewer — 3 files / 36 tests passed
  • focused selection test — 3/3 passed
  • Prettier on all four changed paths — passed
  • git diff --check — passed

The repository's canonical GitHub Actions workflow will run its full Rust/WASM build, workspace type checks, complete tests, formatting, and Clippy. This is opened as a draft pending that result.

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