Skip to content

Fix pushbutton externally connected pins - #3176

Closed
rushabhcodes wants to merge 1 commit into
tscircuit:mainfrom
rushabhcodes:fix-pushbutton-externally-connected-pins
Closed

Fix pushbutton externally connected pins#3176
rushabhcodes wants to merge 1 commit into
tscircuit:mainfrom
rushabhcodes:fix-pushbutton-externally-connected-pins

Conversation

@rushabhcodes

Copy link
Copy Markdown
Contributor

Summary

Fix externallyConnectedPins support for <pushbutton /> components.

PushButton now creates the requested source-level traces, matching the behavior already implemented by Chip. A regression test verifies that SW1.pin1 connects to SW1.pin2 in the generated circuit JSON.

Validation

  • Focused pushbutton tests pass
  • bunx tsc --noEmit passes
  • Formatting and diff checks pass

Issue

Fixes #3118

Copilot AI lite review requested due to automatic review settings August 12, 2026 15:54
@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tscircuit-core-benchmarks Ready Ready Preview Aug 12, 2026 3:54pm

Request Review

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@imrishabh18 imrishabh18 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am confused, can you explain more about the issue?

@rushabhcodes

rushabhcodes commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

@imrishabh18
The issue is that <pushbutton /> accepts the externallyConnectedPins prop, but currently ignores it during rendering.

For example:

<pushbutton
  name="SW1"
  externallyConnectedPins={[["pin1", "pin2"]]}
/>

This should create a source_trace connecting SW1.pin1 and SW1.pin2, similar to how <chip /> handles the same prop. Before this PR, no source_trace was created even though the prop passed TypeScript/Zod validation.

This PR adds that missing trace creation behavior and includes a regression test for it.

@seveibar

Copy link
Copy Markdown
Contributor

@rushabhcodes pushbuttons don't usually have externallyConnectedPins

@seveibar

Copy link
Copy Markdown
Contributor

i'm sort of confused why you want this

@seveibar

Copy link
Copy Markdown
Contributor

i don't think this is based on a real issue, we shouldn't spend our time on stuff that isn't actually used

@seveibar seveibar closed this Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pushbutton: externallyConnectedPins is ignored

4 participants