From 2bdf0f6317a2d2d414abc9801f993663669e9c62 Mon Sep 17 00:00:00 2001 From: "objectstack-fleet[bot]" <332303061+objectstack-fleet[bot]@users.noreply.github.com> Date: Thu, 8 Oct 2026 13:23:12 +0000 Subject: [PATCH] skills(ui): pages.md Routing model teaches the `doc` navigation item; eval 4 expects it The published skill said "There is no dedicated `doc` nav-item type yet, so use a `url` item pointing at `/docs/...`" while `@objectstack/spec` declares the `doc` navigation item (`{ type: 'doc', doc }` / `{ type: 'doc', book }`) and the console renders it. The Routing model paragraph and its example now teach the declared item; eval 4's expected output and assertions pin the `doc` item and refuse the `url` answer. Paid inside the token ratchet by deleting the former-page-types sentence the Page Types lead restates. Co-authored-by: Claude Claude-Session: https://claude.ai/code/session_01CXydFDyiQwNbGFkmwrcRQq --- .../evals/views-apps-actions-pages.json | 6 +++--- skills/objectstack-ui/rules/pages.md | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/skills/objectstack-ui/evals/views-apps-actions-pages.json b/skills/objectstack-ui/evals/views-apps-actions-pages.json index 4aa871588a4..8176e5e313a 100644 --- a/skills/objectstack-ui/evals/views-apps-actions-pages.json +++ b/skills/objectstack-ui/evals/views-apps-actions-pages.json @@ -34,11 +34,11 @@ { "id": 4, "prompt": "Design a custom lead record page: the Convert action inline in the header, a highlights strip, a stage path over `status`, and the related contacts. Also write a user guide for the `crm` package under src/docs and link it from the nav.", - "expected_output": "`definePage({ name, label, type: 'record', object: 'lead', template: 'three-column', regions: [...] })` with `page:header` (the declared action's id in `properties.actions`, no sibling action node), `record:highlights`, `record:path` (`statusField`, `stages`), `record:related_list`. The guide is a flat, namespace-prefixed `src/docs/crm_user_guide.md` in pure Markdown (MDX and image references are rejected at build), surfaced by a `type: 'url'` nav item pointing at `/docs/crm_user_guide`.", + "expected_output": "`definePage({ name, label, type: 'record', object: 'lead', template: 'three-column', regions: [...] })` with `page:header` (the declared action's id in `properties.actions`, no sibling action node), `record:highlights`, `record:path` (`statusField`, `stages`), `record:related_list`. The guide is a flat, namespace-prefixed `src/docs/crm_user_guide.md` in pure Markdown (MDX and image references are rejected at build), surfaced by a `type: 'doc'` nav item (`doc: 'crm_user_guide'`).", "files": [], "assertions": { - "must_contain": ["definePage", "type: 'record'", "regions", "page:header", "record:path", "src/docs/", "/docs/"], - "must_not_contain": ["record_detail", ".mdx"] + "must_contain": ["definePage", "type: 'record'", "regions", "page:header", "record:path", "src/docs/", "type: 'doc'"], + "must_not_contain": ["record_detail", ".mdx", "type: 'url'"] } }, { diff --git a/skills/objectstack-ui/rules/pages.md b/skills/objectstack-ui/rules/pages.md index 645155c9698..85f70ec5309 100644 --- a/skills/objectstack-ui/rules/pages.md +++ b/skills/objectstack-ui/rules/pages.md @@ -31,9 +31,7 @@ Disambiguation: there is **no** `record_detail`, `app_launcher`, or `type: 'app'`, a utility panel is `type: 'utility'`. Likewise grid/kanban/calendar/gallery/timeline are NOT page types — they are *visualizations* of a `list` page -(`interfaceConfig.appearance.allowedVisualizations`). Former roadmap-only types -(`dashboard`, `form`, `record_detail`, `record_review`, `overview`, `blank`) -were removed from the enum because they never shipped a renderer. +(`interfaceConfig.appearance.allowedVisualizations`). ### Templates & Regions @@ -357,13 +355,15 @@ resolves any doc regardless of which app you came from. The URL is one URL. Do **not** design per-app or per-package doc URLs; that gives one doc many addresses and breaks cross-references. -To surface a doc inside an app, add a navigation item that **links into** -that global URL. There is no dedicated `doc` nav-item type yet, so use a -`url` item pointing at `/docs/`: +To surface a doc inside an app, add a `doc` navigation item (a `url` item is +for an external or custom URL): `doc: ''` opens that page, +`book: ''` opens the book at its first readable page (both: that page +in that book). It inherits the docs audience gate, and `os build` refuses a +target the package lacks (`docs/nav-target`): ```typescript navigation: [ - { id: 'nav_help', type: 'url', url: '/docs/crm_user_guide', + { id: 'nav_help', type: 'doc', doc: 'crm_user_guide', label: 'User Guide', icon: 'book-open' }, ] ```