-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Problem
The React DevTools protocol sends UPDATE_ERRORS_OR_WARNINGS operations (op type 5) with per-component error and warning counts. We parse and skip them at component-tree.ts:242:
case TREE_OPERATION_UPDATE_ERRORS_OR_WARNINGS: {
// id, numErrors, numWarnings
i += 4;
break;
}This is high-signal data for AI agents β "find the component with errors" is a very common debugging starting point.
Proposed solution
- Store error/warning counts on
ComponentNode(adderrors: numberandwarnings: numberfields) - Update the
TREE_OPERATION_UPDATE_ERRORS_OR_WARNINGShandler to write the counts - Add a CLI command:
errorsβ list components with non-zero error or warning counts - Include error/warning counts in
get componentoutput when non-zero - Optionally annotate the tree output (e.g.,
@c5 [fn] "Form" β 2 β1)
IPC additions
- New command:
{ type: 'errors' }β returns components with errors/warnings - Update
get-componentresponse to include counts when non-zero
Files to change
src/types.tsβ adderrors/warningstoComponentNode, add IPC commandsrc/component-tree.tsβ store counts in the operation handlersrc/daemon.tsβ handle new IPC commandsrc/cli.tsβ adderrorscommandsrc/formatters.tsβ format error/warning output, annotate component/tree displaysrc/__tests__/component-tree.test.tsβ test operation parsing
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels