trace error on a group says "It has no ports" instead of pointing at the components inside it
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- react, typescript
Research direction
Start by reading the trace selector error handling and the expectations in tests/components/base-components/trace-port-selector-errors.test.tsx and tests/repros/repro99-trace-selector-pcbpath-no-throw.test.tsx. Confirm the behavior for groups with named children and empty groups, then run those tests; done means the errors explain that groups have no pins and identify valid component selectors without breaking existing cases.
Written by the indexing model from the issue text.
Description
What happens
Pointing a trace at a <group /> produces an error that is technically true but tells the user nothing:
<group name="G1">
<resistor name="R1" resistance="1k" footprint="0402" />
<capacitor name="C1" capacitance="1uF" footprint="0402" pcbX={3} />
</group>
<trace from=".G1 > .pin1" to=".R2 > .pin1" />
Could not find port for selector ".G1 > .pin1".
Component "G1" found, but does not have pin "pin1". It has no ports
A group is a container — it never has pins. "It has no ports" reads like the group is broken, when the real answer is "select a component inside it". The user is left to guess which components exist and how to reference them.
Note the message above is what you get with #2851 applied; on current main it's worse, because the parent selector still carries the combinator and the code resolves ".G1 >" to the group's first child:
selectOne(".G1") → Group
selectOne(".G1 >") → Resistor "R1"
so main reports Component "R1" found, but does not have pin "pin1" — and R1 does have pin1, making the message actively misleading. #2851 fixes the naming; this issue is about the remaining unhelpful detail.
Suggested detail
The component's own children are right there, so the message can name them and give a working selector:
Component "G1" found, but does not have pin "pin1". It is a group, which has no
pins of its own. Select a component inside it, e.g. ".R1 > .pin1". It contains [.R1, .C1]
Existing expectations
Two tests record the old wording, both with empty groups, so the phrasing there becomes "…and it contains no named components":
tests/components/base-components/trace-port-selector-errors.test.tsx(<group name="G1" />)tests/repros/repro99-trace-selector-pcbpath-no-throw.test.tsx(<group name="J1" />)
PR ready (stacked on #2851).
- Dominant language
- TypeScript
- Stars
- 58
- Forks
- 203
- Avg merge
- 7h 39m
- Merged PRs (30d)
- 286
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tscircuit/core
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·