Skip to content

Add voltage to simple batteries - #698

Open
rushabhcodes wants to merge 1 commit into
tscircuit:mainfrom
rushabhcodes:agent/battery-voltage-source-json
Open

Add voltage to simple batteries#698
rushabhcodes wants to merge 1 commit into
tscircuit:mainfrom
rushabhcodes:agent/battery-voltage-source-json

Conversation

@rushabhcodes

@rushabhcodes rushabhcodes commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add optional voltage to the source_simple_battery schema and SourceSimpleBattery type.
  • Add a regression test covering battery voltage parsing.

Root cause

@tscircuit/props already accepts battery.voltage, but the circuit-json battery source schema did not declare the corresponding field. This prevented core from representing the accepted prop in typed source-component JSON.

Validation

  • bun test tests/source_simple_battery.test.ts
  • bunx tsc --noEmit
  • bun run build

Copilot AI lite review requested due to automatic review settings August 12, 2026 19:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@seveibar seveibar left a comment

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.

batteries don't have a consistant voltage- this would be something like nominal_voltage or something- you'll need to do some research to figure out the proper term

@rushabhcodes

Copy link
Copy Markdown
Contributor Author

@seveibar how about nominal_voltage

@rushabhcodes
rushabhcodes requested a review from seveibar August 12, 2026 19:31
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.

3 participants