feat: specialized linear layout for decoupling capacitor partitions#50
feat: specialized linear layout for decoupling capacitor partitions#50chengyixu wants to merge 3 commits intotscircuit:mainfrom
Conversation
When a partition is tagged as "decoupling_caps", bypass the general PackSolver2 and instead arrange capacitors in a clean horizontal row centered at the origin. Caps are sorted by chipId for deterministic ordering and spaced evenly using decouplingCapsGap (falling back to chipGap). This eliminates the messy overlapping layout that PackSolver2 produces for groups of same-sized decoupling capacitors. /claim tscircuit#15 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@chengyixu is attempting to deploy a commit to the tscircuit Team on Vercel. A member of the Team first needs to authorize it. |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move the InputProblem data from LayoutPipelineSolver06.page.tsx into a separate .data.ts file. This prevents the test from transitively loading the LayoutPipelineDebugger component (and its circuit-to-svg dependency) which has a missing export in the current pinned version. Fixes the pre-existing test failure on main (1 fail, 1 error -> 0 fail).
|
Hi @seveibar — gentle ping on this PR. This adds specialized linear layout for decoupling capacitor partitions. All CI checks are passing. Happy to address any feedback or questions! |
|
Friendly ping @seveibar -- this PR has been open for 40 days with all tests/checks green. It adds specialized linear layout for decoupling capacitor partitions. The Vercel failure appears to be an auth redirect. Let me know if anything else is needed! Thanks. |
|
Hi @seveibar — gentle ping on this PR (open ~40 days). All core CI checks pass (test ✅, format-check ✅, type-check ✅). The Vercel status shows 'needs authorization' which requires a maintainer action. Happy to address any feedback when you get a chance! |
/claim #15
Summary
SingleInnerPartitionPackingSolverencounters a partition withpartitionType === "decoupling_caps", it skips the general packing algorithm and uses a newcreateLinearDecouplingCapLayout()method insteaddecouplingCapsGap(falls back tochipGap)Changes
lib/solvers/PackInnerPartitionsSolver/SingleInnerPartitionPackingSolver.ts_step()fordecoupling_capspartition typecreateLinearDecouplingCapLayout()private method that places caps in a clean horizontal rowtests/PackInnerPartitionsSolver/LinearDecouplingCapLayout.test.tsWhy this works
The existing pipeline already identifies decoupling caps (
IdentifyDecouplingCapsSolver) and creates separate partitions for them (ChipPartitionsSolverwithpartitionType: "decoupling_caps"). The problem was thatPackSolver2produces messy, overlapping layouts for groups of identically-sized 2-pin components. This PR adds a targeted override: when a partition is known to contain only decoupling caps, arrange them in a clean row instead.Zero impact on non-decoupling partitions — the early return only fires for tagged partitions.
Test plan
bun test tests/PackInnerPartitionsSolver/LinearDecouplingCapLayout.test.ts)IdentifyDecouplingCapsSolver06.test.tsis a dependency issue onmain)bun run format:check)