Skip to content

Forward disabled flags from JSON config#3334

Draft
imrishabh18 wants to merge 3 commits into
mainfrom
agent/use-disabled-flags-from-json-config
Draft

Forward disabled flags from JSON config#3334
imrishabh18 wants to merge 3 commits into
mainfrom
agent/use-disabled-flags-from-json-config

Conversation

@imrishabh18

@imrishabh18 imrishabh18 commented Jul 22, 2026

Copy link
Copy Markdown
Member

Summary

  • load and merge tscircuit.config.json with optional TypeScript/JavaScript config
  • include JSON in the shared TSCIRCUIT_CONFIG_PATHS discovery list
  • forward top-level pcbDisabled and schematicDisabled values into the effective platform config
  • use Partial<PlatformConfig> for the shared config fields instead of extending a separate config interface
  • update @tscircuit/props to ^0.0.588
  • add regression coverage for JSON flags alongside a TypeScript platformConfig

Why

tscircuit.config.json was previously used only to infer the entrypoint. Because it was not included in the runtime config passed to platform setup, its disabled flags never reached RootCircuit.

Impact

Projects can now use pcbDisabled or schematicDisabled in tscircuit.config.json and have those settings applied consistently by both CircuitRunner and the web worker. JSON and module configuration continue to merge, with module platformConfig values retaining precedence.

Validation

  • bun test tests/features/platform-config.test.tsx tests/features/parts-engine-platformConfig.test.ts
  • bun test tests/examples/example17-parse-tscircuit-config.test.tsx
  • bun run format:check
  • bun run build

The full test suite was previously attempted; an unrelated existing test (should-hint-main-component-path-when-entrypoint-exports-component) timed out at five seconds, after which the run was stopped.

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.

1 participant