Repository navigation
Keep inline label attachment points on routed traces - #1339
Merged
MustafaMulla29 merged 14 commits intoOct 21, 2026
Merged
MustafaMulla29 merged 14 commits into
MustafaMulla29 merged 14 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
MustafaMulla29
force-pushed
the
fix/inline-label-wire-anchors
branch
from
October 21, 2026 07:01
9f0a69c to
0245a47
Compare
MustafaMulla29
changed the base branch from
main
to
repro/inline-label-wire-anchors
October 21, 2026 07:01
MustafaMulla29
added this pull request to stack #1346
October 21, 2026 07:04
imrishabh18
approved these changes
Oct 21, 2026
imrishabh18
left a comment
Member
There was a problem hiding this comment.
No vertical anchorPoints?
Contributor
|
Thank you for your contribution! 🎉 PR Rating: ⭐⭐⭐ Track your contributions and see the leaderboard at: tscircuit Contribution Tracker |
This branch was successfully deployed
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.
Inline labels spanning a short bend can have an
anchorPointoutside their routed wire. Keep the collision-checked text box, test center/left/right attachment positions against the same trace using the existingtracePathContainsPointhelper, and return the matchingtextAnchor. Continue the existing placement search if none fit.This supports cleaning up the inline-label converter PR #658. Together with the core change, it supplies an exact wire attachment and alignment so the converter can remove nearest-wire detection and attachment-point guessing.
Stacked on the repro PR #1344. In Files changed, open
repro-core-tb67s579ftg-inline-label-attachments-detail.snap.svg: the blue points move onto the wires while the dashed text boxes and routed paths stay unchanged. Both OUT_A_P and OUT_B_P were 0.1 mm off-wire before this fix. The fixture is core's existing TB67 breakout with only J4 moved through normal layout props.The existing bent-route snapshots use the same guide rendering before and after. This PR adds on-wire and alignment assertions and updates those snapshots. A separate straight-wire close-up uses the same captured input to check that ordinary vertical connections keep their centered attachment.
Vertical coverage: open
repro-core-tb67s579ftg-vertical-inline-label-attachments-detail.snap.svgin Files changed. It comes from a vertical layout of core's existing TB67 circuit using normal schematic props, with the same components and connections. OUT_A_P attaches at the lower end of its text and OUT_B_P at the upper end. The solver's dashed text boxes and routes stay unchanged; both blue dots move onto their wires.left/rightare alignments in the text's reading direction, so they become lower/upper ends for vertical text.Straight vertical wire coverage:
repro-core-tb67s579ftg-vertical-inline-label-attachments-straight-detail.snap.svgis added directly in this PR's Files changed. It shows STOP_DET_VTH and NFHYS from the same TB67 input, with dashed text bounds and blue attachment points on the straight wires. The test checks two-point vertical paths and centered, on-wire attachments.Validation:
bun run format:check(installed Biome 2.5.15), both TB67 attachment tests, the updated-base gimbal test (63 assertions total), andbunx tsc --noEmitpass. The repository's original^2.2.2Biome dependency range is unchanged.bun test: 721 passed, 4 skipped, 0 failed.bunx tsc --noEmitandbun run buildpassed.Merge the repro first, then this fix. Core PR tscircuit/core#4811 consumes the attachment/alignment after the solver is released. No Circuit JSON schema change is needed.
Straight vertical stub coverage:
repro-core-tb67s579ftg-vertical-inline-label-attachments-straight-stub.snap.svgshows the real AGC_OUT terminal from the same TB67 input. The test checks its two-point vertical path and on-wire attachment. This solver anchor was already correct before the fix, so its before/after stub snapshots are intentionally identical.Main-branch cross-check: the same input was run against solver main
b4dbf4f. All inline text centers and dimensions match the fix; the bent-route attachment points change. Core mainf0a5872produces an identical SVG with either solver version. The OUT_B_P overlap seen in core's PNG rendering also exists with both main versions; it is not introduced by this solver fix. Vertical examples remain in this solver stack.