From 503b17a4ddeef304b9b6128e9ddf1894a7c53d0f Mon Sep 17 00:00:00 2001 From: Piotr Tomczewski Date: Fri, 3 Apr 2026 14:15:11 +0200 Subject: [PATCH 1/9] fix: remove npm self-upgrade step that breaks release pipeline npm@latest started shipping a broken install (missing promise-retry) causing the release job to fail before any actual work happens. The runner already ships with a recent enough npm for OIDC publishing. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/release.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e439864..ef5522c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,9 +26,6 @@ jobs: with: node-version: '22' - - name: Update npm for OIDC trusted publishing - run: npm install -g npm@latest - - name: Install dependencies run: bun install From 21c8c1c7269957df21e480851d8951aa3b2756b5 Mon Sep 17 00:00:00 2001 From: Piotr Tomczewski Date: Fri, 3 Apr 2026 14:27:50 +0200 Subject: [PATCH 2/9] fix: enable OIDC provenance for canary snapshot publish Without NPM_CONFIG_PROVENANCE=true, npm doesn't attempt OIDC auth and immediately fails with ENEEDAUTH. The job already has id-token: write so the OIDC exchange will work once provenance is enabled. Note: the trusted publisher config on npmjs.com also needs to be updated from piotrski/agent-react-devtools to callstackincubator/agent-react-devtools to match the repo move. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ef5522c..4b97f50 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,6 +58,8 @@ jobs: - name: Publish canary snapshot if: steps.changesets.outputs.published != 'true' + env: + NPM_CONFIG_PROVENANCE: true run: | git checkout ${{ github.sha }} bun install From bd305dc346bddacd2d525acc5c1d9c77131f5ee1 Mon Sep 17 00:00:00 2001 From: Piotr Tomczewski Date: Fri, 3 Apr 2026 15:40:31 +0200 Subject: [PATCH 3/9] fix: wire NPM_TOKEN into release and canary publish steps Adds registry-url to setup-node so .npmrc is configured, passes NPM_TOKEN to changesets/action for actual releases, and sets NODE_AUTH_TOKEN for the canary snapshot step. The secret was lost when the repo transferred to callstackincubator. Add NPM_TOKEN as a repository secret to restore publishing. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4b97f50..207d7bf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,6 +25,7 @@ jobs: - uses: actions/setup-node@v4 with: node-version: '22' + registry-url: 'https://registry.npmjs.org' - name: Install dependencies run: bun install @@ -55,10 +56,12 @@ jobs: createGithubReleases: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Publish canary snapshot if: steps.changesets.outputs.published != 'true' env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} NPM_CONFIG_PROVENANCE: true run: | git checkout ${{ github.sha }} From 5855065b51884a09d1a05251e1d65b398f74bd89 Mon Sep 17 00:00:00 2001 From: Piotr Tomczewski Date: Fri, 3 Apr 2026 15:42:07 +0200 Subject: [PATCH 4/9] fix: pin npm@11 instead of @latest for OIDC trusted publishing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit npm@latest broke with a missing promise-retry dependency, so we removed the upgrade step. But that downgraded to the runner's npm 10.9.7 which doesn't support OIDC trusted publishing (requires >= 11.5.1). Pinning to npm@11 gets a stable 11.x release without the breakage. Reverts the NPM_TOKEN workaround — OIDC is the correct approach here. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 207d7bf..9e919ea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,9 @@ jobs: - uses: actions/setup-node@v4 with: node-version: '22' - registry-url: 'https://registry.npmjs.org' + + - name: Update npm for OIDC trusted publishing + run: npm install -g npm@11 - name: Install dependencies run: bun install @@ -56,12 +58,10 @@ jobs: createGithubReleases: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Publish canary snapshot if: steps.changesets.outputs.published != 'true' env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} NPM_CONFIG_PROVENANCE: true run: | git checkout ${{ github.sha }} From 86ae01d12191df2e13bc329ea802f046fabf014d Mon Sep 17 00:00:00 2001 From: Piotr Tomczewski Date: Fri, 3 Apr 2026 19:32:33 +0200 Subject: [PATCH 5/9] feat: add contributor attribution to changelog (#52) Switches from the default changelog generator to @changesets/changelog-github, which adds contributor names and PR links to each changelog entry automatically. --- .changeset/config.json | 2 +- package.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.changeset/config.json b/.changeset/config.json index 6e13655..e8c0f50 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -1,6 +1,6 @@ { "$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json", - "changelog": "@changesets/cli/changelog", + "changelog": ["@changesets/changelog-github", { "repo": "callstackincubator/agent-react-devtools" }], "commit": false, "fixed": [], "linked": [], diff --git a/package.json b/package.json index 2296277..cac17c6 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "release": "bun run build && changeset publish" }, "devDependencies": { + "@changesets/changelog-github": "^0.6.0", "@changesets/cli": "^2.27.0" } } From 283be431abf870743ae3227473b12851efd048fc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 3 Apr 2026 19:37:34 +0200 Subject: [PATCH 6/9] chore(release): version packages (#43) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changeset/daemon-auto-restart.md | 5 -- .changeset/error-warning-counts.md | 11 ---- .../fix-inspect-hooks-and-numeric-ids.md | 8 --- .changeset/profile-diff.md | 11 ---- .changeset/profile-export.md | 9 --- .changeset/profile-timeline-pagination.md | 12 ---- .changeset/smart-tree-truncation.md | 13 ---- .changeset/uninit-command.md | 11 ---- packages/agent-react-devtools/CHANGELOG.md | 61 +++++++++++++++++++ packages/agent-react-devtools/package.json | 2 +- 10 files changed, 62 insertions(+), 81 deletions(-) delete mode 100644 .changeset/daemon-auto-restart.md delete mode 100644 .changeset/error-warning-counts.md delete mode 100644 .changeset/fix-inspect-hooks-and-numeric-ids.md delete mode 100644 .changeset/profile-diff.md delete mode 100644 .changeset/profile-export.md delete mode 100644 .changeset/profile-timeline-pagination.md delete mode 100644 .changeset/smart-tree-truncation.md delete mode 100644 .changeset/uninit-command.md diff --git a/.changeset/daemon-auto-restart.md b/.changeset/daemon-auto-restart.md deleted file mode 100644 index 89341d4..0000000 --- a/.changeset/daemon-auto-restart.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"agent-react-devtools": patch ---- - -Auto-restart daemon when CLI detects the binary has been rebuilt since the daemon started. Previously, rebuilding the package required manually stopping and restarting the daemon for changes to take effect. diff --git a/.changeset/error-warning-counts.md b/.changeset/error-warning-counts.md deleted file mode 100644 index d4b6980..0000000 --- a/.changeset/error-warning-counts.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"agent-react-devtools": minor ---- - -Track and expose component error/warning counts - -Components now track error and warning counts from the React DevTools protocol (`UPDATE_ERRORS_OR_WARNINGS` operations). - -- New `errors` command lists components with non-zero error or warning counts -- `get component` output includes error/warning counts when non-zero -- Tree, search, and component output annotates affected components (e.g., `@c5 [fn] Form ⚠2 ✗1`) diff --git a/.changeset/fix-inspect-hooks-and-numeric-ids.md b/.changeset/fix-inspect-hooks-and-numeric-ids.md deleted file mode 100644 index f1a27ba..0000000 --- a/.changeset/fix-inspect-hooks-and-numeric-ids.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"agent-react-devtools": patch ---- - -Fix component inspection crash and unresolvable find results - -- Fixed a crash in hook parsing that caused `get component` to silently time out on all components in affected apps -- Components outside the labeled tree range now show a usable ID (e.g. `@c?(id:667)`) in `find` results diff --git a/.changeset/profile-diff.md b/.changeset/profile-diff.md deleted file mode 100644 index 7bcb0d3..0000000 --- a/.changeset/profile-diff.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"agent-react-devtools": minor ---- - -Add `profile diff ` command - -- Compares two profiling exports side by side -- Shows regressed, improved, new, and removed components -- Aggregates by display name, computes avg/max duration deltas -- Configurable threshold filters noise from insignificant changes (default 5%, adjust with `--threshold`) -- No daemon required - works purely on exported JSON files diff --git a/.changeset/profile-export.md b/.changeset/profile-export.md deleted file mode 100644 index 60b1f33..0000000 --- a/.changeset/profile-export.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"agent-react-devtools": minor ---- - -Add `profile export ` command - -- Exports profiling session as a JSON file compatible with the React DevTools Profiler -- Import the file in the browser extension's Profiler tab to visualize flame graphs, ranked charts, and commit timelines -- Includes commit data, fiber durations, change descriptions, effect durations, and component snapshots diff --git a/.changeset/profile-timeline-pagination.md b/.changeset/profile-timeline-pagination.md deleted file mode 100644 index 357a5dd..0000000 --- a/.changeset/profile-timeline-pagination.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -"agent-react-devtools": minor ---- - -Pagination and sorting for `profile timeline` - -Large profiling sessions no longer flood agent context with hundreds of commits: - -- **Default limit of 20**: `profile timeline` returns at most 20 entries unless `--limit N` is specified. -- **`--offset N` flag**: Skip the first N commits for pagination. -- **`--sort duration`**: Sort commits by render duration (slowest first) instead of chronological order. -- **Paginated header**: Output shows `Commit timeline (showing 1–20 of 87):` when paginated, or `Commit timeline (87 commits):` when all results fit on one page. diff --git a/.changeset/smart-tree-truncation.md b/.changeset/smart-tree-truncation.md deleted file mode 100644 index ed6be5b..0000000 --- a/.changeset/smart-tree-truncation.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -"agent-react-devtools": minor ---- - -Smart tree truncation and subtree extraction for large component trees - -Large React apps (500-2000+ components) now produce much smaller `get tree` output: - -- **Host filtering by default**: `
`, ``, and other host components are hidden (use `--all` to show them). Host components with keys or custom element names are always shown. -- **Sibling collapsing**: When a parent has many children with the same display name (e.g. list items), only the first 3 are shown with a `... +N more ComponentName` summary. -- **Summary footer**: Output ends with `N components shown (M total)` so the agent knows how much was filtered. -- **`--max-lines N` flag**: Hard cap on output lines to stay within context budgets. -- **Subtree extraction**: `get tree @c5` shows only the subtree rooted at a specific component. Labels are re-assigned starting from `@c1` within the subtree. Combine with `--depth N` to limit depth within the subtree. diff --git a/.changeset/uninit-command.md b/.changeset/uninit-command.md deleted file mode 100644 index 58d97e4..0000000 --- a/.changeset/uninit-command.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"agent-react-devtools": minor ---- - -Add `uninit` command to reverse framework configuration - -`agent-react-devtools uninit` removes the changes made by `init` — restoring your config files to their original state. - -- Supports all frameworks: Vite, Next.js (Pages Router and App Router), CRA -- `--dry-run` flag previews what would be removed without writing any files -- Safe to run on projects not configured by `init` (no-op) diff --git a/packages/agent-react-devtools/CHANGELOG.md b/packages/agent-react-devtools/CHANGELOG.md index 74b3630..c9bc060 100644 --- a/packages/agent-react-devtools/CHANGELOG.md +++ b/packages/agent-react-devtools/CHANGELOG.md @@ -1,5 +1,66 @@ # agent-react-devtools +## 0.4.0 + +### Minor Changes + +- 0c307e2: Track and expose component error/warning counts + + Components now track error and warning counts from the React DevTools protocol (`UPDATE_ERRORS_OR_WARNINGS` operations). + + - New `errors` command lists components with non-zero error or warning counts + - `get component` output includes error/warning counts when non-zero + - Tree, search, and component output annotates affected components (e.g., `@c5 [fn] Form ⚠2 ✗1`) + +- 65c391f: Add `profile diff ` command + + - Compares two profiling exports side by side + - Shows regressed, improved, new, and removed components + - Aggregates by display name, computes avg/max duration deltas + - Configurable threshold filters noise from insignificant changes (default 5%, adjust with `--threshold`) + - No daemon required - works purely on exported JSON files + +- 5c5ace6: Add `profile export ` command + + - Exports profiling session as a JSON file compatible with the React DevTools Profiler + - Import the file in the browser extension's Profiler tab to visualize flame graphs, ranked charts, and commit timelines + - Includes commit data, fiber durations, change descriptions, effect durations, and component snapshots + +- b0e64b8: Pagination and sorting for `profile timeline` + + Large profiling sessions no longer flood agent context with hundreds of commits: + + - **Default limit of 20**: `profile timeline` returns at most 20 entries unless `--limit N` is specified. + - **`--offset N` flag**: Skip the first N commits for pagination. + - **`--sort duration`**: Sort commits by render duration (slowest first) instead of chronological order. + - **Paginated header**: Output shows `Commit timeline (showing 1–20 of 87):` when paginated, or `Commit timeline (87 commits):` when all results fit on one page. + +- a1bed65: Smart tree truncation and subtree extraction for large component trees + + Large React apps (500-2000+ components) now produce much smaller `get tree` output: + + - **Host filtering by default**: `
`, ``, and other host components are hidden (use `--all` to show them). Host components with keys or custom element names are always shown. + - **Sibling collapsing**: When a parent has many children with the same display name (e.g. list items), only the first 3 are shown with a `... +N more ComponentName` summary. + - **Summary footer**: Output ends with `N components shown (M total)` so the agent knows how much was filtered. + - **`--max-lines N` flag**: Hard cap on output lines to stay within context budgets. + - **Subtree extraction**: `get tree @c5` shows only the subtree rooted at a specific component. Labels are re-assigned starting from `@c1` within the subtree. Combine with `--depth N` to limit depth within the subtree. + +- c7127db: Add `uninit` command to reverse framework configuration + + `agent-react-devtools uninit` removes the changes made by `init` — restoring your config files to their original state. + + - Supports all frameworks: Vite, Next.js (Pages Router and App Router), CRA + - `--dry-run` flag previews what would be removed without writing any files + - Safe to run on projects not configured by `init` (no-op) + +### Patch Changes + +- 68bd0fc: Auto-restart daemon when CLI detects the binary has been rebuilt since the daemon started. Previously, rebuilding the package required manually stopping and restarting the daemon for changes to take effect. +- 90d1344: Fix component inspection crash and unresolvable find results + + - Fixed a crash in hook parsing that caused `get component` to silently time out on all components in affected apps + - Components outside the labeled tree range now show a usable ID (e.g. `@c?(id:667)`) in `find` results + ## 0.3.0 ### Minor Changes diff --git a/packages/agent-react-devtools/package.json b/packages/agent-react-devtools/package.json index 03c3bd7..503ee41 100644 --- a/packages/agent-react-devtools/package.json +++ b/packages/agent-react-devtools/package.json @@ -1,6 +1,6 @@ { "name": "agent-react-devtools", - "version": "0.3.0", + "version": "0.4.0", "description": "CLI tool for AI agents to inspect React component trees and profile performance", "type": "module", "bin": { From 82f22465d517d7203ec767d9cd9bb7ab64d41850 Mon Sep 17 00:00:00 2001 From: Piotr Tomczewski Date: Fri, 3 Apr 2026 19:49:25 +0200 Subject: [PATCH 7/9] fix: bypass broken pre-installed npm by downloading tarball directly --- .github/workflows/release.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9e919ea..684f191 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,7 +27,13 @@ jobs: node-version: '22' - name: Update npm for OIDC trusted publishing - run: npm install -g npm@11 + run: | + curl -fsSL https://registry.npmjs.org/npm/-/npm-11.3.0.tgz -o /tmp/npm.tgz + npm_root="$(dirname "$(dirname "$(which npm)")")/lib/node_modules/npm" + tar -xzf /tmp/npm.tgz -C /tmp + rm -rf "$npm_root" + mv /tmp/package "$npm_root" + npm --version - name: Install dependencies run: bun install From 0426fbe6338441678d14b434058f10053bf1c92b Mon Sep 17 00:00:00 2001 From: Piotr Tomczewski Date: Fri, 3 Apr 2026 19:59:02 +0200 Subject: [PATCH 8/9] fix: add NPM_CONFIG_PROVENANCE to release step for OIDC publishing --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 684f191..90c9d29 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -64,6 +64,7 @@ jobs: createGithubReleases: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_CONFIG_PROVENANCE: true - name: Publish canary snapshot if: steps.changesets.outputs.published != 'true' From c579ebb52a10fb5898caa5dd6aee66976de7891a Mon Sep 17 00:00:00 2001 From: Piotr Tomczewski Date: Fri, 3 Apr 2026 20:01:33 +0200 Subject: [PATCH 9/9] fix: remove npm upgrade step, rely on pre-installed npm --- .github/workflows/release.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 90c9d29..0dbe26c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,15 +26,6 @@ jobs: with: node-version: '22' - - name: Update npm for OIDC trusted publishing - run: | - curl -fsSL https://registry.npmjs.org/npm/-/npm-11.3.0.tgz -o /tmp/npm.tgz - npm_root="$(dirname "$(dirname "$(which npm)")")/lib/node_modules/npm" - tar -xzf /tmp/npm.tgz -C /tmp - rm -rf "$npm_root" - mv /tmp/package "$npm_root" - npm --version - - name: Install dependencies run: bun install