Skip to content

Add optional unbroken flag to CopperPour props and tests#628

Merged
seveibar merged 1 commit intomainfrom
codex/add-notracethrough-prop-to-copperpour
Apr 8, 2026
Merged

Add optional unbroken flag to CopperPour props and tests#628
seveibar merged 1 commit intomainfrom
codex/add-notracethrough-prop-to-copperpour

Conversation

@seveibar
Copy link
Copy Markdown
Contributor

@seveibar seveibar commented Apr 8, 2026

Motivation

  • Expose an optional unbroken boolean on copper pours so code and consumers can indicate the pour should remain unbroken when being processed or rendered.

Description

  • Add unbroken?: boolean to the CopperPourProps TypeScript interface in lib/components/copper-pour.ts and to the Zod schema copperPourProps as z.boolean().optional().
  • Update generated documentation files (generated/COMPONENT_TYPES.md, generated/PROPS_OVERVIEW.md) and the README.md to include the new unbroken property in the copper-pour section.
  • Add a unit test should parse unbroken to tests/copper-pour.test.ts that verifies the Zod schema parses the unbroken flag.

Testing

  • Ran the test suite including the new test should parse unbroken in tests/copper-pour.test.ts, which verifies copperPourProps.parse returns unbroken: true for input { unbroken: true }.
  • All automated tests completed successfully.

Codex Task

Comment on lines +78 to +88
test("should parse unbroken", () => {
const rawProps: CopperPourProps = {
connectsTo: "gnd",
layer: "top",
unbroken: true,
}

const parsed = copperPourProps.parse(rawProps)

expect(parsed.unbroken).toBe(true)
})
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.

This test file violates the rule that a *.test.ts file may have AT MOST one test(...) function. The file already contains at least one test() function (as evidenced by the existing test structure shown in the diff context), and this modification adds another test() function starting at line 78. To fix this violation, the tests should be split into multiple numbered files, such as copper-pour1.test.ts and copper-pour2.test.ts, with each file containing only one test() function.

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

Fix in Graphite


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

@seveibar seveibar merged commit 2d5395e into main Apr 8, 2026
5 checks passed
@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants