Skip to content

Add public dimmedNodeIds and highlightedNodeIds props with union merge and fix NodeRenderer fade - #62

Open
fayekelmith wants to merge 1 commit into
mainfrom
feature/CMTHW8XVF0001JP04B6YJCZV8-dimmed-highlighted-node-props-union-fade-fix-1788255594
Open

fayekelmith wants to merge 1 commit into
mainfrom
feature/CMTHW8XVF0001JP04B6YJCZV8-dimmed-highlighted-node-props-union-fade-fix-1788255594

Conversation

@fayekelmith

Copy link
Copy Markdown
Collaborator

Summary

  • Adds two new render-only props to <SystemCanvas>: dimmedNodeIds?: Set<string> and highlightedNodeIds?: Set<string>, driven by the host application's own state (external search, filter, or agent-driven focus).
  • Both props union-merge with the internal Cmd+F search-derived sets, so both sources can be active simultaneously and search keeps working unchanged. Merging is handled by a module-local unionIdSets helper (exported for unit tests only).
  • Emphasis is strictly render-only: dimming never moves nodes, affects layout/auto-fit, or changes selection/drag/edit behaviour, but propagates visually to connected edges (dotted, faded) to match internal search behaviour. A node in both sets renders both visuals (ring nested inside the dimmed group, inheriting its opacity).
  • Fixes a NodeRenderer bug: the mount fade-in left inline style.opacity/transition on the node <g> permanently, which shadowed the SVG presentation attribute and froze dim/undim flips. Inline styles are now cleared after the mount fade (with timer cleanup on exit/unmount), mirrored after Viewport's triggerFade pattern.
  • Adds the first full SystemCanvas mount test suite (SystemCanvas.emphasis.test.tsx, 20 tests) with an inline jsdom harness (ResizeObserver + SVGSVGElement stubs).

Testing

  • npm run typecheck — clean
  • cd packages/react && npx vitest run src/components/__tests__/SystemCanvas.emphasis.test.tsx — 20/20 passing

…props with union merge and fix NodeRenderer fade
@fayekelmith fayekelmith added the user label Sep 1, 2026 — with Hive Chat PM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant