Skip to content

fix(decoupling-caps): add deterministic row layout#99

Open
obmakesomething wants to merge 2 commits into
tscircuit:mainfrom
obmakesomething:codex/fix/decoupling-cap-layout
Open

fix(decoupling-caps): add deterministic row layout#99
obmakesomething wants to merge 2 commits into
tscircuit:mainfrom
obmakesomething:codex/fix/decoupling-cap-layout

Conversation

@obmakesomething
Copy link
Copy Markdown

@obmakesomething obmakesomething commented May 12, 2026

/claim #15

Summary

  • Add a focused fast path for partitionType === "decoupling_caps" in SingleInnerPartitionPackingSolver so decoupling-cap partitions bypass the generic packer.
  • Place caps in a deterministic centered row using natural chip-id ordering and decouplingCapsGap ?? chipGap edge spacing.
  • Respect fixed availableRotations and compute row width from the rotated footprint so forced-90-degree caps are spaced correctly.
  • Preserve the existing PackSolver2 path for non-decoupling partitions.

Dependency note

  • Add a direct circuit-to-svg dependency floor so the current test suite can resolve the schematic simulation SVG export used by @tscircuit/schematic-viewer during fresh CI installs.

Tests

  • bun test — 22 pass, 1 skip, 0 fail
  • bun test tests/PackInnerPartitionsSolver/SingleInnerPartitionPackingSolver.test.ts
  • bun test tests/LayoutPipelineSolver/RP2040Circuit.test.ts
  • bun run format:check
  • bun run build
  • git diff --check

No UI demo video is attached because this PR changes solver layout logic, not a UI surface.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 12, 2026

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

A member of the Team first needs to authorize it.

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.

1 participant