Skip to content

feat: add fanout autorouter phase props - #760

Merged
seveibar merged 3 commits into
mainfrom
agent/fanout-autorouter-props
Jul 27, 2026
Merged

feat: add fanout autorouter phase props#760
seveibar merged 3 commits into
mainfrom
agent/fanout-autorouter-props

Conversation

@seveibar

@seveibar seveibar commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add single_layer_fanout and fanout as first-class autorouter presets
  • add busFanoutDirections to <autoroutingphase> as Record<BusName, NinePointAnchor | { direction: NinePointAnchor }>
  • support all nine-point anchors, with center leaving a bus unconstrained
  • keep <bus> limited to electrical connection membership
  • export the reusable NinePointAnchor and BusName types
  • update generated component/props documentation
  • align the circuit-json dependency with core

Fanout direction is routing-phase policy keyed by bus name. The props API does not require a component selector; the fanout solver infers the footprint side that needs escaping.

This is the props prerequisite for tscircuit/core#2889.

Validation

  • bun test (387 passing)
  • bun run typecheck
  • bun run build
  • bun run check-circular-deps
  • bun run format:check
  • git diff --check

@seveibar seveibar changed the title feat: add fanout autorouter and bus props feat: add fanout autorouter phase props Jul 27, 2026
@seveibar
seveibar marked this pull request as ready for review July 27, 2026 20:01
@seveibar
seveibar merged commit dcf53d5 into main Jul 27, 2026
5 checks passed
Comment thread tests/autorouter.test.ts
Comment on lines +47 to +55
test("supports fanout presets", () => {
expect(autorouterProp.parse("single_layer_fanout")).toBe(
"single_layer_fanout",
)
expect(autorouterProp.parse("fanout")).toBe("fanout")
expect(autorouterProp.parse({ preset: "fanout" })).toMatchObject({
preset: "fanout",
})
})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A *.test.ts file may have AT MOST one test(...) call. This file already contained at least one test(...) before this PR, and the new test("supports fanout presets", ...) block adds another. The file should be split into multiple numbered files, e.g. autorouter1.test.ts, autorouter2.test.ts, etc., each containing exactly one test(...) call.

Spotted by Graphite (based on custom rule: Custom rule)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Comment on lines +33 to +43
test("autorouting phase accepts per-bus fanout directions", () => {
const raw = {
autorouter: "fanout",
busFanoutDirections: {
DATA: "top_right",
CONTROL: { direction: "center_left" },
},
} satisfies AutoroutingPhaseProps

expect(autoroutingPhaseProps.parse(raw)).toEqual(raw)
})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A *.test.ts file may have AT MOST one test(...) call. This file already contained multiple test(...) calls before this PR, and the new test("autorouting phase accepts per-bus fanout directions", ...) block adds yet another. The file should be split into multiple numbered files, e.g. autoroutingphase1.test.ts, autoroutingphase2.test.ts, etc., each containing exactly one test(...) call.

Spotted by Graphite (based on custom rule: Custom rule)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@tscircuitbot

Copy link
Copy Markdown
Contributor

Thank you for your contribution! 🎉

PR Rating: ⭐⭐
Impact: Minor

Track your contributions and see the leaderboard at: tscircuit Contribution Tracker


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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants