Make pcb footprint overlap message stable - #193
Draft
posthog[bot] wants to merge 1 commit into
Draft
Conversation
The pcb_footprint_overlap_error message embedded user component
designators (for example "pcb_smtpad R1.pin2 overlaps with pcb_smtpad
C1.pin1"), so every board produced a new message string. Downstream
error tracking could not group these findings, and one design rule
violation opened thousands of distinct issues.
Build the message from the two element types only ("pcb_smtpad overlaps
with pcb_smtpad") and sort the types so the order is stable. The specific
overlapping elements stay available in the structured pcb_smtpad_ids,
pcb_plated_hole_ids, and pcb_hole_ids fields on the error object.
Update the affected SVG snapshots and the repro01 assertion.
Generated-By: PostHog Code
Task-Id: 6b16945d-40fb-49de-a51e-2ed868ba641c
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.
Problem
checkPcbComponentOverlapbuilt the message from user component designators:`${elem1.type} ${elem1Description} overlaps with ${elem2.type} ${elem2Description}`— soR1.pin2/C1.pin1and every other designator pair minted a new string.pcb_smtpad_ids,pcb_plated_hole_ids,pcb_hole_ids), so the designators added nothing the error object did not already carry.Changes
pcb_smtpad overlaps with pcb_smtpad. The template is now stable, so all overlaps of the same type pair collapse into one issue.*_idsfields on the error object — no information is lost.formatOverlapElementDescriptionhelper and itsget-readable-namesimports.Scope
Renderable.renderErrorpath so a bad board reports a diagnostic instead of an uncaught exception — lives intscircuit/coreand is not part of this PR.Tests
shouldDrawErrorsis on) and therepro01inline assertion; added a check that the structuredpcb_smtpad_idsstill carry both elements.Agent context
tscircuit/checks; none touch this message or the overlap fingerprinting.Created with PostHog Desktop from this inbox report.