#1420: clearer option errors and text cut-off in the inspect docs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: GPT-6 Astra <noreply@openai.com>
This commit is contained in:
Mert Dede
2026-10-29 12:43:53 +03:00
co-authored by Claude Opus 5.5 GPT-6 Astra
parent 462b32a642
commit bd7a277c75
3 changed files with 15 additions and 13 deletions
+8 -8
View File
@@ -178,16 +178,16 @@ that `node.set` accepts are listed in [mcp.md](mcp.md#conventions-agents-must-kn
Both inspection methods accept `fields: [string]`: exact, case-sensitive top-level node keys such
as `name`, `type`, `x`, `fills`, `characters` or `pluginData`, applied recursively to pages too.
`[]` keeps only ids and structure. `id`, `children` and depth-boundary `childCount` are always kept.
Unknown keys are errors listing the valid keys; wrong types are
errors too.
An unknown key is an error that lists the valid keys; a `fields` that is not an array of strings,
or an `outline` that is not a boolean, is an error too.
`outline: true` selects `id`, `name`, `type`, `characters`, `mainComponentName` and `visible`, plus
structure. `characters` stops at 120 characters, with ASCII `...` appended only when
longer. When `visible` is selected (by either option), every node has an explicit boolean;
without options the output stays sparse. `outline: true` with `fields` is an error;
`outline: false` with `fields` is allowed. Document metadata is unchanged. The engine command
`node.get` (not this control method) takes the same options but no `depth`: it always returns one
level of children.
structure. `characters` is cut after 120 characters (Unicode scalars), with ASCII `...` appended
only when longer. When `visible` is selected (by either option), every node has an explicit
boolean; without options the output stays sparse. `outline: true` with `fields` is an error;
`outline: false` with `fields` is allowed. Document metadata is unchanged. Through
`engine.execute`, the engine command `node.get` takes the same options but no `depth`; it always
returns one level of children.
```json
{"id":5,"method":"document.inspect","params":{"depth":6,"outline":true}}
+6 -4
View File
@@ -357,12 +357,14 @@ a later step can use `{"$step": 0, "field": "ids/0"}` to target the first match.
keys, applied to every layer and page. For example, `fields: ["name", "type", "width", "height"]`
leaves out paints and text properties; `fields: []` keeps only ids and structure. `id`, `children`,
depth-boundary `childCount` and the transport's `truncated` marker are always kept (`truncated` is
not a selectable field). Unknown keys or wrong types
are errors; an unknown key's error lists the valid keys. Document metadata stays unchanged.
not a selectable field). An unknown key is an error that lists the valid keys; a `fields` that is
not an array of strings, or an `outline` that is not a boolean, is an error too. Document metadata
stays unchanged.
`outline: true` selects `id`, `name`, `type`, `characters`, `mainComponentName` and `visible`, plus
structure. Text is cut after 120 characters, with ASCII `...` only when longer. Selecting
`visible`, explicitly or through outline, reports a boolean even for visible layers and pages;
structure. `characters` is cut after 120 characters (Unicode scalars), with ASCII `...` appended
only when longer. Selecting `visible`, explicitly or through outline, reports a boolean even for
visible layers and pages;
without these options the output stays sparse. `outline: true` cannot be combined with `fields`;
`outline: false` can. Both options keep the existing depth and response-size limits.
+1 -1
View File
@@ -48,7 +48,7 @@ blockers.
| Milestone | Status | Left | Hours |
|---|---|---|---|
| M0 Foundation: workspace, model, renderer, engine, UI shell, app, control channel | done (2026-10-09) | — | — |
| M0.9 CLI + MCP, web build, release packaging, PDF export | done (v0.2.0 released 2026-10-10 for every platform; compact inspection with `fields` and `outline`, part of #996) | — | — |
| M0.9 CLI + MCP, web build, release packaging, PDF export | done (v0.2.0 released 2026-10-10 for every platform). Added since: compact inspection with `fields` and `outline` (part of #996) | — | — |
| M1 Core editing completeness (tools, panels, menus, clipboard, files) | ~77% | interaction pass (Open recent, the outline mode variants and keyboard box selection landed 2026-10-11; repeat commands preserve the underlying edit and undo steps, #181; the Layout panel's constrain-proportions link scales the other side, #220) | 6–12 + pass |
| M2 Layout depth | ~80% | grid `fr` rows, real-file QA | 6–12 |
| M3 Components & styles depth | ~78% (extended collections, variables import/export, gradient stop and variant bindings landed 2026-10-11) | real libraries, component playground | 7–14 |