Repository navigation
fix(mcp): list reporting tabs for an unknown NgRx page - #254
Conversation
inspect-signal-store and signal-store-history answered an unknown `page` with "No page X is reporting NgRx state" followed by the "No NgRx state has been reported yet" text, even when other tabs were reporting. That told agents nothing was connected and gave them no id to retry with, and it broke the promise in the agent tools docs that an unknown page lists the tabs that do report. Both tools now answer with unknownPageText, as dispatch-ngrx-action and the other page tools already do. With no tab reporting at all they still give the original no-data answer.
📝 Walkthrough
Merge Risk | ⚪ Minimal · up to
|
🚀 Deploying Preview to Cloudflare 🚀Preview Deployments by commit
|
There was a problem hiding this comment.
🔇 Additional comments (2)
packages/devtools/src/rpc/ngrx-live-tools.ts (1)
3-3: LGTM!Also applies to: 30-37, 132-132, 192-192
packages/devtools/src/rpc/__tests__/ngrx-live-tools.test.ts (1)
343-343: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.Loosen the exact-copy assertion.
Line 343 asserts a full user-facing sentence. The sentence comes from the shared
unknownPageTexthelper. A harmless wording change in that helper breaks this test and the other tests that use it. Assert stable parts instead, such as the page idp3and theNgRx statelabel.Proposed change
- expect(text).toContain('No page `p3` is reporting NgRx state.'); + expect(text).toContain('`p3`'); + expect(text).toContain('NgRx state');Based on learnings: tests should avoid asserting on exact user-facing copy and should prefer stable identifiers or key substrings.
Source: Learnings
ℹ️ Review info
⚙️ Run configuration
- Configuration used: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
ce67ddd8-ecdc-490a-9d1b-bca98f2ea18f
📒 Files selected for processing (2)
packages/devtools/src/rpc/__tests__/ngrx-live-tools.test.tspackages/devtools/src/rpc/ngrx-live-tools.ts
Limit details: You’ve used all 10 included reviews currently available.
What and why
inspect-signal-storeandsignal-store-historyanswered an unknownpagewith "No page X is reporting NgRx state" followed by "No NgRx state has been reported yet", even when other tabs were reporting. Agents read that as nothing being connected and got no page id to retry with. The agent tools docs (apps/docs/src/content/agents/tools.md, "The page argument") promise that an unknown page lists the tabs that do report, anddispatch-ngrx-actionand the other page tools already do this.Both tools now answer an unknown
pagewith the sharedunknownPageText(page, pages, 'NgRx state')helper fromrpc/pages.ts. It lists the reporting tabs newest first, with their URLs. When no tab reports NgRx state at all, the answer is unchanged.I checked the other NgRx agent tools for the same problem and found none:
dispatch-ngrx-actionalready usesunknownPageText.get-ngrx-storeis a source scan with nopageargument.pangular:ngrx-storeresource takes nopage.How it was verified
pnpm commit:check: 1 commit message OKpnpm format:check: all matched files use Prettier code stylepnpm typecheck: passes (exit 0); the only output is existing NG8107 warnings inapppnpm test:devtools: 129 files, 1429 tests passed, including 4 new tests inrpc/__tests__/ngrx-live-tools.test.tspnpm test:panel: not run,app/unchangedpnpm docs:build: not needed, the docs already describe the new behaviourpnpm extension:build: not needed,app/unchangedNotes for reviewers
withUntrustedPreamble), so this adds no new exposure.pagewhen no tab reports at all still gives "No page X is reporting NgRx state." plus the no-data guidance, so agents are still told how to connect a page.Summary by CodeRabbit