Skip to content

fix: Specialized Layout for Decoupling Capacitors#47

Closed
Nithinfgs wants to merge 4 commits intotscircuit:mainfrom
Nithinfgs:decoupling-capacitor-layout
Closed

fix: Specialized Layout for Decoupling Capacitors#47
Nithinfgs wants to merge 4 commits intotscircuit:mainfrom
Nithinfgs:decoupling-capacitor-layout

Conversation

@Nithinfgs
Copy link
Copy Markdown

@Nithinfgs Nithinfgs commented Mar 23, 2026

Problem
PackSolver2 scatters decoupling capacitors in messy, irregular patterns instead of arranging them in clean horizontal rows like professional schematics.

Solution
Introduced a new solver, DecouplingCapLayoutSolver, which:
• Detects capacitor components
• Places them in linear rows near associated chips
• Applies consistent spacing (decouplingCapsGap with chipGap fallback)
• Maintains deterministic ordering by sorting chips by ID
• Zero impact on non-decoupling partitions
• Integrates into the layout pipeline without modifying existing solvers

Results
esults
Decoupling capacitors are now arranged neatly:

  • C1: x=10, y=0
  • C2: x=10, y=5

Visual Proof
SVG snapshot tests included using bun-match-svg
Full pipeline layout snapshot and partition-only snapshot available

Tests
• 19 passing tests (17 existing + 2 new for decoupling caps layout)
• bun run format:check clean
• tsc --noEmit clean

/claim #15
https://www.loom.com/share/b01b2db88ebf4732a7a2c052558230c0

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 23, 2026

@Nithinfgs is attempting to deploy a commit to the tscircuit Team on Vercel.

A member of the Team first needs to authorize it.

@Nithinfgs
Copy link
Copy Markdown
Author

Nithinfgs commented Mar 23, 2026

Hey @seveibar, Format and Type checks are now passing . The only remaining failure is Bun Test these are pre-existing failures on main before my changes. They all fail with Invalid JSX Element: Expected a React component which is a @tscircuit/core dependency issue. I verified by running git stash and bun test on clean main same failures. My changes do not introduce any new test failures. PR is ready for review

@seveibar
Copy link
Copy Markdown
Contributor

slop

@seveibar seveibar closed this Mar 23, 2026
@Nithinfgs
Copy link
Copy Markdown
Author

Hi @seveibar, thanks for taking a look. Could you share what specifically missed the mark? I'd like to understand the feedback so I can improve future contributions. Happy to rework the approach if there's a preferred direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants