fix: Specialized Layout for Decoupling Capacitors#47
fix: Specialized Layout for Decoupling Capacitors#47Nithinfgs wants to merge 4 commits intotscircuit:mainfrom
Conversation
|
@Nithinfgs is attempting to deploy a commit to the tscircuit Team on Vercel. A member of the Team first needs to authorize it. |
|
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 |
|
slop |
|
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. |
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:
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