Skip to content

fix: report source_component_misconfigured_error on empty connections target - #3428

Open
moxiaoshen567 wants to merge 1 commit into
tscircuit:mainfrom
moxiaoshen567:fix-empty-connections-string-error
Open

fix: report source_component_misconfigured_error on empty connections target#3428
moxiaoshen567 wants to merge 1 commit into
tscircuit:mainfrom
moxiaoshen567:fix-empty-connections-string-error

Conversation

@moxiaoshen567

Copy link
Copy Markdown

Fixes #2865

Summary

  • Safely check for empty or whitespace-only target strings in _createTracesFromConnectionsProp() (NormalComponent.ts).
  • Inserts a clear source_component_misconfigured_error into circuit.db rather than letting empty selectors reach css-what and throw a raw parser error that crashes the entire render.
  • Added unit test in tests/components/normal-components/connections-empty-string.test.tsx verifying the error is logged and valid sibling connections/traces still render.

Verification

bun test tests/components/normal-components/connections-empty-string.test.tsx
# 1 pass, 0 fail

/claim #2865

💰 Payout Details

  • USDC (Solana): 6UvBhyhY6ayeoJEGZxK4bDoFAHd9yeRDTVusnoDGdgQ5
  • USDT (TRON / TRC20): TYcNrMSoY36q8WrsFSZyB26Rkj25EFgQsX

@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tscircuit-core-benchmarks Ready Ready Preview Aug 25, 2026 6:12am

Request Review

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.

Empty string in connections crashes the render with a raw css-what parser error

1 participant