Skip to content

fix: explain when no components are available - #234

Merged
dgesteves merged 2 commits into
dgesteves:mainfrom
Aaqibhafeezkhan:fix/issue-220-empty-component-message
Oct 23, 2026
Merged

dgesteves merged 2 commits into
dgesteves:mainfrom
Aaqibhafeezkhan:fix/issue-220-empty-component-message

Conversation

@Aaqibhafeezkhan

Copy link
Copy Markdown
Contributor

Summary

Fix get_component returning Available: . when a project has no design-system components.

Changes

  • Add a shared helper for the empty-component message used by get_component and list_components.
  • Explain that no design-system components were found and point to the components globs and project root.
  • Include onsystem inspect guidance when no components are found at a monorepo root.
  • Preserve the existing error behavior, suggestions, and available-component output when components exist.
  • Add a regression test using a fixture containing only package.json.
  • Add a patch changeset for onsystem.

Resolves #220

@dgesteves dgesteves left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks for picking this up. The fix is in the right place, and the helper is what the issue asked for. One thing will fail CI: test/design-system-packages-docs.test.ts still expects the old text. list_components is matched against /^No components found/ (line 308) and get_component against /^No component named "Button"/ (line 312). That app has no components, so both now return your new sentence. Could you update those two assertions? Optional: a test for the monorepo-root branch of get_component, which nothing covers yet.

@dgesteves dgesteves left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks, both assertions are updated and everything is green.

@dgesteves
dgesteves merged commit c1fdf70 into dgesteves:main Oct 23, 2026
15 checks passed
@dgesteves

Copy link
Copy Markdown
Owner

Merged. It ships in the next onsystem release. Thanks for fixing #220.

@dgesteves-release dgesteves-release Bot mentioned this pull request Oct 23, 2026
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.

get_component answers "Available: ." in a project with no components

2 participants