Skip to content

Commit 48d0b03

Browse files
committed
fix(mcp): say a CSS selector screenshot uses the newest page and keep docs keyword links
Only instance ids, class names and host tags are searched on every page; a CSS selector goes to the newest page, so the description and docs now say so. The *MCP, *Angular, *NgRx and *Analog keyword links were escaped by mistake and are restored.
1 parent 3b2c2b7 commit 48d0b03

6 files changed

Lines changed: 12 additions & 12 deletions

File tree

‎apps/docs/src/content/agents/mcp-server.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: Connect a coding agent to the devtools over stdio or HTTP, in Claud
99

1010
# MCP server
1111

12-
The devtools expose their inspectors to coding agents as \*MCP tools and resources. An agent can list your routes, read the live component tree, explain why a form is invalid, or navigate the app.
12+
The devtools expose their inspectors to coding agents as *MCP tools and resources. An agent can list your routes, read the live component tree, explain why a form is invalid, or navigate the app.
1313

1414
There are two ways to connect. Pick one based on the data your agent needs.
1515

‎apps/docs/src/content/agents/tools.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,11 @@ While on, the overlay wraps `Observable.prototype.subscribe` and records which c
289289

290290
An image of one component's host element as the page renders it now. The answer is an MCP image content block (PNG, or JPEG when the PNG is large) with a short note: the size in CSS pixels, what was masked and what could not be drawn. Reads: page.
291291

292-
| Argument | Required | Value |
293-
| ---------- | -------- | ------------------------------------------------------------------------------------------------------------- |
294-
| `selector` | yes | An instance id from the `component-tree` resource (like `c12`), a class name, a host tag or any CSS selector. |
295-
| `page` | no | The page id, from `list-pages`. Without it, every page is searched, newest first. |
296-
| `pageId` | no | Same as `page`. |
292+
| Argument | Required | Value |
293+
| ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
294+
| `selector` | yes | An instance id from the `component-tree` resource (like `c12`), a class name, a host tag or any CSS selector. |
295+
| `page` | no | The page id, from `list-pages`. Without it, ids, class names and tags are searched on every page, newest first, and a CSS selector uses the most recent page. |
296+
| `pageId` | no | Same as `page`. |
297297

298298
The page draws a copy of the element, not the screen: it copies the element's DOM with every computed style written inline into an SVG, and draws that on a canvas that is never added to the page. Nothing in the app changes, no app code runs, and a component scrolled out of view or behind a dialog is drawn all the same. A class name or tag that matches several instances captures the first and lists the ids of all of them. A CSS selector captures the first element it matches on the most recent page, or on `page`.
299299

@@ -812,7 +812,7 @@ The axe pass loads axe-core into the page on demand and changes nothing in the a
812812

813813
## Analog
814814

815-
These tools cover \*Analog apps. Most read your source. Some also read what the Vite plugin recorded.
815+
These tools cover *Analog apps. Most read your source. Some also read what the Vite plugin recorded.
816816

817817
### Routes and files
818818

‎apps/docs/src/content/getting-started/cli.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ The output is static files. Open it offline or host it on any static file server
172172

173173
### Start it over stdio
174174

175-
`mcp` starts an \*MCP server over stdio for coding agents:
175+
`mcp` starts an *MCP server over stdio for coding agents:
176176

177177
```bash
178178
npx @pangular-inspector/devtools mcp

‎apps/docs/src/content/getting-started/other-servers.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: Mount the devtools hub and trace SSR renders in an Angular SSR serv
99

1010
# Hono, h3 and Fastify
1111

12-
\*Angular SSR runs on Hono and h3 through [`createRequestHandler`](https://angular.dev/api/ssr/createRequestHandler), and on Fastify through [`createNodeRequestHandler`](https://angular.dev/api/ssr/node/createNodeRequestHandler). The devtools hub mounts in each of them. The browser part is the same as for Express: load the overlay as shown in [Angular CLI and Express](./express.md#load-the-overlay).
12+
*Angular SSR runs on Hono and h3 through [`createRequestHandler`](https://angular.dev/api/ssr/createRequestHandler), and on Fastify through [`createNodeRequestHandler`](https://angular.dev/api/ssr/node/createNodeRequestHandler). The devtools hub mounts in each of them. The browser part is the same as for Express: load the overlay as shown in [Angular CLI and Express](./express.md#load-the-overlay).
1313

1414
## Two ways to mount the hub
1515

‎apps/docs/src/content/inspectors/ngrx-store.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: Live NgRx signal stores and @ngrx/store state, with entities, dispa
99

1010
# NgRx Store
1111

12-
The Store tab shows your \*NgRx state live. It covers `@ngrx/signals` stores (`signalStore` and `signalState`) and the classic `@ngrx/store`. NGXS, Elf and MiniRx stores show up in the same list through their Redux DevTools integration (see [Other stores](#other-stores)). With the hub mounted, it lives in the **NgRx** dock.
12+
The Store tab shows your *NgRx state live. It covers `@ngrx/signals` stores (`signalStore` and `signalState`) and the classic `@ngrx/store`. NGXS, Elf and MiniRx stores show up in the same list through their Redux DevTools integration (see [Other stores](#other-stores)). With the hub mounted, it lives in the **NgRx** dock.
1313

1414
The tab has two sections. **Live stores** reads the running page. **Source declarations** lists what your files declare.
1515

‎packages/devtools/src/rpc/component-screenshots.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export function createComponentScreenshots(deps: Deps) {
138138
const tool = {
139139
id: 'pangular:screenshot-component',
140140
description:
141-
'An image (PNG, or JPEG when large) of one component\'s host element as rendered now, as an MCP image block. Pass `selector`: an instance id, class name, host tag or CSS selector; without `page` it searches every page, newest first. The page draws a copy from computed styles, so it works off screen and never changes the app; it is not a pixel copy. Password and secret-looking fields, `data-private`, `.sentry-mask`, `.rr-mask` and `data-pangular="mask"` elements, and tokens in text are masked. Cross-origin images without CORS, iframes and web fonts are not drawn. At most 2000 px.',
141+
'An image (PNG, or JPEG when large) of one component\'s host element as rendered now. Pass `selector`: an instance id, class name, host tag or CSS selector. Without `page`, ids, class names and tags are searched on every page, newest first; a CSS selector uses the newest page. The page draws a copy from computed styles, so it works off screen and never changes the app. Password and secret fields, `data-private`, `.sentry-mask`, `.rr-mask` and `data-pangular="mask"` elements, and tokens in text are masked. Cross-origin images without CORS, iframes and web fonts are not drawn. At most 2000 px.',
142142
inputSchema: {
143143
type: 'object',
144144
properties: {
@@ -150,7 +150,7 @@ export function createComponentScreenshots(deps: Deps) {
150150
page: {
151151
type: 'string',
152152
description:
153-
'Page id, when more than one tab reports (see pangular:list-pages). Searches every page without it, newest first.',
153+
'Page id, when more than one tab reports (see pangular:list-pages). Without it, ids, class names and tags are searched on every page, newest first; a CSS selector uses the newest page.',
154154
},
155155
pageId: { type: 'string', description: 'Same as `page`.' },
156156
},

0 commit comments

Comments
 (0)