Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

feat(types,layout): a doc nav entry validates and draws as a link into the docs portal (objectui#11197) - #11207

Merged
objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/issue-11197-doc-nav-entry
Sep 30, 2026
Merged

objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/issue-11197-doc-nav-entry

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #11197 — the acceptance, the rendering, the portal's book-name resolution (option A, the seat's answer on the card, comment 5910896132) and every pin the card, the claim and that answer name.
Clause-②: no

What changed

@object-ui/types

  • NavigationItemTypeSchema is read off the discriminator of @objectstack/spec's navigation union at module load (the AppSchema.navigation walk this file already used for the separator's keys, now shared). It gains doc, and the next spec type flows in with no edit here.
  • A doc entry is judged by its own arm, routed by a discriminated union on type. That arm hands the entry WHOLE to the spec's own DocNavItemSchema and raises each issue it answers, so it accepts nothing the spec's doc arm refuses: the one-target rule, the doc-name shape, the non-empty book, the snake_case id and the closed key set are the spec's words, chained and never copied. The arm passes unknown keys through to that judge instead of stripping them, so nothing unknown survives a successful parse. The judge's OUTPUT is never used (the spec's parse turns a visible string into an expression envelope; this validator writes no value into an author's document). An empty label is refused as on every sibling.
  • The TypeScript face: NavigationEntryItem gains book and doc, derived from the spec's DocNavItem.
  • An unknown type is now refused with invalid_union at type (was invalid_value) — the code the spec's own union answers with. The message still lists the expected types.

@object-ui/layout

  • resolveHref sends a doc entry to the console docs portal under its basePath, using the portal's own two route shapes: { doc } to .../docs/DOC (the flat-doc permalink, which redirects to the doc's canonical in-book URL), { book } to .../docs/BOOK (the book landing), both to .../docs/BOOK/DOC. In an app basePath is /apps/PACKAGE_ID, the package-container docs tree AppHeader's "This app's docs" entry already opens; on home navigation it is the top-level /docs portal.
  • An unlabelled doc entry shows the page it opens, else the book (the machine-name rung every non-inheriting type uses).
  • The mobile tab bar delegates a doc entry to resolveHref instead of drawing #.
  • Gating is the base keys every sibling carries (visible, requiredPermissions, requiresObject, requiresService) through the existing guard. No client-side audience: the book audience gate stays the server's read layer (ADR-0046 section 6.7).

@object-ui/plugin-designer — NAV_TYPE_META drops the | 'doc' key that bridged the pin lag, as its own comment asked at the pin that ships doc.

@object-ui/app-shell — the app designer's preview keyed its kinds by a hand list of nine, so a label-less doc entry was DROPPED from the read-only preview and the design canvas badged a spec-valid doc entry in the amber untyped tone. The kind set is now a Record keyed by the spec-derived NavigationItemType (a spec addition stops it compiling), and a doc entry draws with its target, its route and its own tone. It is never picked as the landing, matching the runtime's findFirstRoute.

@object-ui/console — the docs portal resolves a path segment that is a book's NAME (and no book's slug) to that book and redirects, replace, to the canonical base/bookSlug(book)[/DOC] URL. See the option-A section below.

Docs — content/docs/guide/designing-app-navigation.md teaches the doc entry and says to name a book by its name. Changeset — minor for the five packages.

Measured: which portal URLs resolve (item 3)

A throwaway integration run (not committed) mounted the real DocsLayout / AppDocsIndex / DocsSlug / DocPage under /apps/:appName/docs with a mocked adapter serving an authored book showcase_manual with slug: 'manual' (the shape of the one authored book in objectstack's examples) plus a package with no authored book.

entry href this PR draws where the portal lands
{ doc: 'showcase_lead_guide' } .../docs/showcase_lead_guide redirects to .../docs/manual/showcase_lead_guide: doc content and book sidebar
{ book: 'showcase_manual' } (slug manual) .../docs/showcase_manual "Documentation not found"
control: .../docs/manual — book landing, then the first doc with sidebar
{ book: 'showcase_manual', doc: 'showcase_lead_guide' } .../docs/showcase_manual/showcase_lead_guide doc content renders; no book sidebar
{ book: 'com.example.ops' } (implicit book) .../docs/com.example.ops book landing, then its doc
{ book: 'com.example.ops', doc: 'ops_setup' } .../docs/com.example.ops/ops_setup doc content

So, before option A: a doc target always resolved, and so did a book target whose portal slug equals its name (every implicit package book, every authored book without a slug). A book that authors a different slug was reached by neither book shape: the console addresses books by slug, the spec's nav target names the book's name. Option A closes that below.

Option A — the portal resolves a book NAME

book-nav.ts gains bookNamedBy(segment, books): the book whose name is the segment, null when the segment is some book's slug. DocsSlug and DocPage redirect a hit, replace, to base/bookSlug(book) and base/bookSlug(book)/DOC — the same Navigate replace the portal already uses for a flat-doc permalink. The renderer's href is unchanged.

The invariant: no URL that resolves today changes its answer. The precedence was measured first, with the new pins run against the UNMODIFIED portal: 5 red (the name cases), 14 green (the 6 existing portal tests, 3 collision pins, 5 controls). Today's answers for the red five: /docs/showcase_manual and its app-scoped twin stayed put on "Documentation not found"; /docs/showcase_manual/showcase_lead_guide and its twin rendered the doc in place with no book sidebar; /docs/acme_manual was caught by the name-prefix fallback and redirected to /docs/acme-docs/acme_manual, where the reader answered "Documentation not found".

So the name lookup runs AFTER a book's slug and an installed doc's name, and BEFORE the name-prefix fallback, whose redirect for a name no installed doc carries lands on "not found". In DocPage it runs only for a :slug no book answers by slug. The one former answer that is not a "not found" and still moves is the reader at .../docs/NAME/DOC: the same doc, now at its canonical URL with its book sidebar, which the seat's pins require.

Pins, in apps/console/src/pages/docs-portal.test.tsx (a second, authored-book world switched on only by the new block; the existing tests read the implicit-book world as before):

  • name to book: /docs/showcase_manual lands on /docs/manual/showcase_index; /docs/showcase_manual/showcase_lead_guide lands on /docs/manual/showcase_lead_guide with the book sidebar marking it current; both again under /apps/com.example.showcase/docs; /docs/acme_manual (the prefix-fallback case) lands on /docs/acme-docs/acme_intro;
  • collisions keep today's answer: handbook is alpha_manual's slug and the name of the book whose slug is beta — /docs/handbook opens alpha_manual and /docs/handbook/beta_start stays put; showcase_lead_guide is both an installed doc and a book (slug leads) — /docs/showcase_lead_guide stays the doc permalink, /docs/manual/showcase_lead_guide;
  • controls, one per shape that resolves today: a book slug, SLUG/DOC with sidebar, an implicit package book, an unknown reader segment (doc in place, no sidebar), and a segment naming nothing (still "not found").

Ablations (same tool and discipline as below, HEAD c148d417b, each restored blob == HEAD, tree clean after): P1 DocsSlug's name lookup off — 3 of 19 red (the two NAME landings, the prefix-fallback case); P2 DocPage's redirect off — 2 of 19 red (both NAME/DOC pins); P3 the name lookup moved ahead of the doc permalink — 1 of 19 red (the doc-and-book collision); P4 the prefix fallback moved ahead of the name lookup — 1 of 19 red (the prefix-fallback case).

Consumers that switch on nav type (item 4)

  • NavigationRenderer (sidebar), nav:menu, UnifiedSidebar (both arms), pinned entries, active-state matching: all route through resolveHref / resolveNavItemLabel, so they draw a doc entry with this change and needed no edit of their own.
  • AppSchemaRenderer mobile tab bar: hand-rolled hrefs; now delegates doc.
  • AppPreview / AppNavCanvas (metadata-admin preview): edited as above.
  • CommandPalette: an allow-list of four in-app kinds (object, dashboard, page, report); url, component and action are absent too. Not a fall-through drop; unchanged, and no new i18n key.
  • findFirstRoute (landing): lands on object / page / dashboard / report only; component is absent too. A doc entry is not a landing. Unchanged.
  • navSurface.resolveSurface (Studio design rail): a doc entry has no design surface (docs are package markdown), so null is the right answer. Unchanged.
  • useNavPins: type-agnostic. Unchanged.

Pins and ablations

Pins: packages/types/src/__tests__/navigation-spec-parity.test.ts (new objectui#11197 blocks), nav-label-optional-9868.test.ts (the doc fixture its coverage assertion now demands), packages/layout/src/__tests__/NavigationRenderer.docEntry-11197.test.tsx, packages/app-shell/src/views/metadata-admin/previews/AppPreview.docEntry-11197.test.tsx.

Every ablation went through objectstack's scripts/ablation-replace.mjs (at 22e584c9db; anchor must hit once, blob moved, restore proven blob == HEAD and git diff HEAD empty), each leg run at HEAD 9b3e0b658 (the round before option A) with the file under test resolving to source through the vitest alias:

leg mutation red
A1 the doc arm taken out of the union 22 of 41 — every "parses on both faces" and every spec-reason refusal
A2 the spec judge silenced 10 of 41 — target-less, closed keys, boolean visible, id shape, remedy text, nested
A3 the enum admits 'bogus' 2 of 41 — the unknown-type control and the discriminator pin
A4a the enum put back as a hand list first try was a NO-OP for the pin: a list without doc makes .exclude(['doc']) throw at module load, so no test ran. Redone with a hand list that drops component: 2 of 65 red (discriminator pin, the 9868 fixture-coverage pin)
A4b doc dropped from the triaged-type tripwire 1 of 41 — the tripwire
A5 the doc branch of resolveHref deleted 8 of 10
A6 the doc label rung deleted 2 of 10
A7 doc taken out of the preview's kind set 1 of 3

After all legs: git diff HEAD 0 bytes, git status --porcelain 0 lines.

Gates (HEAD c148d417b)

  • pnpm --filter type-check: @object-ui/console 0, @object-ui/types 0, @object-ui/layout 0, @object-ui/app-shell 0, @object-ui/plugin-designer 0 — after building the console's dependency closure (turbo run build --filter=@object-ui/console^..., 34 tasks). The console program lists DocsSlug.tsx, DocPage.tsx, book-nav.ts and docs-portal.test.tsx; each package's tsconfig.test.json lists its new pin file.
  • From the repo root: vitest run packages/types/ packages/layout/ packages/plugin-designer/ apps/console/src/pages/ plus 9 console tests that mention docs, 48 nav-related app-shell test files and packages/cli/src/__tests__/validate-union-arm-selection.test.ts: 450 files, 8241 tests passed, exit 0. vitest run packages/app-shell/src/views/metadata-admin/previews/: 86 files, 1130 tests passed (previous round; untouched since).
  • check:control-bytes 0, check:new-line-citations 0 (0 new), check:spec-symbols 0, check:component-surface-parity 0 (report-only), check:changeset-claims 0 (7 pending changesets name a touched file; each paragraph re-read, none falsified), check:doc-types 0, check:docs-route-closure 0, check:vi-mock-specifiers / -inherit / -override-shape 0, check:test-path-roots 0, check-changeset-presence 0 (15 source files of 5 released packages, 1 changeset), check-changeset-no-major 0.
  • NOT MEASURED: the full app-shell suite (921 files; stopped at 12 minutes, exit 143 by my kill — declared narrowing to the 48 nav-related files, CI runs the rest); check:spec-floors and check:readme-exports (both need the whole workspace built); repo lint (CI-owned).
  • The Spec Main Shape Gate red names writeWarningToast.ts and spec-symbol-batch6.test.ts, which this diff does not touch; objectui#11206 carries it, and the seat brings main in after it lands.

Notes for review

  • The TypeScript NavigationEntryItem is one flat interface, so book / doc are declared on every entry type, as url and componentRef already are. The runtime validator is the per-type door.
  • Acceptance notes, not filed: navSurface.ts's docblock still says "nine-member" union; the spec's BookSchema.slug description says it defaults to the name "sans prefix", while the console's bookSlug defaults to the full name (under option A the redirect goes to whatever bookSlug computes, so the two stay consistent).
  • Report only, not in this PR: the mobile tab bar's hand-rolled hrefs for the other types were probed and disagree with resolveHref (record deep link, filters, runAction, metadata:*); the measured hrefs are in the dev report for the seat to file.

Generated by Claude Code

…oc` entry is judged by the spec's own arm

`NavigationItemTypeSchema` was a hand list of nine; spec 17.5.0 added `doc`,
so `objectui validate` refused the spec's own docblock example. The enum is
now read off the spec union's discriminator at module load. A `doc` entry goes
to its own arm, which hands the entry whole to the spec's `DocNavItemSchema`
and raises its issues, so it accepts nothing the spec refuses. The TS face
gains the spec-derived `book` / `doc` members.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BA3nKVUwKQJf8DBxrSVtNC
`resolveHref` had no `doc` branch, so a `doc` entry rendered as a dead `#`
link. It now uses the portal's own `/docs/:slug` and `/docs/:slug/:name`
shapes under the entry's basePath; an unlabelled entry shows the page it
opens, else the book. The mobile tab bar delegates to `resolveHref`. The
designer's `NAV_TYPE_META` drops the pin-lag `| 'doc'`, and the app preview
keys its kinds by the spec-derived `NavigationItemType`, so a `doc` entry is
drawn there instead of dropped.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BA3nKVUwKQJf8DBxrSVtNC
@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

changeset-claim-re-read

⚠️ 7 pending changeset(s) describe a file this change touches

Their bodies publish verbatim into the CHANGELOG at the next release, so this is a request to re-read them against your diff — addressed here because you are the one seat that can answer it without re-deriving anything.

⛔ Nothing here blocks, and nothing here is a verdict on your change. This gate exits 0, is not a required context, and judges name resolution, never meaning: it asked whether a pending body names a file you touched. "Is this sentence still true?" is the one question it will not answer, and the one you are being asked to answer.

.changeset/4895-retire-block-schema-family.md

  • names zod/app.zod.ts → packages/types/src/zod/app.zod.ts — edited by this change

    ⚠️ Not this family, and not touched. The live slotted record-page vocabulary — PageNodeSchema.kind === 'slotted' with slots?: PageSlotMap (packages/types/src/layout.ts), rendered by usePageAssignment / PageBlockCanvas / PageBlockInspector in @object-ui/app-shell — shares the words "block" and "slot" with the retired family and shares no declaration, type or file with it. Neither is the type: 'component' NAVIGATION item kind ({ type: 'component', componentRef }, NavigationItemSchema in zod/app.zod.ts), a different declaration in a different module.

.changeset/6349-types-internal-name-collisions-batch-2.md

  • names app.ts → packages/types/src/app.ts — edited by this change

    MenuItem — renamed to AppMenuItem in app.ts. app.ts declared a flat, all-optional interface (type?: 'item' | 'group' | 'separator', label, icon, path, href, children, badge, hidden) — the @deprecated legacy navigation item that AppComponentSchema.menu, AppAction.items and menuItemToNavigationItem read. overlay.ts declared a discriminated union, MenuCommandItem | MenuDividerItem, whose command arm requires label and whose both arms tombstone type as type?: never (objectui#6523) — precisely the key app.ts declares as a three-value enum. Re-pointing either at the other would have made an authored type: 'separator' legal on one side and a type error on the other, so the two names had to part. @object-ui/types continues to publish overlay's union as MenuItem and app's interface as AppMenuItem, exactly as before.

.changeset/7113-chart-data-model.md

  • names app.zod.ts → packages/types/src/zod/app.zod.ts — edited by this change

    .extend() with a NEW key still works and preserves the fold and the refinement; .optional(), z.discriminatedUnion, z.toJSONSchema and safeValidateSchema are all unaffected. Nothing in this repository calls the throwing combinators on either const, and the published surface already ships refined mirrors (objectql.zod.ts, complex.zod.ts, form.zod.ts, app.zod.ts), so the class is not new — but it is a real behaviour change on a published export and it belongs in the release note rather than in a reviewer's file.

.changeset/7735-zod-mirrors-stop-authoring-defaults.md

  • names app.zod.ts → packages/types/src/zod/app.zod.ts — edited by this change

    What changed. All 41 .default() call sites under packages/types/src/zod/ are removed — layout.zod.ts 22, crud.zod.ts 11, form.zod.ts 5, views.zod.ts 2, app.zod.ts 1. @object-ui/components reconciles the third face a separate finding found: flex's registration defaultProps.align seeded 'center', the value its own renderer never applies, so a designer-made node laid out differently from a hand-authored one; it now seeds 'start'.

.changeset/7918-zod-lazy-getter-identity.md

  • names app.zod.ts → packages/types/src/zod/app.zod.ts — edited by this change

    ⚠️ Also settled while locating the ten: AppMenuItemSchema has no declaration of its own — it is the barrel alias of app.zod.ts's MenuItemSchema, while the barrel's own MenuItemSchema is overlay.zod.ts's. Two different schemas, so the list really is ten entries and not nine.

.changeset/8871-page-node-refuses-breadcrumbs.md

  • names layout/src/NavigationRenderer.tsx → packages/layout/src/NavigationRenderer.tsx — edited by this change

    What was measured, on this branch's base 93127bd6f. Zero readers, with a point-access probe rather than a bare word: on that base \.breadcrumbs scores 0 tree-wide (exit 1) against \.breadcrumb\b's 12 files tree-wide (10 under packages/) as the lit control. At head the same two probes read 16 and 13 and \.breadcrumbs is exit 0 over 4 files — every hit one of this branch's own four files (this changeset, the refusal pin, layout.ts, zod/layout.zod.ts) quoting the probe string, and the pin's own exclusions put head back at exit 1. The base reading is the measurement; the head reading is this branch's echo of it. The bare word would have lied — it also names Sentry's own unrelated concept (app-shell/src/observability/sentry.ts) and appears in two comments listing UI surfaces (core/src/utils/record-title.ts, layout/src/NavigationRenderer.tsx), so a bare probe reports five readers that do not exist.

.changeset/9092-inline-locale-declared-face.md

  • names app.ts → packages/types/src/app.ts — edited by this change

    • AppComponentSchema.label (app.ts) - ObjectGridSchema.label and .description (objectql.ts) - PageNodeSchema.aria.ariaLabel (layout.ts)

Read the paragraph, not the line: both false halves of the objectui#8617 claim sat in one paragraph, and correcting either alone would have left it asserting the same wrong thing.

If a claim did go false, correct the body. That is precedented and prose-only, frontmatter untouched; check-changeset-overwrite.mjs will report the correction as its own case 2 ("correcting a declaration on purpose … legitimate"), which is the intended shape — one gate asks for the read, the other records the write.

Not covered, stated so nobody reads this as more: a born-false claim that spells no line address at all (objectui#9495 coordinated one by ORDINAL — "a grep finds that member first" — and deciding that means reading what the sentence means), a claim spelled as a symbol or a package rather than a backticked file name, and a file named ambiguously.

Compared the checked-out tree with 0389650f3 (merge-base with origin/main): 16 file(s) changed outside .changeset/, read against 1807 pending declaration(s) that publish a body (2417 pending in total). · run

@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 330 chunks) 3572.8 KB 3607.4 KB
Main entry chunk (gzip) 149.6 KB 350 KB
Entry file index-Pt6G8xy9.js —
Status PASS —

The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it.


📦 Bundle Size Report

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 16.88KB 6.25KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.11KB 3.87KB
auth (ActiveOrganizationStorage.js) 27.95KB 10.04KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.22KB 10.61KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.17KB 5.40KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.72KB 2.24KB
auth (SocialSignInButtons.js) 9.70KB 3.93KB
auth (UserMenu.js) 3.39KB 1.21KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.70KB 10.94KB
auth (createAuthenticatedFetch.js) 8.54KB 3.46KB
auth (index.js) 3.63KB 1.64KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 11.08KB 4.58KB
collaboration (CommentThread.js) 27.13KB 7.95KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 559.46KB 134.18KB
core (index.js) 9.94KB 3.94KB
create-plugin (index.js) 27.94KB 9.51KB
data-objectstack (index.js) 228.51KB 63.39KB
fields (index.js) 261.19KB 66.27KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 2.59KB 1.22KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 8.87KB 3.64KB
i18n (index.js) 5.24KB 2.27KB
i18n (pickLocalized.js) 9.86KB 3.95KB
i18n (provider.js) 39.40KB 12.91KB
i18n (translateFn.js) 0.20KB 0.18KB
i18n (useDisplayLocale.js) 3.52KB 1.76KB
i18n (useObjectLabel.js) 34.35KB 9.18KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 40.88KB 11.46KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.99KB 0.87KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 6.62KB 2.45KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useSpecGesture.js) 5.52KB 2.10KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 13.58KB 4.90KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.25KB 2.17KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 8.33KB 3.07KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 16.01KB 3.93KB
plugin-calendar (index.js) 52.17KB 15.06KB
plugin-charts (index.js) 84.09KB 22.93KB
plugin-chatbot (index.js) 198.22KB 46.97KB
plugin-dashboard (index.js) 138.73KB 37.05KB
plugin-designer (index.js) 215.78KB 44.42KB
plugin-detail (index.js) 240.43KB 63.18KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 172.30KB 44.19KB
plugin-gantt (index.js) 172.43KB 42.85KB
plugin-grid (index.js) 230.25KB 63.22KB
plugin-kanban (index.js) 48.43KB 15.11KB
plugin-list (index.js) 115.82KB 28.67KB
plugin-map (index.js) 22.90KB 7.62KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 44.04KB 12.21KB
plugin-timeline (index.js) 32.26KB 9.42KB
plugin-tree (index.js) 11.20KB 3.89KB
plugin-view (index.js) 90.43KB 22.76KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.81KB 3.58KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 119.55KB 39.23KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.50KB 2.06KB
react (schema-input.js) 4.25KB 2.04KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (body-dialect.js) 4.78KB 2.09KB
sdui-parser (codegen.js) 9.45KB 3.76KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 6.17KB 2.73KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (kanban-quick-add.js) 3.89KB 1.87KB
sdui-parser (parse.js) 25.28KB 7.80KB
sdui-parser (provenance.js) 3.84KB 1.90KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 22.61KB 7.40KB
types (ai.js) 4.39KB 2.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 4.12KB 1.61KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 3.19KB 1.62KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (expression.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 4.74KB 2.26KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 5.00KB 2.39KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 2.52KB 1.31KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (strict-authoring-face.js) 19.82KB 7.15KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.11KB 3.32KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Spec Main Shape Gate red on 9b3e0b658: not this PR's. No fix to port yet.

  • The failure. The gate compiled this head against @objectstack/spec built from objectstack 688ddef3c321. It reports four diagnostics, all in files this diff does not touch:
    • packages/app-shell/src/providers/writeWarningToast.ts:119, TS2741: computed is missing from the drop-reason wording table.
    • packages/data-objectstack/src/spec-symbol-batch6.test.ts:242, TS2344.
  • The cause. objectstack b28054654d (objectstack#20834, 2026-09-30T10:22Z) added computed to DroppedFieldsEvent['reason'].
  • The base was green. This PR's base 39e625de2 and the later main heads passed the same gate at 2026-09-30T10:51Z, against an earlier objectstack main. So the red follows the upstream move, not this diff.
  • Carrier. objectui#11206 (p0, stop-the-bleed, claimed). No fix PR is open yet, so nothing can be ported here. A re-run would compile against the same objectstack main and fail the same way, so none is spent.
  • Next. When objectui#11206 lands, the seat brings main into this branch with a merge commit (no rebase) and re-reads the gate. Meanwhile the PR stays draft, with a patch round (the card's seat answer 5910896132) in progress.

domain:ui seat #1 · session_01BA3nKVUwKQJf8DBxrSVtNC · 2026-09-30T12:04Z


Generated by Claude Code

…its slug URL

A `{ type: 'doc', book }` nav entry names its book by name; the portal
addressed books by slug only, so a book with an authored slug answered
"Documentation not found" and `/docs/NAME/DOC` lost the book sidebar. A
segment that is a book's name (and no book's slug) now redirects, replace, to
`base/bookSlug(book)[/DOC]`. It is looked up after a book slug and an installed
doc's name, so every URL that resolves today keeps its answer; the pins hold
the collisions and a control per resolving shape.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BA3nKVUwKQJf8DBxrSVtNC
…n guide and the changeset

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BA3nKVUwKQJf8DBxrSVtNC
@github-actions github-actions Bot added the apps label Sep 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 330 chunks) 3572.8 KB 3607.4 KB
Main entry chunk (gzip) 149.5 KB 350 KB
Entry file index-Dx_cTd6t.js —
Status PASS —

The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it.


📦 Bundle Size Report

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 16.88KB 6.25KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.11KB 3.87KB
auth (ActiveOrganizationStorage.js) 27.95KB 10.04KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.22KB 10.61KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.17KB 5.40KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.72KB 2.24KB
auth (SocialSignInButtons.js) 9.70KB 3.93KB
auth (UserMenu.js) 3.39KB 1.21KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.70KB 10.94KB
auth (createAuthenticatedFetch.js) 8.54KB 3.46KB
auth (index.js) 3.63KB 1.64KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 11.08KB 4.58KB
collaboration (CommentThread.js) 27.13KB 7.95KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 559.46KB 134.18KB
core (index.js) 9.94KB 3.94KB
create-plugin (index.js) 27.94KB 9.51KB
data-objectstack (index.js) 228.51KB 63.39KB
fields (index.js) 261.19KB 66.27KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 2.59KB 1.22KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 8.87KB 3.64KB
i18n (index.js) 5.24KB 2.27KB
i18n (pickLocalized.js) 9.86KB 3.95KB
i18n (provider.js) 39.40KB 12.91KB
i18n (translateFn.js) 0.20KB 0.18KB
i18n (useDisplayLocale.js) 3.52KB 1.76KB
i18n (useObjectLabel.js) 34.35KB 9.18KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 40.88KB 11.46KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.99KB 0.87KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 6.62KB 2.45KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useSpecGesture.js) 5.52KB 2.10KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 13.58KB 4.90KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.25KB 2.17KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 8.33KB 3.07KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 16.01KB 3.93KB
plugin-calendar (index.js) 52.17KB 15.06KB
plugin-charts (index.js) 84.09KB 22.93KB
plugin-chatbot (index.js) 198.22KB 46.97KB
plugin-dashboard (index.js) 138.73KB 37.05KB
plugin-designer (index.js) 215.78KB 44.42KB
plugin-detail (index.js) 240.43KB 63.18KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 172.30KB 44.19KB
plugin-gantt (index.js) 172.43KB 42.85KB
plugin-grid (index.js) 230.25KB 63.22KB
plugin-kanban (index.js) 48.43KB 15.11KB
plugin-list (index.js) 115.82KB 28.67KB
plugin-map (index.js) 22.90KB 7.62KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 44.04KB 12.21KB
plugin-timeline (index.js) 32.26KB 9.42KB
plugin-tree (index.js) 11.20KB 3.89KB
plugin-view (index.js) 90.43KB 22.76KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.81KB 3.58KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 119.55KB 39.23KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.50KB 2.06KB
react (schema-input.js) 4.25KB 2.04KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (body-dialect.js) 4.78KB 2.09KB
sdui-parser (codegen.js) 9.45KB 3.76KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 6.17KB 2.73KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (kanban-quick-add.js) 3.89KB 1.87KB
sdui-parser (parse.js) 25.28KB 7.80KB
sdui-parser (provenance.js) 3.84KB 1.90KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 22.61KB 7.40KB
types (ai.js) 4.39KB 2.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 4.12KB 1.61KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 3.19KB 1.62KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (expression.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 4.74KB 2.26KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 5.00KB 2.39KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 2.52KB 1.31KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (strict-authoring-face.js) 19.82KB 7.15KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.11KB 3.32KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

os-bill commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: c148d417b4292685677c34a4c52649b86777bd2c
Local-runs: none

Inputs: card #11197 (body and all 5 comments: claim 5909616123, triage 5909788805, dev report r1 5910759941, seat answer 5910896132, dev report r2 5911338790); PR #11207 body, its 17 files and the net diff against main 846cec0ef (merge-base 39e625de2, 5 commits, +926 / -79); the 43 check-runs on the head. Nothing built, run or re-run.

① Derived judgments

Accept-set — @object-ui/types, what objectui validate answers

  1. NavigationItemTypeSchema is read off the discriminator of the spec's nav-item union (the AppSchema.navigation walk the separator read already took, now shared and memoised) and gains doc; the read throws at module load when an arm carries no string literal. RIGHT — the card's direction ("derive from the spec's discriminator, not a hand list"); the 9868 fixture pin and the new parity pin demand a member-for-member match; Test (dist pins) is green on the head.
  2. The doc arm is a looseObject of the flat object's OWN schemas for the ten base keys the spec's doc arm spreads (id, label, icon, order, badge, badgeVariant, visible, requiredPermissions, requiresObject, requiresService — read at HEAD: none carries a .default or .transform, so the judge sees the author's values), the type literal, and the spec arm's own book / doc; its superRefine hands the parsed entry whole to DocNavItemSchema when the base parse is clean and re-raises each issue; unknown keys pass through to that strict judge. RIGHT — nothing the spec's arm refuses survives a successful parse (12-row refusal pin, identical code @ path on both faces; A1 / A2 ablations). It is narrower than the spec in two places, both the flat schema's pre-existing posture applied uniformly: an empty label refused (stated and pinned) and a locale-map label refused (label is z.string on every arm). Narrower, not wider — not a Clause-② yes.
  3. Routing: z.discriminatedUnion('type', [flat arm with type = enum.exclude(['doc']), doc arm]) under the same lazy export (unwrap() stays reference-stable: NavigationItemArms is a module const). A doc child of a group is judged by the same arm (pinned, custom @ children.0). RIGHT.
  4. An unknown type is refused with invalid_union @ type (was invalid_value), the code the spec's union answers with; a MISSING type moves the same way (was invalid_type); the "expected one of" message is kept. RIGHT and declared in the changeset — which spells only the unknown-type case; the missing-type case is the same family and does not falsify the paragraph.
  5. Non-doc arms still strip an unknown book / doc key as they strip any unknown key. Unchanged, pre-existing, declared in the dev report. RIGHT.

Public surface

  1. NavigationEntryItem (TS face) gains book? and doc?, derived from the spec's DocNavItem, on the flat interface for every type — as url and componentRef already are. RIGHT — additive; the Zod arm is the per-type door.
  2. @object-ui/layout: resolveHref gains the doc branch — basePath/docs/BOOK, basePath/docs/DOC, basePath/docs/BOOK/DOC, each segment encodeURIComponent-ed, # for a target-less entry (which the validator refuses). RIGHT — the portal's own two route shapes, no URL grammar invented; basePath is /apps/PACKAGE_ID in an app (the tree AppHeader's "This app's docs" already opens) and '' on home. resolveNavItemLabel gains the machine-name rung doc else book. RIGHT — the 9868 ruling names inheritance for three targets only. AppSchemaRenderer's mobile tab bar: an else if (item.type === 'doc') on the top-level type chain (read at HEAD), delegating to resolveHref. RIGHT — the other branches' hand-rolled hrefs are finding 2, probed and reported, not fixed here per the seat's ⛔.
  3. Gating: the base keys through the existing passesNavItemGuards; no client-side audience enum. RIGHT — ADR-0046 §6.7, the claim's and triage's condition; pinned with an ungated control.
  4. @object-ui/console (option A): bookNamedBy(segment, books) answers null when the segment is ANY book's slug. DocsSlug precedence read at HEAD: a book slug → BookPage; an installed doc's name → the permalink redirect (byte-for-byte the former redirect); a book NAME → Navigate replace to base/bookSlug(book); the name-prefix fallback (unchanged); the not-found notice. Against the base's single if (hb && slug) branch, only a NAME segment that is not an installed doc changes hands, and its former answer was a redirect onto DocPage's missing notice or the not-found notice itself. DocPage: namedBook is consulted only when no book answers :slug by slug; Navigate replace to base/bookSlug(book)/NAME; every hook precedes the early return. RIGHT — 5 name pins, 3 collision pins, 5 controls, P1–P4 ablations. The one pre-resolving shape whose presentation moves (NAME/DOC, doc in place without a sidebar → the canonical SLUG/DOC with the sidebar) is answered in ③.
  5. @object-ui/app-shell preview: NAV_KIND_SET is a Record keyed by the spec-derived NavigationItemType (a spec addition stops the compile), a doc entry draws with its target, its resolveHref route and its own tone, and is never the landing (matches the runtime's findFirstRoute). RIGHT. @object-ui/plugin-designer: | 'doc' dropped from NAV_TYPE_META, which is module-private (not exported — verified). RIGHT — exactly what its own comment asked at this pin.
  6. File surface: all 17 files sit inside the claim's amended surface (5910896132); book-nav.ts gains only the name lookup, AppSchemaRenderer.tsx only the doc delegation; the fenced files (StudioDesignSurface.tsx, registry-inputs-spec-parity.test.ts, the CLI validate.ts) are untouched. RIGHT.
  7. Docs: content/docs/guide/designing-app-navigation.md teaches the entry, the doc-name shape, and "name the book by its name, even when it declares a slug" — which is what the portal now honours. RIGHT; every doc gate is green.

Gates — the 43 check-runs on c148d417b: 40 success, 3 skipped (Test (coverage), the coverage shard, dependabot), 1 failure. The failure is Spec Main Shape Gate (run 109879987184): its 14 annotations name packages/app-shell/src/providers/writeWarningToast.ts:119 (TS2741 — computed missing from the drop-reason Record) and packages/data-objectstack/src/spec-symbol-batch6.test.ts:242 (TS2344), compiled against @objectstack/spec built from objectstack c90f9fb6e218; the app-shell build and apps/console type-check exits are the closure of that one app-shell error. Neither file is in this diff. Judged as an external red: objectui#11206 carries it per the seat (5910896132), and the PR's own Type Check, Test shards 1–8, Test (dist pins), Build & E2E (23 passed) and every changeset / doc / scan gate are green. Lint is success; its 11 warnings are all in e2e/live/*, outside the diff.

② Semver level

Changeset .changeset/11197-doc-nav-entry.md: minor for @object-ui/types, @object-ui/layout, @object-ui/app-shell, @object-ui/plugin-designer, @object-ui/console. What the diff publishes: a new accepted value (doc) on the validator and on the enum's .options; two new optional TS members; a new resolveHref branch and label rung; a portal resolution that turns only former not-found answers into landings; a refusal-code change at type (declared). Nothing is removed and no exported signature narrows (NAV_TYPE_META is module-private). minor is right. plugin-designer's change is type-only and would take patch alone, but the fixed group bumps together, so minor is not wrong. Changeset Bump Policy, Changeset Fixed Group Check, Changeset Declaration, Changeset Claim Re-read, Changeset Overwrite Report: all green.

Clause-②: no — right. The claim's condition ("if the mirror would accept anything the spec's DocNavItemSchema refuses, that is yes") holds by construction: the spec arm is the judge, run on the author's own values whenever the base parse is clean, and an unclean base parse is itself a refusal. Pinned by the 12-row table and the A2 ablation; the divergences that remain are narrower (empty label, plain-string label), never wider.

③ Boundary flags

Dev flags from round 1 (5910759941) and round 2 (5911338790), read against the seat's ruling (5910896132):

  • open_questions r1 — a { book } entry naming a book whose authored slug differs from its name (A / B / C): ANSWERED by the seat, A; implemented in apps/console with the five steps met (helper in book-nav.ts, the 13 pins, the docblock and guide text, PR line 1 Fixes #11197, the finding-2 probe run and not fixed). open_questions r2: none.
  • The seat's invariant "no URL that resolves today changes its answer" against NAME/DOC now redirecting: ANSWERED — the seat's own step-2 pin requires "{ book, doc } redirects to …/docs/manual/DOC with the book sidebar"; the answer is the same doc at its one canonical URL (ADR-0046 §6), and the collision pins and controls hold every other shape. Right.
  • DocsSlug's first redirect now requires an installed doc's name, the prefix fallback moved below the name lookup: ANSWERED — read at HEAD, behaviour-preserving for every segment that is not a book name (P4 ablation).
  • invalid_union at type (was invalid_value): ANSWERED — declared; a missing type moves with it (was invalid_type), the same family.
  • TS NavigationEntryItem stays one flat interface, so book / doc are declared on every type: ANSWERED — the pre-existing posture (url, componentRef); the Zod arm is the door.
  • plugin-designer minor for a type-only change: ANSWERED — fixed group; gates green.
  • File surface beyond the original claim: ANSWERED — the seat amended the claim; every file is inside it.
  • The full app-shell suite narrowed locally: ANSWERED — CI Test shards 1–8 are green on the head.
  • bookNamedBy exported from the console app: ANSWERED — app source, not a library export surface.
  • Status ready_for_review (not one of the template's four values): procedural, no contract bearing.
  • Acceptance notes, not filed per the seat: navSurface.ts's "nine-member" prose; BookSchema.slug's describe ("defaults to name sans prefix") against the console's bookSlug (slug ?? name) — under option A the redirect follows bookSlug, so the two stay consistent. Accepted as notes.
  • ESCALATED to the seat, outside this PR's verdict: finding 2 — MobileBottomNav's hand-rolled hrefs disagree with resolveHref for recordId, filters, runAction and a metadata:* component — now carries a measured reach: (round 2, four hrefs at c148d417b); the seat's ruling says a measured reach gets filed, so that card is owed. And the Spec Main Shape Gate red is Spec Main Shape Gate red: objectstack b2805465 adds computed to DroppedFieldsEvent['reason'], and writeWarningToast's wording table plus the batch-6 spec-symbol pin do not compile against objectstack main #11206's; the PR is behind main, and the seat brings main in once Spec Main Shape Gate red: objectstack b2805465 adds computed to DroppedFieldsEvent['reason'], and writeWarningToast's wording table plus the batch-6 spec-symbol pin do not compile against objectstack main #11206 lands.

Implemented-by: claude/issue-11197-doc-nav-entry
Reviewed-by: session_01BA3nKVUwKQJf8DBxrSVtNC

VERDICT: PASS


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: c148d417b4292685677c34a4c52649b86777bd2c
Local-runs: none

Inputs: card #11197 (body and all 5 comments: claim 5909616123, triage 5909788805, dev report r1 5910759941, seat answer 5910896132, dev report r2 5911338790); PR #11207 body, its 17 files and the net diff against main 846cec0ef (merge-base 39e625de2, 5 commits, +926 / -79); the 43 check-runs on the head. Nothing built, run or re-run.

① Derived judgments

Accept-set — @object-ui/types, what objectui validate answers

  1. NavigationItemTypeSchema is read off the discriminator of the spec's nav-item union (the AppSchema.navigation walk the separator read already took, now shared and memoised) and gains doc; the read throws at module load when an arm carries no string literal. RIGHT — the card's direction ("derive from the spec's discriminator, not a hand list"); the 9868 fixture pin and the new parity pin demand a member-for-member match; Test (dist pins) is green on the head.
  2. The doc arm is a looseObject of the flat object's OWN schemas for the ten base keys the spec's doc arm spreads (id, label, icon, order, badge, badgeVariant, visible, requiredPermissions, requiresObject, requiresService — read at HEAD: none carries a .default or .transform, so the judge sees the author's values), the type literal, and the spec arm's own book / doc; its superRefine hands the parsed entry whole to DocNavItemSchema when the base parse is clean and re-raises each issue; unknown keys pass through to that strict judge. RIGHT — nothing the spec's arm refuses survives a successful parse (12-row refusal pin, identical code @ path on both faces; A1 / A2 ablations). It is narrower than the spec in two places, both the flat schema's pre-existing posture applied uniformly: an empty label refused (stated and pinned) and a locale-map label refused (label is z.string on every arm). Narrower, not wider — not a Clause-② yes.
  3. Routing: z.discriminatedUnion('type', [flat arm with type = enum.exclude(['doc']), doc arm]) under the same lazy export (unwrap() stays reference-stable: NavigationItemArms is a module const). A doc child of a group is judged by the same arm (pinned, custom @ children.0). RIGHT.
  4. An unknown type is refused with invalid_union @ type (was invalid_value), the code the spec's union answers with; a MISSING type moves the same way (was invalid_type); the "expected one of" message is kept. RIGHT and declared in the changeset — which spells only the unknown-type case; the missing-type case is the same family and does not falsify the paragraph.
  5. Non-doc arms still strip an unknown book / doc key as they strip any unknown key. Unchanged, pre-existing, declared in the dev report. RIGHT.

Public surface

  1. NavigationEntryItem (TS face) gains book? and doc?, derived from the spec's DocNavItem, on the flat interface for every type — as url and componentRef already are. RIGHT — additive; the Zod arm is the per-type door.
  2. @object-ui/layout: resolveHref gains the doc branch — basePath/docs/BOOK, basePath/docs/DOC, basePath/docs/BOOK/DOC, each segment encodeURIComponent-ed, # for a target-less entry (which the validator refuses). RIGHT — the portal's own two route shapes, no URL grammar invented; basePath is /apps/PACKAGE_ID in an app (the tree AppHeader's "This app's docs" already opens) and '' on home. resolveNavItemLabel gains the machine-name rung doc else book. RIGHT — the 9868 ruling names inheritance for three targets only. AppSchemaRenderer's mobile tab bar: an else if (item.type === 'doc') on the top-level type chain (read at HEAD), delegating to resolveHref. RIGHT — the other branches' hand-rolled hrefs are finding 2, probed and reported, not fixed here per the seat's ⛔.
  3. Gating: the base keys through the existing passesNavItemGuards; no client-side audience enum. RIGHT — ADR-0046 §6.7, the claim's and triage's condition; pinned with an ungated control.
  4. @object-ui/console (option A): bookNamedBy(segment, books) answers null when the segment is ANY book's slug. DocsSlug precedence read at HEAD: a book slug → BookPage; an installed doc's name → the permalink redirect (byte-for-byte the former redirect); a book NAME → Navigate replace to base/bookSlug(book); the name-prefix fallback (unchanged); the not-found notice. Against the base's single if (hb && slug) branch, only a NAME segment that is not an installed doc changes hands, and its former answer was a redirect onto DocPage's missing notice or the not-found notice itself. DocPage: namedBook is consulted only when no book answers :slug by slug; Navigate replace to base/bookSlug(book)/NAME; every hook precedes the early return. RIGHT — 5 name pins, 3 collision pins, 5 controls, P1–P4 ablations. The one pre-resolving shape whose presentation moves (NAME/DOC, doc in place without a sidebar → the canonical SLUG/DOC with the sidebar) is answered in ③.
  5. @object-ui/app-shell preview: NAV_KIND_SET is a Record keyed by the spec-derived NavigationItemType (a spec addition stops the compile), a doc entry draws with its target, its resolveHref route and its own tone, and is never the landing (matches the runtime's findFirstRoute). RIGHT. @object-ui/plugin-designer: | 'doc' dropped from NAV_TYPE_META, which is module-private (not exported — verified). RIGHT — exactly what its own comment asked at this pin.
  6. File surface: all 17 files sit inside the claim's amended surface (5910896132); book-nav.ts gains only the name lookup, AppSchemaRenderer.tsx only the doc delegation; the fenced files (StudioDesignSurface.tsx, registry-inputs-spec-parity.test.ts, the CLI validate.ts) are untouched. RIGHT.
  7. Docs: content/docs/guide/designing-app-navigation.md teaches the entry, the doc-name shape, and "name the book by its name, even when it declares a slug" — which is what the portal now honours. RIGHT; every doc gate is green.

Gates — the 43 check-runs on c148d417b: 40 success, 3 skipped (Test (coverage), the coverage shard, dependabot), 1 failure. The failure is Spec Main Shape Gate (run 109879987184): its 14 annotations name packages/app-shell/src/providers/writeWarningToast.ts:119 (TS2741 — computed missing from the drop-reason Record) and packages/data-objectstack/src/spec-symbol-batch6.test.ts:242 (TS2344), compiled against @objectstack/spec built from objectstack c90f9fb6e218; the app-shell build and apps/console type-check exits are the closure of that one app-shell error. Neither file is in this diff. Judged as an external red: objectui#11206 carries it per the seat (5910896132), and the PR's own Type Check, Test shards 1–8, Test (dist pins), Build & E2E (23 passed) and every changeset / doc / scan gate are green. Lint is success; its 11 warnings are all in e2e/live/*, outside the diff.

② Semver level

Changeset .changeset/11197-doc-nav-entry.md: minor for @object-ui/types, @object-ui/layout, @object-ui/app-shell, @object-ui/plugin-designer, @object-ui/console. What the diff publishes: a new accepted value (doc) on the validator and on the enum's .options; two new optional TS members; a new resolveHref branch and label rung; a portal resolution that turns only former not-found answers into landings; a refusal-code change at type (declared). Nothing is removed and no exported signature narrows (NAV_TYPE_META is module-private). minor is right. plugin-designer's change is type-only and would take patch alone, but the fixed group bumps together, so minor is not wrong. Changeset Bump Policy, Changeset Fixed Group Check, Changeset Declaration, Changeset Claim Re-read, Changeset Overwrite Report: all green.

Clause-②: no — right. The claim's condition ("if the mirror would accept anything the spec's DocNavItemSchema refuses, that is yes") holds by construction: the spec arm is the judge, run on the author's own values whenever the base parse is clean, and an unclean base parse is itself a refusal. Pinned by the 12-row table and the A2 ablation; the divergences that remain are narrower (empty label, plain-string label), never wider.

③ Boundary flags

Dev flags from round 1 (5910759941) and round 2 (5911338790), read against the seat's ruling (5910896132):

  • open_questions r1 — a { book } entry naming a book whose authored slug differs from its name (A / B / C): ANSWERED by the seat, A; implemented in apps/console with the five steps met (helper in book-nav.ts, the 13 pins, the docblock and guide text, PR line 1 Fixes #11197, the finding-2 probe run and not fixed). open_questions r2: none.
  • The seat's invariant "no URL that resolves today changes its answer" against NAME/DOC now redirecting: ANSWERED — the seat's own step-2 pin requires "{ book, doc } redirects to …/docs/manual/DOC with the book sidebar"; the answer is the same doc at its one canonical URL (ADR-0046 §6), and the collision pins and controls hold every other shape. Right.
  • DocsSlug's first redirect now requires an installed doc's name, the prefix fallback moved below the name lookup: ANSWERED — read at HEAD, behaviour-preserving for every segment that is not a book name (P4 ablation).
  • invalid_union at type (was invalid_value): ANSWERED — declared; a missing type moves with it (was invalid_type), the same family.
  • TS NavigationEntryItem stays one flat interface, so book / doc are declared on every type: ANSWERED — the pre-existing posture (url, componentRef); the Zod arm is the door.
  • plugin-designer minor for a type-only change: ANSWERED — fixed group; gates green.
  • File surface beyond the original claim: ANSWERED — the seat amended the claim; every file is inside it.
  • The full app-shell suite narrowed locally: ANSWERED — CI Test shards 1–8 are green on the head.
  • bookNamedBy exported from the console app: ANSWERED — app source, not a library export surface.
  • Status ready_for_review (not one of the template's four values): procedural, no contract bearing.
  • Acceptance notes, not filed per the seat: navSurface.ts's "nine-member" prose; BookSchema.slug's describe ("defaults to name sans prefix") against the console's bookSlug (slug ?? name) — under option A the redirect follows bookSlug, so the two stay consistent. Accepted as notes.
  • ESCALATED to the seat, outside this PR's verdict: finding 2 — MobileBottomNav's hand-rolled hrefs disagree with resolveHref for recordId, filters, runAction and a metadata:* component — now carries a measured reach: (round 2, four hrefs at c148d417b); the seat's ruling says a measured reach gets filed, so that card is owed. And the Spec Main Shape Gate red is Spec Main Shape Gate red: objectstack b2805465 adds computed to DroppedFieldsEvent['reason'], and writeWarningToast's wording table plus the batch-6 spec-symbol pin do not compile against objectstack main #11206's; the PR is behind main, and the seat brings main in once Spec Main Shape Gate red: objectstack b2805465 adds computed to DroppedFieldsEvent['reason'], and writeWarningToast's wording table plus the batch-6 spec-symbol pin do not compile against objectstack main #11206 lands.

Implemented-by: claude/issue-11197-doc-nav-entry
Reviewed-by: session_01BA3nKVUwKQJf8DBxrSVtNC

VERDICT: PASS


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Update to 5910934899: the Spec Main Shape Gate fix now exists as PR objectui#11210. Not ported here, on purpose.

  • PR objectui#11210 (objectui#11206, p0) is green on its head 02282232a5, Spec Main Shape Gate included, and clean.
  • It is not ported into this PR. It spans 15 files: writeWarningToast.ts and its test, the batch-6 pin, ten locale files and its own changeset. All of them sit under objectui#11206's in-flight claim. A port would double-edit another seat's claimed files and publish its changeset twice, and the two PRs would then conflict. The fleet's same-file serialization rule forbids that.
  • When objectui#11210 merges, the seat merges main into this branch (a merge commit, no rebase) and re-reads the gate. This PR stays draft until then.

Contract review: PASS on c148d417b (records 5911543671 and 5911555630). They are one review posted twice: the relay was slow, so the direct fallback wrote a copy before the relay's own write landed. Both name the same head; the newest governs.

domain:ui seat #1 · session_01BA3nKVUwKQJf8DBxrSVtNC · 2026-09-30T12:46Z


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Regen-provenance: 5911555630 · c148d417b4292685677c34a4c52649b86777bd2c → 2e431de31748b6f290e3a51bf74ad9cea93e2ef2 · comm -23 <(git diff --name-only c148d417b 2e431de31 | sort) <(git diff --name-only 39e625de2 0389650f3 | sort) → (empty)

This is a base merge only.

  • 2e431de31's parents are c148d417b (the reviewed head) and 0389650f3 (objectui main, which carries PR objectui#11210, the Spec Main Shape Gate fix).
  • It moved 72 paths, all of them paths main brought since the merge base 39e625de2; the command above prints nothing.
  • The diff over the PR's own 17 paths is 0 bytes.
  • No path carries merge=os-regen.

So the contract-review record 5911555630 (PASS on c148d417b) carries to this head. The seat verified this itself at 2026-09-30T13:23Z.

domain:ui seat #1 · session_01BA3nKVUwKQJf8DBxrSVtNC · 2026-09-30T13:24Z


Generated by Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 330 chunks) 3575.3 KB 3607.4 KB
Main entry chunk (gzip) 149.8 KB 350 KB
Entry file index-DraHj60z.js —
Status PASS —

The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it.


📦 Bundle Size Report

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 16.88KB 6.25KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.11KB 3.87KB
auth (ActiveOrganizationStorage.js) 27.95KB 10.04KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.22KB 10.61KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.17KB 5.40KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.72KB 2.24KB
auth (SocialSignInButtons.js) 9.70KB 3.93KB
auth (UserMenu.js) 3.39KB 1.21KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.70KB 10.94KB
auth (createAuthenticatedFetch.js) 8.54KB 3.46KB
auth (index.js) 3.63KB 1.64KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 11.08KB 4.58KB
collaboration (CommentThread.js) 27.13KB 7.95KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 568.99KB 136.03KB
core (index.js) 9.94KB 3.94KB
create-plugin (index.js) 27.94KB 9.51KB
data-objectstack (index.js) 228.51KB 63.39KB
fields (index.js) 261.19KB 66.27KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 2.59KB 1.22KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 8.87KB 3.64KB
i18n (index.js) 5.24KB 2.27KB
i18n (pickLocalized.js) 9.86KB 3.95KB
i18n (provider.js) 39.40KB 12.91KB
i18n (translateFn.js) 0.20KB 0.18KB
i18n (useDisplayLocale.js) 3.52KB 1.76KB
i18n (useObjectLabel.js) 34.35KB 9.18KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 40.88KB 11.46KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.99KB 0.87KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 6.62KB 2.45KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useSpecGesture.js) 5.52KB 2.10KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 13.58KB 4.90KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.25KB 2.17KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 8.33KB 3.07KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 16.01KB 3.93KB
plugin-calendar (index.js) 52.17KB 15.06KB
plugin-charts (index.js) 84.09KB 22.93KB
plugin-chatbot (index.js) 198.22KB 46.97KB
plugin-dashboard (index.js) 138.73KB 37.05KB
plugin-designer (index.js) 215.78KB 44.42KB
plugin-detail (index.js) 240.43KB 63.18KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 172.30KB 44.19KB
plugin-gantt (index.js) 172.43KB 42.85KB
plugin-grid (index.js) 230.72KB 63.37KB
plugin-kanban (index.js) 48.44KB 15.11KB
plugin-list (index.js) 116.28KB 28.88KB
plugin-map (index.js) 22.90KB 7.62KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 44.04KB 12.21KB
plugin-timeline (index.js) 32.26KB 9.42KB
plugin-tree (index.js) 11.20KB 3.89KB
plugin-view (index.js) 90.43KB 22.76KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.81KB 3.58KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 119.55KB 39.23KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.50KB 2.06KB
react (schema-input.js) 4.25KB 2.04KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (body-dialect.js) 4.78KB 2.09KB
sdui-parser (codegen.js) 9.45KB 3.76KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 6.17KB 2.73KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (kanban-quick-add.js) 3.89KB 1.87KB
sdui-parser (parse.js) 25.28KB 7.80KB
sdui-parser (provenance.js) 3.84KB 1.90KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 22.61KB 7.40KB
types (ai.js) 4.39KB 2.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 4.12KB 1.61KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 3.19KB 1.62KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (expression.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 4.74KB 2.26KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 5.00KB 2.39KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 2.52KB 1.31KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (strict-authoring-face.js) 19.82KB 7.15KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.11KB 3.32KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review September 30, 2026 13:41
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Sep 30, 2026
Merged via the queue into main with commit e6bc087 Sep 30, 2026
45 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-11197-doc-nav-entry branch September 30, 2026 13:57
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Oct 7, 2026
…-less, never with the target's machine name (objectui#11201, stage 1) (objectstack-ai#11225)

Part of objectstack-ai#11201
Clause-②: no

Stage 1 of ruling B on objectui#11201 (triage record `5910404448`,
execution note `5910537969`). The card stays open: stage 2 is routed by
triage on the census below. This PR does not touch the renderer's
`isCustomized` guard in `resolveNavItemLabel`, and it does not touch
`/meta`'s `translateApp` or the inline locale map.

## What changes

Ruling B keeps one rule, the spec's: a present `label` renders verbatim,
and an absent one inherits its target's current label at render time,
which is the text that localises. Step 1 asks every objectui producer to
write a standard entry with no label, never the target's machine name.
On `main`, the console's navigation sync already did (objectui#9868).
Three other producers did not. They wrote the target's own text, which
is its machine name for a draft or unlabelled object:

| Producer (symbol, file) | Wrote before this PR | Writes now |
|---|---|---|
| Console navigation sync: `NavigationSyncEffect` calling
`syncPageCreated` / `syncDashboardCreated` (`newPageNavigationItem` /
`newDashboardNavigationItem`,
`packages/app-shell/src/hooks/useNavigationSync.ts`) | no label since
objectui#9868 (PR objectstack-ai#11186, `a8198de22`). From the hook's first commit
(`7c788f5de`, 2026-02-23) until then: `label: label \|\| pageName` /
`label \|\| dashboardName` | unchanged. New pin: the stored entry
renders its target's localized label under en and zh-CN |
| Public `syncPageCreated` / `syncDashboardCreated` / `…AllApps` with an
explicit label | the author label verbatim. No in-tree caller passes one
(the effect above is the only caller) | unchanged |
| Studio Create app with "add objects": `buildAppSkeleton`
(`studio-design/skeletons.ts`) fed by `loadPackageObjects`
(`StudioDesignSurface.tsx`) | `label` = the object's label, or its
machine name for a draft object (`d.name`) or an unlabelled one
(`o.label ?? o.name`) | no `label` key. The seed is names only |
| Studio nav-item panel, binding an object to a placeholder entry:
`StudioNavItemInspector` (`StudioDesignSurface.tsx`) | replaced the
placeholder with the object's label (`o.label ?? o.name`, so the machine
name for a draft or unlabelled object) | removes the placeholder `label`
key. A typed label and a locale map are kept as authored |
| App wizard: `generateNavFromObjects`
(`plugin-designer/src/AppCreationWizard.tsx`), fed by `CreateAppPage` /
`EditAppPage` with `label: obj.label \|\| obj.name` | `label:
pluralLabel \|\| label`, so the machine name for an unlabelled object |
a `label` only for a declared plural label that differs from the
object's label and from its machine name (trimmed, case-insensitive):
inheritance cannot produce a plural. Otherwise no `label` key |
| Navigation Designer quick add (`newNavItem`), Studio canvas "Add nav
item" (`AppNavCanvas`) with `AppNavInspector`'s target picker | a
placeholder (`New TYPE` / `New item`), never the target's name |
untouched: not a machine-name producer, and objectui#11196 / PR objectstack-ai#11207
hold these files |
| `DashboardDesignPage`'s `label: dashboardName ?? ''` (named in the
dispatch as a lead) | not a nav entry: it is the dashboard document's
own seed, on a not-found branch that returns before anything is saved |
n/a |

Display: the sidebar renders each new label-less entry with the text the
old stored copy showed, and additionally in the viewer's language and
after a rename. Pinned under en and zh-CN below.

## Serial constraint: land after objectui#11196

objectui#11196 (this seat, branch pushed, no PR yet) makes the designer
surfaces draw a label-less entry through the runtime's rule: the app
preview, the Studio nav canvas and inspector, the Studio Interfaces
rail, the Navigation Designer and the app wizard's Navigation step.
Until it lands, such an entry shows as `Item N` on the Studio nav canvas
and as a blank row in the wizard's Navigation step. This PR makes Create
app, the bind and the wizard write such entries. Both branches edit
`StudioDesignSurface.tsx`, in different hunks: objectui#11196 edits the
rail's `NavTree`, this PR edits `loadPackageObjects` and
`StudioNavItemInspector`. `git merge-tree --write-tree` reports no
conflict against objectui#11196's head `2a6f0c5fb` or against `main`
`e6bc087a3`. No write site sits inside objectui#11196's hunks.

## Pins

- `useNavigationSync.standardEntryLocalizes-11201.test.tsx`: the real
`NavigationSyncEffect` stores a new dashboard's entry with no `label`
key. That stored entry is then rendered by `NavigationRenderer`, wired
as `UnifiedSidebar` wires it (the `useObjectLabel` resolvers plus
`useNavTargetLabel`), under a real `I18nProvider` carrying a zh-CN
bundle loaded the console's way. It shows `Pipeline Health` under en and
`管道健康` under zh-CN.
- `StudioDesignSurface.standardNavEntries-11201.test.tsx`: seeded
entries carry no `label`, the app parses through the spec's `AppSchema`,
and the stored entries render `Account` under en, `客户` under zh-CN, and
`draft_thing` for the unlabelled object. Binding an object to a `New
item` placeholder leaves no own `label` key, and the entry parses
through `NavigationItemSchema`. Controls: a typed label is kept (a
locale map is already pinned by the objectui#11148 test).
- `AppWizard.standardNavEntries-11201.test.tsx`: drives the real
`CreateAppPage`. The unlabelled, singular-labelled and
plural-equals-name objects' entries carry no `label`. Control: a
distinct declared plural (`Accounts`) is written.
- `createConformance.test.ts`: the nav-seeded skeleton case now passes
name-only seeds.

## Ablation (one-shot, from committed `384d81e73`, through
`ablation-replace.mjs`: anchor hit, blob changed, restored to HEAD with
`git diff HEAD` empty)

| Leg | Mutation | Result |
|---|---|---|
| A | sync: `newDashboardNavigationItem` writes `label: label \|\|
dashboardName` again | 3 red, 2 green: stored-label pin red, en render
red (shows `pipeline_health`), the objectui#9868 stored pin red. zh-CN
stays green, because the guard translates a machine-name label, which is
why the guard stays in stage 1 |
| B | scaffold: `buildAppSkeleton` writes `label: o.name` | 2 red, 6
green: seeded-label pin red, en render red. zh-CN green (the guard
again) |
| C | wizard: `const label = o.pluralLabel \|\| o.label` restored | 3
red, 1 green: the three label-less cases red, the plural control green |
| D | bind: the placeholder removal deleted | 2 red: both
placeholder-bind cases |

## Verification

All on `384d81e73`, the head of this branch, from the worktree root:

| Gate | Result |
|---|---|
| closure build, `turbo run build` for the dependencies of
`@object-ui/app-shell` and `@object-ui/plugin-designer` | 28 of 28 tasks
successful, lock verdict `command-exit 0` |
| `pnpm --filter @object-ui/plugin-designer type-check` (`tsc --noEmit`
and `tsconfig.test.json`, which lists the new wizard pin) | exit 0 |
| `pnpm --filter @object-ui/app-shell type-check` (both projects; the
test project lists both new app-shell pins and
`createConformance.test.ts`) | exit 0 |
| `vitest run packages/app-shell/src/hooks/` | 53 files, 457 tests
passed |
| `vitest run packages/app-shell/src/views/studio-design/` | 77 files,
439 tests passed |
| `vitest run packages/plugin-designer/` | 28 files, 203 tests passed |
| `vitest run` of the two other `skeletons` importers
(`createConformance.test.ts`, `flow-node-producers.label.test.tsx`) | 2
files, 20 tests passed |
| `vitest run scripts/__tests__/` (this PR adds a changeset `.md`) | 178
of 179 files reported, 5343 tests passed, 0 failed. The run hit its 300
s cap on `date-only-zone-pins-10183.test.ts`, which spawns child
vitests. NOT MEASURED for that one file: it was queued for the lock
again and not acquired within the 540 s budget. It reads date-only zone
behaviour and nothing this PR touches |
| `node scripts/markdown-test-inputs.mjs --audit` | exit 0 |
| `pnpm exec eslint --no-inline-config` on the 7 changed source and test
files | 1 error and 21 warnings, all present on the base as well.
Linting the base blobs of the two files that report any gives 1 error
and 19 warnings for `StudioDesignSurface.tsx` and 0 and 2 for
`AppCreationWizard.tsx`: the same rules at shifted lines, so this diff
adds none. The config enables no type-aware linting, so this diff cannot
change a verdict on an untouched file |
| `node scripts/check-changeset-presence.mjs` | exit 0, 1 changeset
declared for 2 released packages |
| `pnpm check:control-bytes` | exit 0 |
| `pnpm check:new-line-citations` | `0 new citation(s)`, exit 0 |
| `pnpm check:i18n-keys` | exit 0 (no string changed) |

Declared narrowing: the dispatch's lead named all of
`packages/app-shell/src/views/metadata-admin/`. This PR changes no
source there. The only test there that imports a changed module is
`createConformance.test.ts` (and `flow-node-producers.label.test.tsx`
imports `skeletons` for `buildFlowSkeleton`), found by a `git grep` of
importers, and no module under `metadata-admin/` imports `skeletons` or
`StudioDesignSurface`. The rest of that directory, and the whole-package
runs, are CI's.

## Acceptance notes

### Census (step 2), reported before any conversion

Scanner: a TypeScript-AST walk of every `navigation: [...]` literal and
its `children`, applying the guard's own test (plain-string label,
trimmed and lower-cased, equal to `viewName` for an object entry naming
a view, else `objectName`; `dashboardName` for a dashboard entry). The
population was enumerated from the same ref it reads (`git grep` at
objectstack `origin/main` `1741c5dcb`), and cross-checked by a second
enumeration (`App.create(` and `: App =`), which found the same seven
files. The matcher's own control is the one hit it reports.

| Population | Nav entries | Entries the guard reads | Label equals the
target's machine name | Writer |
|---|---|---|---|---|
| objectstack examples: crm, multi-package, showcase, todo | 76 | 33 |
1: todo `nav_overdue`, label `Overdue`, `viewName: 'overdue'` | author |
| objectstack platform apps: account, setup, studio | 49 | 6 | 0 |
author (platform source) |
| objectstack scaffolds: `create-objectstack` blank template (no app),
`objectstack generate app` (writes `Title` + `s` for the object) | 0 / 1
per app | 1 per app | 0 (the generated plural never spells the
snake-case name) | author (a file the author owns) |
| objectui console preview fixture (`preview-samples.ts`, not stored) |
7 | 3 | 0 | fixture |
| page / report entries in the above, label against `pageName` /
`reportName` (the guard does not read these) | 29 | not read | 0 |
author |
| Stored app navigation in production | NOT MEASURED: needs production
data | | | |
| A seeded console | NOT MEASURED: not booted. A fresh seed stores the
packaged apps counted above, and the sync writes nothing without user
CRUD | | | |

Split by writer, what is readable here: platform sync 0 (it writes only
into stored rows at runtime; 0 sync-shaped ids in any source),
`apply_blueprint` NOT READABLE (the `objectstack-ai/cloud` repo answers
403 through the proxy), author 1. `apply_blueprint`'s declared contract
is readable: `BlueprintNavItemSchema.label` in `@objectstack/spec` says
"Nav entry label (defaults to the target label/name)", so the applier is
declared to store the target's label or name when a blueprint omits one.

**Can a stored row tell the writers apart?** Not from any recorded
provenance. Partly from signatures and history:

- Per entry: nothing. A nav item is a strict object with no room for a
mark, and the spec's describe says "No stored inherited flag".
- Per row: `sys_metadata`'s `source`, `managed_by`, `created_by`,
`updated_by` and `version` describe the whole app document's last write,
not an entry.
- Sync signature (strong, but a heuristic): the sync has always written
id `nav_page_` or `nav_dash_` followed by a 13-digit epoch-ms stamp and
a counter, with icon `FileText` or `LayoutDashboard`, and until
objectui#9868 the page's or dashboard's machine name as the label. The
shape is the same from `7c788f5de` to `a8198de22`. An author would have
to type the timestamp id by hand.
- Weaker signatures: the Studio scaffold's id is `nav_` plus the object
name (since `7a6837cfa`, 2026-07-05). A Studio-canvas entry's id is
`nav_item_N`. The wizard's id equals the object name. Authors write ids
like these by hand.
- History: `sys_metadata_history` keeps a full snapshot per version
(`operation_type`, `source`, `recorded_by`, `change_note`), so diffing
versions finds the write that introduced an entry. But the sync, the
Studio and the wizard all save through the same `saveItem('app', ...)`
door as the signed-in user, so those columns do not separate them.
`sys_metadata_commit` (ADR-0067) groups AI-turn writes (`actor`,
`ai_model`, an event range), so blueprint writes are attributable if the
cloud applier writes through commits (not readable) and history is
retained (not measured).

### Twin check (step 3): no

objectstack `packages/spec/src/system/i18n-resolver.ts` at `origin/main`
`1741c5dcb`, `translateApp`'s node walk:

```ts
if (typeof node.id === 'string') {
  const translated = lookupNavLabel(bundle, appName, node.id, opts);
  if (translated) next.label = translated;
}
```

`lookupNavLabel` reads only `apps.APP.navigation.ID.label` down the
locale chain. Nothing compares a label's text with `objectName`,
`viewName` or `dashboardName`, so it is not the equal-to-name rule. One
observation for triage: it also gives a label-less node the bundle text
when an entry exists for its id, ahead of inheritance, while the
execution note orders the id-keyed bundle only for a present label. The
CLI's extractor (`walkNavigation` in
`packages/cli/src/utils/i18n-extract.ts`) emits such keys only for a
present label, so only a hand-written bundle entry reaches this path.

### Noted, not filed

- The app wizard's Navigation step: objectui#11196's read
(`resolveNavItemLabel(item)` with no target resolver) shows `objectName`
for a label-less generated entry, though the wizard holds each object's
label in `availableObjects`. This lies in that branch's hunk.
- `StudioNavItemInspector`'s Label input writes `label: ''` when emptied
(`renamedLabel` with an empty value), and shows no inherited text as a
placeholder. objectui#11196's `clearedLabel` handles `AppNavInspector`
only. Read from the code, not measured.
- `AppNavInspector`'s target picker keeps `AppNavCanvas`'s `New item`
placeholder as a present label. Both files are held by objectui#11196.
- The wizard's declared-plural copy is a present label: it does not
localise or follow a rename, because inheritance has no plural rung. No
carrier.

---
_Generated by [Claude
Code](https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec)_

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

2 participants