Repository navigation
Save inline label positions on their schematic wires - #4811
Merged
MustafaMulla29 merged 10 commits intoOct 21, 2026
Merged
MustafaMulla29 merged 10 commits into
MustafaMulla29 merged 10 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
MustafaMulla29
force-pushed
the
fix/inline-label-wire-positions
branch
from
October 21, 2026 07:01
e9fb856 to
a332cfe
Compare
MustafaMulla29
changed the base branch from
main
to
repro/inline-label-wire-positions
October 21, 2026 07:01
MustafaMulla29
marked this pull request as ready for review
October 21, 2026 10:55
MustafaMulla29
requested review from
imrishabh18 and
seveibar
and removed request for
imrishabh18
October 21, 2026 11:00
imrishabh18
approved these changes
Oct 21, 2026
| "@tscircuit/props": "^0.0.705", | ||
| "@tscircuit/schematic-match-adapt": "^0.0.18", | ||
| "@tscircuit/schematic-trace-solver": "https://jscdn.tscircuit.com/@tscircuit/schematic-trace-solver/0.0.236.tgz", | ||
| "@tscircuit/schematic-trace-solver": "https://jscdn.tscircuit.com/@tscircuit/schematic-trace-solver/0.0.237.tgz", |
Member
There was a problem hiding this comment.
Use the npm package version
Contributor
Author
There was a problem hiding this comment.
I think seve told us it's better to use jscdn last week in the meeting.
This was referenced Oct 21, 2026
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.
Core currently saves inline text positions away from their wires. Save the solver's on-wire attachment in
schematic_text.positionand use the existinganchorfield for the label's side and alignment. Preserve terminal-stub alignment, rotation, sheet assignment, and thesource_trace_idrelationship. No Circuit JSON schema fields are added.Update the published schematic-trace-solver dependency from 0.0.236 to 0.0.237, which includes the merged solver fix #1339. Validation uses the installed release, without a locally linked solver.
This supports cleaning up the inline-label converter PR #658: the converter can create local electrical labels from the saved position and alignment, using the existing trace relationship, and remove nearest-wire attachment inference.
Stacked on repro PR #4812.
The test-generated repro snapshots are shown below. Blue dots mark saved positions; dashed boxes mark text bounds. Compare each dot with its wire.
Horizontal labels: OUT_A_P / OUT_B_P
Straight vertical stub: AGC_OUT
The straight vertical stub makes the change particularly clear: its saved position moves from 0.06 mm beside the wire onto the wire, while the dashed text bounds stay in place. These images reference the tested commits, so the before/after comparison stays stable.
Both examples include full-circuit snapshots. Dashed rectangles use the existing
getSchematicTextBoundshelper, with the existing transform utilities for rotated text. The guides exist only in the tests' snapshot input. The new vertical example requires no additional production changes.Validation with the published 0.0.237 package:
78a7e9f: CI run. Type checking, formatting, package preview, and the build smoke test also pass.left/rightexpectations in the crystal and custom-symbol tests tobottom_left/bottom_right, and regenerated 76 affected schematic and simulation snapshots through their existing tests. No snapshot tolerances were loosened, and no PCB snapshots were changed.Both branches include the main update. The solver dependency blocker is resolved. This remains a draft for the previously identified text-rendering review: OUT_B_P glyphs can cross the wire in SVG/PNG output. That overlap was also reproduced on core main with solver main, and varies by SVG renderer. The electrical attachment point is correct; this PR does not include a renderer change.
Merge the core repro first, then this fix after the remaining rendering review.