Skip to content

Add explicit fanout boundary positions - #812

Merged
seveibar merged 2 commits into
mainfrom
feat/fanout-boundary-positions
Aug 24, 2026
Merged

Add explicit fanout boundary positions#812
seveibar merged 2 commits into
mainfrom
feat/fanout-boundary-positions

Conversation

@seveibar

Copy link
Copy Markdown
Contributor

Summary

  • add fanout-specific edge-first positions such as rightside_top and topside_right
  • preserve all legacy nine-point fanout direction values
  • document that the prefix selects the physical boundary edge while the suffix selects the local escape direction or edge band
  • expose the new types from the autorouting phase entry point and generated API docs

Why

Corner names such as top_right were ambiguous: they could mean a top-edge exit near the right or a right-edge exit near the top. The new values make the physical boundary explicit without widening the generic NinePointAnchor type used by unrelated layout APIs.

Testing

  • bun test tests/fanout-boundary-position.test.ts tests/autoroutingphase.test.ts tests/breakout.test.ts
  • bunx tsc --noEmit --pretty false
  • bun test: 450 pass, 0 fail
  • generated component types, manual-edit docs, README docs, and props overview refreshed
  • Biome and git diff checks pass

@seveibar

Copy link
Copy Markdown
Contributor Author

Coordinated implementation: fanout-solver tscircuit/fanout-solver#91 and downstream Core draft tscircuit/core#3411.

Comment on lines +47 to +54
test("autorouting phase rejects low-level solver boundary-region names", () => {
expect(() =>
autoroutingPhaseProps.parse({
autorouter: "fanout",
busFanoutDirections: { DATA: "right_top" },
}),
).toThrow()
})

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. The file tests/autoroutingphase.test.ts already contained multiple test(...) blocks before this PR, and this diff adds yet another one ("autorouting phase rejects low-level solver boundary-region names"). Each additional test beyond the first should be placed in a separate, numbered file — for example autoroutingphase2.test.ts, autoroutingphase3.test.ts, etc. Please move this new test (and any others beyond the first) into their own numbered test files.

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

Fix in Graphite


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

@seveibar

Copy link
Copy Markdown
Contributor Author

NinePointAnchor compatibility is explicitly additive. This follow-up exhaustively covers all nine legacy values in scalar and object forms, restores the existing legacy parser examples, and documents that they remain unchanged and destination-guided.

@seveibar
seveibar merged commit 2e23b95 into main Aug 24, 2026
5 checks passed
@seveibar
seveibar deleted the feat/fanout-boundary-positions branch August 24, 2026 21:19
@tscircuitbot

Copy link
Copy Markdown
Contributor

Thank you for your contribution! 🎉

PR Rating: ⭐⭐⭐
Impact: Major

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