Skip to content

Highlight connected schematic traces on hover#197

Open
digzrow-coder wants to merge 3 commits into
tscircuit:mainfrom
digzrow-coder:main
Open

Highlight connected schematic traces on hover#197
digzrow-coder wants to merge 3 commits into
tscircuit:mainfrom
digzrow-coder:main

Conversation

@digzrow-coder
Copy link
Copy Markdown

@digzrow-coder digzrow-coder commented May 12, 2026

Fixes tscircuit/tscircuit#1130.

Adds hover highlighting for schematic traces so every rendered trace segment on the same connected schematic net changes color together. The hook uses explicit schematic connectivity keys when available and falls back to grouping traces by shared edge endpoints.

Demo proof:

Validation:

  • bun test tests/trace-net-key.test.ts
  • bunx biome check lib/hooks/useHighlightConnectedSchematicTraces.ts tests/trace-net-key.test.ts
  • bunx tsc --noEmit
  • bun run build
  • git diff --check
  • Verified in Cosmos with Playwright that hovering one schematic trace marks both same-net traces as highlighted while unrelated traces stay unchanged.

/claim tscircuit/tscircuit#1130

AI-assisted with OpenAI Codex; I reviewed the diff, proof assets, and validation output before posting.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
schematic-viewer Ready Ready Preview, Comment May 15, 2026 2:31am

Request Review

@digzrow-coder
Copy link
Copy Markdown
Author

Added actual interaction proof for the hover behavior: the demo moves onto one trace in the Cosmos fixture and shows the connected same-net trace highlighting with it while unrelated traces stay unchanged.

MP4: https://github.com/digzrow-coder/schematic-viewer/releases/download/pr-197-demo-20260514/pr-197-connected-trace-hover-demo.mp4
GIF: https://github.com/digzrow-coder/schematic-viewer/releases/download/pr-197-demo-20260514/pr-197-connected-trace-hover-demo.gif

@digzrow-coder
Copy link
Copy Markdown
Author

Added stronger hover proof because the earlier recording was too subtle.

The new clip shows the cursor moving onto one schematic trace, both connected same-net segments turning orange together, and unrelated traces staying gray.

@digzrow-coder
Copy link
Copy Markdown
Author

Added focused automated coverage in 15a7ae7 for the same-net trace grouping used by the hover behavior. The new Bun test covers both explicit subcircuit_connectivity_map_key grouping and the shared-endpoint fallback path.

Validation rerun locally:

  • bun test tests/trace-net-key.test.ts
  • bunx biome check lib/hooks/useHighlightConnectedSchematicTraces.ts tests/trace-net-key.test.ts
  • bunx tsc --noEmit
  • bun run build
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change of color on hover for traces are missing

2 participants