You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: skills/nocobase-ui-builder/SKILL.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ description: >-
47
47
5.`layout` belongs only on `tabs[]` or inline `popup`, never on a block object. For `createForm`, `editForm`, `details`, and `filterForm`, use `fieldsLayout` when the blueprint must control the inner field grid directly. Omit page/popup `layout` only when that tab/popup has at most one non-filter block; otherwise explicit layout is required. For low-level `set-layout`, do not reuse public `{ rows: [[{ key, span }]] }` syntax: runtime `rows` is `Record<string, string[][]>`, each cell array stacks live child `uid`s, `[[uidA], [uidB]]` means two columns, and `[[uidA, uidB]]` means one stacked column.
48
48
6. For `createForm`, `editForm`, and `details`, once the block contains more than 10 real fields, use explicit `fieldGroups` instead of one flat `fields[]` list. Do not treat manual `divider` items as a substitute, and do not combine `fieldGroups` with `fieldsLayout`.
49
49
7. If clicking a shown record or relation record should open details, prefer a field popup. Use a button or action column only when the request explicitly asks for one.
50
-
8. If visible same-title destination menu groups already exist, never create another same-title group just to avoid ambiguity and never choose one locally. In that multi-match case, require explicit `navigation.group.routeId` before write. Only zero-match create and one-match title-only reuse may proceed without `routeId`.
50
+
8. If visible same-title destination menu groups already exist, never create another same-title group just to avoid ambiguity and never choose one locally. In that multi-match case, require explicit `navigation.group.routeId` before write. Without `routeId`, only zero-match create and one-match title reuse may proceed; metadata on reused groups is ignored.
51
51
9. In `applyBlueprint create`, any newly created `navigation.group` and any top-level or second-level `navigation.item` must carry one valid Ant Design icon name. When `navigation.item` is attached under an explicit existing `navigation.group.routeId`, keep an icon by default but do not assume the local preview can prove whether that live target is already third-level or deeper.
52
52
10.`navigation.group.routeId` and desktop-route `id` are navigation locators only. When follow-up localized work or explicit inspection is needed after create/init or successful whole-page `applyBlueprint`, normalize to `pageSchemaUid` for page-level `flow-surfaces get`, and only use live `uid` values returned by `get` / `describe-surface` / create responses for `catalog`, `context`, `get-reaction-meta`, `compose`, `configure`, `add*`, or `remove*`. Never pass a desktop-route `id` as `target.uid`. For artifact-only locator handoffs, keep direct machine-readable fields `navigation.routeId`, `page.pageSchemaUid`, and `liveTargets[].uid`; when no live uid exists yet, use a non-empty placeholder string instead of `null`.
53
53
11. Before the first real whole-page `applyBlueprint`, run the local prepare-write gate (`node skills/nocobase-ui-builder/runtime/bin/nb-page-preview.mjs --stdin-json --prepare-write` or `prepareApplyBlueprintRequest(...)`) and show one ASCII-first prewrite preview from the same draft blueprint. Treat that helper as a local shape/threshold gate: the CLI path normalizes any helper-envelope `collectionMetadata`, scans the blueprint, and auto-fetches only missing collection metadata with `nb api data-modeling collections get --filter-by-tk <collection> --appends fields -j`, falling back to `nb api resource list --resource collections --filter '{"name":"<collection>"}' --appends fields -j`; already supplied metadata wins and is not overwritten. `--no-auto-collection-metadata` keeps the old fail-closed `missing-collection-metadata` behavior for offline checks. `collectionMetadata` belongs only in the helper envelope/call options, never inside the blueprint root. It accepts omitted data-surface `filter` actions, but every direct non-template public `table` / `list` / `gridCard` / `calendar` / `kanban` block must still carry a non-empty block-level `defaultFilter`; if a `filter` action also provides `settings.defaultFilter`, prepare-write validates that explicit action payload too. Public `kanban` main blocks may keep `fields[]`, but must not carry `fieldGroups`, `fieldsLayout`, or `recordActions`; allowed main-block actions are `filter`, `addNew`, `popup`, `refresh`, and `js`. For block settings, numeric `height` means a fixed height and must be paired with `heightMode: "specifyValue"`; prepare-write auto-adds that mode when `settings.height` is present and `settings.heightMode` is omitted, including popup blocks. For sortable public blocks (`table`, `details`, `list`, `tree`, `kanban`, `gridCard`, `map`), legacy `settings.sort` is normalized to canonical `settings.sorting`; `calendar` is left unchanged by that alias path. With resolved `collectionMetadata`, it validates fixed defaults completeness for every involved scope: required `defaults.collections` entries, required popup `{ name, description }` entries for the fixed `view` / `addNew` / `edit` trio, relation field popup child `resource.binding`, and required `fieldGroups` when any fixed generated popup scene still has more than 10 effective fields. Automatic metadata only fills metadata gaps; it does not generate large-collection `fieldGroups`. For artifact-only drafts with no real write, draft `prewrite-preview.txt` directly from the same draft blueprint instead of attempting the local helper CLI.
Copy file name to clipboardExpand all lines: skills/nocobase-ui-builder/references/chart-core.md
+7-8Lines changed: 7 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ Other than that, the chart block should only expose four additional outer-block
41
41
42
42
The priority is to stabilize both "card displays" and "chart renders". Do not expose frontend-internal details such as `props / decoratorProps / stepParams` to the user.
43
43
44
-
Chart is also an example of the general public-settings pattern: when creating or reconfiguring, prefer public semantics such as `query / visual / events / title / displayTitle / height / heightMode`. Do not reverse internal `props / decoratorProps / stepParams` from readback into the next input template.
44
+
Chart is also an example of the general public-settings pattern: when creating or reconfiguring, prefer public semantics such as `query / visual / events / title / height / heightMode`. Do not reverse internal `props / decoratorProps / stepParams` from readback into the next input template.
45
45
46
46
## Default Strategy
47
47
@@ -59,9 +59,9 @@ Chart is also an example of the general public-settings pattern: when creating o
59
59
60
60
The most stable execution order for a chart block is not a one-shot blind write. It is:
-`tree.stepParams.cardSettings.blockHeight.height` when `heightMode = "specifyValue"`
418
-
- if `displayTitle = false`, expect `tree.stepParams.cardSettings.titleDescription` to be absent
419
418
-`cardSettings` is the primary criterion; if `tree.decoratorProps.*` exists it is only an auxiliary mirror, and `tree.props.*` is not the primary criterion
Copy file name to clipboardExpand all lines: skills/nocobase-ui-builder/references/helper-contracts.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@ Use this before the first real whole-page write.
15
15
- treat the normalized write body as authoritative local write shape; expected helper-added or helper-normalized fields should be kept as-is instead of being locally undone
16
16
- once this helper has run successfully, the first whole-page write must consume `result.cliBody` rather than reusing the original draft blueprint
17
17
- this helper is local/read-only for page writes; it never performs the remote `apply-blueprint` write for you
18
+
- by default, in `create` mode it also resolves `navigation.group.title` against live `desktopRoutes`: zero matches keep `title + icon` for new-group creation, one match rewrites the prepared `cliBody` to `navigation.group.routeId`, and multiple matches fail locally requiring explicit `routeId`
18
19
- by default, the CLI path auto-resolves missing `collectionMetadata` entries before validation: it normalizes supplied metadata, scans data-bound blocks and popups, resolves association targets from known metadata for up to 5 rounds, fetches only missing collections with `nb api data-modeling collections get --filter-by-tk <collection> --appends fields -j`, and falls back to `nb api resource list --resource collections --filter '{"name":"<collection>"}' --appends fields -j`
19
20
- caller-supplied `collectionMetadata` wins; fetched metadata only fills missing collection entries and is not emitted in `result.cliBody`
20
21
- pass `--no-auto-collection-metadata` to keep fail-closed behavior; then any data-bound block (a block with `collection`, `resource`, `binding`, `dataSourceKey`, `associationPathName`, or `associationField`) with missing or empty metadata fails with `missing-collection-metadata`
Copy file name to clipboardExpand all lines: skills/nocobase-ui-builder/references/normative-contract.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -221,8 +221,7 @@ For `replace` runs:
221
221
- skill-side authoring may omit layout only for scopes with at most one non-filter block; otherwise the draft must decide layout before write
222
222
- in `create`, if an existing menu group is already known, prefer `navigation.group.routeId`; when only `navigation.group.title` is given, applyBlueprint reuses one unique same-title group, creates a new group if none exists, and rejects ambiguous multi-match titles
223
223
- at the skill-authoring layer, if visible same-title menu groups already exist and title lookup would hit multiple groups, do **not** create another same-title group for disambiguation and do **not** choose one locally; require explicit `routeId` before write
224
-
-`navigation.group.routeId` is exact targeting only and must not be mixed with `icon`, `tooltip`, or `hideInMenu`
225
-
- same-title reuse is title-only; if an existing group's metadata must change, use low-level `updateMenu` instead of applyBlueprint create
224
+
-`navigation.group.routeId` has highest priority and ignores `title`, `icon`, `tooltip`, and `hideInMenu`; title-based reuse also ignores `icon`, `tooltip`, and `hideInMenu` when an existing group is reused; if an existing group's metadata must change, use low-level `updateMenu` instead of applyBlueprint create
226
225
227
226
Use the resolved page `target` from the public response as the carry-forward locator. A successful `apply-blueprint` response is the default stop point. Run follow-up `get` only when follow-up localized work or explicit inspection needs live structure.
Copy file name to clipboardExpand all lines: skills/nocobase-ui-builder/references/page-blueprint.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -210,15 +210,16 @@ Example:
210
210
### `navigation.group` semantics
211
211
212
212
- Prefer `navigation.group.routeId` when the destination menu group is already known.
213
-
-`navigation.group.routeId`is exact targeting only; do not mix it with`icon`, `tooltip`, or`hideInMenu`.
214
-
-`navigation.group.title` is for new-group creation or title-only unique same-title reuse.
213
+
-`navigation.group.routeId`has highest priority; when it is present, `title`,`icon`, `tooltip`, and`hideInMenu` are ignored for the existing group.
214
+
-`navigation.group.title` is for new-group creation or unique same-title reuse.
215
215
- When `navigation.group.title` creates a new group, `navigation.group.icon` is required.
216
216
- When `routeId` is omitted and `title` matches:
217
217
- zero existing groups -> create a new group
218
218
- one existing group -> reuse that group
219
219
- multiple existing groups -> reject and require `routeId`
220
-
- If same-title reuse hits an existing group, keep it title-only.
220
+
- If same-title reuse hits an existing group, `icon`, `tooltip`, and `hideInMenu` are ignored.
221
221
- If an existing group's metadata must change, do not rely on applyBlueprint create; use low-level `updateMenu` instead.
222
+
- During real-write prepare, the local helper may rewrite one unique same-title existing group or one explicit `routeId` group to `navigation.group.routeId` in `cliBody`. Treat that prepared shape as authoritative.
Do not copy `displayTitle` into block families whose runtime configureOptions do not expose it. Known unsupported cases include `chart` and `tree`; chart blocks accept `title`, `height`, `heightMode`, `query`, `visual`, and `events` instead.
293
+
292
294
Height settings:
293
295
294
296
- If you set a numeric `height`, pair it with `heightMode: "specifyValue"` so the frontend uses the value.
Copy file name to clipboardExpand all lines: skills/nocobase-ui-builder/references/tool-shapes.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -375,7 +375,7 @@ nb request body:
375
375
}
376
376
```
377
377
378
-
When the target group is not already known, `navigation.group.title` is also valid; applyBlueprint will reuse a unique same-title group or create a new one when no match exists, but multi-match same-title cases must stop and require explicit `routeId` before write. Same-title reuse is title-only. `navigation.group.routeId` is exact targeting only and must not be mixed with `icon`, `tooltip`, or`hideInMenu`; if an existing group's metadata must change, use low-level `update-menu` instead.
378
+
When the target group is not already known, `navigation.group.title` is also valid; applyBlueprint will reuse a unique same-title group or create a new one when no match exists, but multi-match same-title cases must stop and require explicit `routeId` before write. `navigation.group.routeId`has highest priority; if it is present, `title`, `icon`, `tooltip`, and `hideInMenu` are ignored. For title-based reuse, `icon`, `tooltip`, and`hideInMenu` are also ignored when an existing group is reused. If an existing group's metadata must change, use low-level `update-menu` instead.
379
379
380
380
When the requirement is "click the shown record / relation record to open details", prefer a field popup rather than inventing a new action button:
Copy file name to clipboardExpand all lines: skills/nocobase-ui-builder/references/whole-page-quick.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,7 @@ Treat these as whole-page too: a whole page create / replace, one route-backed t
30
30
- If a whole-page `applyBlueprint` fails before first success, repair the blueprint from the error, rerun `prepare-write` and preview, and retry blueprint-only up to 5 rounds. Do not continue with low-level writes during those pre-success retries. After 5 failed rounds, report the latest blueprint / preview / error evidence.
31
31
5. For `create`, any newly created `navigation.group` and any top-level or second-level `navigation.item` must include one valid semantic Ant Design icon. When `navigation.item` is attached under one explicit existing `navigation.group.routeId`, keep an icon by default but do not assume the local preview can prove whether that live target is already third-level or deeper.
32
32
6. If visible same-title menu groups already exist, do not pick one locally and do not create another same-title group just to disambiguate. Require explicit `navigation.group.routeId` before the write whenever title lookup would hit multiple groups.
33
+
- The real-write prepare helper resolves `navigation.group.title` against live `desktopRoutes` when possible. If exactly one same-title group exists, use the prepared `cliBody` with `navigation.group.routeId`; if more than one exists, stop on the local error and ask for the routeId.
33
34
7. When the page is being created now, keep structure, popup, and whole-page interaction logic in the same blueprint:
34
35
- root blocks in `tabs[].blocks[]`
35
36
- popup content inline under the owning field/action/record action
0 commit comments