Highlight pcb_via_clearance_error at pcb_center#738
Merged
imrishabh18 merged 2 commits intomainfrom Apr 13, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
Author
seveibar
reviewed
Apr 13, 2026
src/components/ErrorOverlay.tsx
Outdated
| pcb_via_clearance_error_id?: string | ||
| message?: string | ||
| pcb_center?: { x: number; y: number } | ||
| error_type?: string |
Contributor
There was a problem hiding this comment.
Why not import this from circuit json?
seveibar
reviewed
Apr 13, 2026
src/lib/util/getErrorId.ts
Outdated
|
|
||
| export const getErrorId = (error: ErrorElementWithIds, index: number) => | ||
| error.pcb_trace_error_id || | ||
| error.pcb_via_clearance_error_id || |
src/lib/util/getErrorId.ts
Outdated
| export const getErrorId = (error: ErrorElementWithIds, index: number) => | ||
| error.pcb_trace_error_id || | ||
| error.pcb_via_clearance_error_id || | ||
| `error_${index}_${error.error_type}_${error.message?.slice(0, 20)}` |
6f39ec4 to
1276722
Compare
07bef5e to
e4c19e2
Compare
Contributor
|
Thank you for your contribution! 🎉 PR Rating: ⭐⭐ Track your contributions and see the leaderboard at: tscircuit Contribution Tracker |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Motivation
pcb_centerforpcb_via_clearance_errorentries.Description
src/lib/util/getErrorId.tsthat generates stable error ids and includespcb_via_clearance_error_idalongside existingpcb_trace_error_idand the fallback pattern.src/components/ErrorOverlay.tsxto render a marker and hover popup forpcb_via_clearance_erroratpcb_center, preserving the same hover/highlight behavior used for trace errors.src/components/CanvasElementsRenderer.tsxto usegetErrorIdfor matching hovered errors and to includepcb_via_idsin the set of related ids so associated vias are highlighted.src/components/ToolbarErrorDropdown.tsxto usegetErrorIdso toolbar hover ids match the overlay highlighting for via-clearance errors.Testing
npm run build, which completed successfully.npm run format:checkafter auto-formatting the changed file, and the check passed.Codex Task