Skip to content

[codex] Add deterministic decoupling cap row layout#86

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

[codex] Add deterministic decoupling cap row layout#86
dclawd88 wants to merge 2 commits into
tscircuit:mainfrom
dclawd88:codex/decoupling-cap-row-layout

Conversation

@dclawd88
Copy link
Copy Markdown

Summary

/claim #15

  • Bypass the generic inner partition packer for partitions marked partitionType === "decoupling_caps".
  • Lay decoupling capacitors out in a deterministic centered row using natural component ordering.
  • Use decouplingCapsGap with a chipGap fallback, and account for fixed 90/270 degree rotations when calculating row width.
  • Add focused solver tests for ordering, centering, gap fallback, and rotation-aware spacing.

Why

The pipeline already identifies decoupling capacitor groups and separates them into decoupling_caps partitions, but those partitions still went through PackSolver2. That generic packing can produce cluttered decap clusters. A narrow deterministic row path makes the decoupling-cap case predictable without changing default partition behavior.

Validation

  • npx --yes bun test tests/PackInnerPartitionsSolver/SingleInnerPartitionPackingSolver.test.ts
  • npx --yes bun run format:check
  • npx --yes bun run build
  • git diff --check

I also ran npx --yes bun test; the suite reached 20 passing tests and 1 skipped test, then stopped on an existing dependency export issue: convertCircuitJsonToSchematicSimulationSvg is not exported from circuit-to-svg/dist/index.js.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 11, 2026

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

A member of the Team first needs to authorize it.

@dclawd88
Copy link
Copy Markdown
Author

Status note: test, format-check, and type-check are green. The remaining red status is the Vercel deployment authorization gate that requires a tscircuit team member to authorize the fork deployment.

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