Skip to content

feat: track and expose component error/warning counts#35

Merged
piotrski merged 6 commits into
mainfrom
feat/error-warning-counts
Mar 18, 2026
Merged

feat: track and expose component error/warning counts#35
piotrski merged 6 commits into
mainfrom
feat/error-warning-counts

Conversation

@piotrski
Copy link
Copy Markdown
Collaborator

@piotrski piotrski commented Mar 5, 2026

Summary

Closes #19

Track and expose component error/warning counts from React DevTools protocol, enabling AI agents to quickly find components with errors.

Commits

Changes

  • types.ts: Added errors and warnings fields to ComponentNode, added errors IPC command type
  • component-tree.ts: Store error/warning counts from UPDATE_ERRORS_OR_WARNINGS operations, added getComponentsWithErrorsOrWarnings() method
  • daemon.ts: Handle errors IPC command with proper label assignment
  • cli.ts: Added errors CLI command to list components with non-zero error/warning counts
  • formatters.ts: Format error/warning output, annotate component and tree display with error/warning indicators
  • Tests: Added tests for error/warning operation parsing and formatting

Test plan

  • All 79 existing tests pass
  • TypeScript type checking passes
  • Manual test: verify errors command returns components with error/warning counts
  • Manual test: verify tree output shows error/warning annotations

🤖 Generated with Claude Code

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 5, 2026

🦋 Changeset detected

Latest commit: 7027dd0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
agent-react-devtools Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

piotrski and others added 6 commits March 18, 2026 01:19
Store error and warning counts from UPDATE_ERRORS_OR_WARNINGS operations
on ComponentNode. Add getComponentsWithErrorsOrWarnings() method to
ComponentTree. Handle new 'errors' IPC command in daemon and enrich
get-component responses with non-zero counts.

Closes #19

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add formatErrors() formatter and errors CLI command to list components
with non-zero error or warning counts. Annotate tree, search, and
component output with warning/error indicators (e.g., ⚠2 ✗1).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Test UPDATE_ERRORS_OR_WARNINGS operation parsing, count storage and
replacement, getComponentsWithErrorsOrWarnings(), tree node annotations,
formatErrors(), and error annotations in formatTree/formatComponent.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update README, SKILL.md, and commands.md reference with the new errors
command, annotation format, and examples.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Call getTree() before getComponentsWithErrorsOrWarnings() so that
component labels (@c1, @c2, etc.) are properly assigned instead of
showing @c?.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@piotrski piotrski force-pushed the feat/error-warning-counts branch from a6878b0 to 7027dd0 Compare March 18, 2026 00:19
@piotrski piotrski merged commit 0c307e2 into main Mar 18, 2026
4 checks passed
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.

Track and expose component error/warning counts

1 participant