Skip to content

Commit 8af37ee

Browse files
committed
docs(skills): teach the report-index navigation item beside the named report
A `type: 'report'` item with no `reportName` opens the app's report index (`/reports`), and the console no longer adds an index entry itself (PR #27566), so an app has one only where its navigation declares it. The objectstack-ui navigation table and example, the objectui app-composition route table, and a new objectstack-ui eval case now teach that form. Fixes #27609 Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cyZb8pD9989yV2qXKE
1 parent c4cb5ec commit 8af37ee

6 files changed

Lines changed: 35 additions & 8 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): objectstack-ui and objectui teach the report-index navigation item beside the named report
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
- **Before.** The skills taught only the named report item, `{ type: 'report', reportName }`. Since PR #27566 a `type: 'report'` item with no `reportName` opens the app's report index (`/reports`), and the console no longer adds an index entry on its own, so an agent following the skills shipped an app with no report index entry.
11+
- **Now.** The `objectstack-ui` navigation item table marks `reportName` optional and says what omitting it opens; `rules/navigation.md` shows the index entry beside the named one and says the console adds none itself; the `objectui` app-composition route table lists `{type:'report'}` → `/reports`. A new eval case (10 in `evals/views-apps-actions-pages.json`) asks for an app's report index entry and expects `{ type: 'report' }` with no `reportName`.
12+
- No schema, key or behaviour changes.

‎scripts/check-skills-token-ratchet.mjs‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,8 +1123,13 @@ export const CEILINGS = new Map([
11231123
// spells its own `must_not_contain` string (-2 bytes). 7154 -> 8034 bytes -> 2009 tokens,
11241124
// ceiling +220, pinned AT the measurement. Same ruling as the line above (2026-10-27, tap A:
11251125
// 「A:先削重复,余额按实测提高」).
1126-
// ceil($(wc -c < skills/objectstack-ui/evals/views-apps-actions-pages.json) / 4) == ceil(8034 / 4)
1127-
['skills/objectstack-ui/evals/views-apps-actions-pages.json', 2009],
1126+
// 2009 -> 2108 (#27609): case 10, the app's report index entry — `{ type: 'report' }` with no
1127+
// `reportName` (PR #27566), which the console no longer adds on its own — +398 bytes; the
1128+
// file's cases still share no sentence, so there was no duplicate to cut (0 bytes).
1129+
// 8034 -> 8432 bytes -> 2108 tokens, ceiling +99, pinned AT the measurement. Same ruling as
1130+
// the lines above (2026-10-27, tap A: 「A:先削重复,余额按实测提高」).
1131+
// ceil($(wc -c < skills/objectstack-ui/evals/views-apps-actions-pages.json) / 4) == ceil(8432 / 4)
1132+
['skills/objectstack-ui/evals/views-apps-actions-pages.json', 2108],
11281133
['skills/objectstack-upgrade/evals/protocol-major-upgrade.json', 1033],
11291134

11301135
// the remaining skills' eval notes

‎skills/objectstack-ui/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ second at load, per ADR-0019 (app-as-consumer-unit) D3. More audiences are
168168
| `group` | `label`, `icon`, `expanded`, `children[]` | Collapsible group of items |
169169
| `object` | `objectName`, `viewName?`, `recordId?`, `filters?`, `label`, `icon` | Link to an object list, a named view, a record deep-link, or a `filters` slice on the bare data surface |
170170
| `dashboard` | `dashboardName`, `label`, `icon` | Link to a dashboard |
171-
| `report` | `reportName`, `label`, `icon` | Link to a report |
171+
| `report` | `reportName?`, `label`, `icon` | A report; no `reportName` = the app's report index |
172172
| `page` | `pageName`, `label`, `icon` | Link to a custom Page |
173173
| `url` | `url`, `label`, `icon` | External or custom URL |
174174
| `action` | `actionDef` (`{ actionName, params? }`), `label`, `icon` | Run an action instead of navigating |

‎skills/objectstack-ui/evals/views-apps-actions-pages.json‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,16 @@
9090
"must_contain": ["disabled:", "disabledReason"],
9191
"must_not_contain": ["description:", "disabledMessage", "disabledTooltip", "visible:"]
9292
}
93+
},
94+
{
95+
"id": 10,
96+
"prompt": "Give the crm app a Reports entry listing every report it ships.",
97+
"expected_output": "`{ type: 'report' }` with no `reportName` is the app's report index; the console adds none unless navigation declares it.",
98+
"files": [],
99+
"assertions": {
100+
"must_contain": ["type: 'report'"],
101+
"must_not_contain": ["reportName"]
102+
}
93103
}
94104
]
95105
}

‎skills/objectstack-ui/rules/navigation.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ export const CrmApp = App.create({
3030
{ id: 'nav_opportunity', type: 'object', objectName: 'opportunity', label: 'Opportunities', icon: 'target' },
3131
// Open a specific named view instead of the object default:
3232
{ id: 'nav_pipeline', type: 'object', objectName: 'opportunity', viewName: 'pipeline_kanban', label: 'Sales Pipeline', icon: 'columns-3' },
33-
// One-off parameterized slice — lands on the bare data surface
34-
// (`/:objectName/data`, objectui ADR-0055) with removable URL filter
35-
// chips, NOT anchored to a saved view. Don't author a view for these:
33+
// One-off slice on the bare data surface (Run Modes, below):
3634
{ id: 'nav_my_open', type: 'object', objectName: 'opportunity', filters: { owner_id: '{current_user_id}', status: 'open' }, label: 'My Open Deals', icon: 'user-check' },
3735
{ id: 'nav_dash', type: 'dashboard', dashboardName: 'sales_dashboard', label: 'Sales Dashboard', icon: 'chart-bar' },
3836
{ id: 'nav_report', type: 'report', reportName: 'opportunities_by_stage', label: 'Opps by Stage', icon: 'bar-chart-3' },
37+
// No `reportName` = the app's report index; the console adds none itself:
38+
{ id: 'nav_reports', type: 'report', label: 'Reports', icon: 'library' },
3939
],
4040
},
4141
{

‎skills/objectui/guides/app-composition.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ source of truth for that mapping.
1919
| `{type:'object', objectName, filters}` | `/:objectName/data?filter[k]=v` | Bare data surface. No saved-view tab bar; conditions render as removable chips; full filter/sort/group toolbar; "Save as view" is the exit |
2020
| `{type:'dashboard', dashboardName}` | `/dashboard/:name` | Dashboard renderer |
2121
| `{type:'report', reportName}` | `/report/:name` | Report renderer |
22+
| `{type:'report'}` | `/reports` | The app's report index; none unless navigation declares it |
2223
| `{type:'page', pageName}` | `/page/:name` | Bare SDUI rendering only -- no object shell, so view switching, actions and record routing are hand-assembled in the page schema |
2324
| `{type:'url', url}` | external | `target` controls the tab |
2425
| `{type:'component', componentRef, params?}` | `/component/:ns/:name?…` | `componentRef` is colon-joined (`metadata:resource`); `params` ride as querystring. `metadata:*` refs are special-cased onto the `/metadata[/:type[/:name]]` routes |
@@ -30,8 +31,7 @@ source of truth for that mapping.
3031

3132
- Nav items are a **discriminated union on `type`**. There is no `path` and no
3233
`kind` — those keys are ignored by `resolveHref` and rejected/stripped at
33-
save. Emit the typed target field for the chosen type (`objectName`,
34-
`pageName`, `dashboardName`, `reportName`, `url`, `componentRef`).
34+
save. Emit the chosen type's target field.
3535
- Object-item targets are exclusive, not ordered (spec `objectNavTargetExclusivity`):
3636
`filters` is mutually exclusive with `recordId`/`viewName`; `runAction` is refused with
3737
`recordId` (it composes with `viewName` or `filters`); `recordId` + `viewName` is tolerated.

0 commit comments

Comments
 (0)