Repository navigation
docs(spec): ObjectNavItemSchema.viewName states the view the console opens when it is omitted - #21981
Conversation
…opens when it is omitted The describe said the default is "all". The console opens the object's default list view (the one `buildViewTabs` marks `isDefault`), else its first declared list view; `all` is only the fallback tab it builds for an object with no list view. The lint header's quote of the sentence follows. Claude-Session: https://claude.ai/code/session_01T9u38rswFp5Rw8DswRUReJ Co-authored-by: Claude <noreply@anthropic.com>
…changeset Claude-Session: https://claude.ai/code/session_01T9u38rswFp5Rw8DswRUReJ Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check1 anchor(s) derived from 2 changed package(s); no hand-written page names any of them. What this run could not see
Coarse fallback — 138 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 0c13c4bdf0acd91f5cb54be02ab7e05f2e80388a && git checkout 0c13c4bdf0acd91f5cb54be02ab7e05f2e80388a
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin dcf3eb494afbfa1a5fd30f6d17c0f325940ea1f9 b53d7b5a347066148c25f196c97618d477d3723a && git checkout -B drift-repro dcf3eb494afbfa1a5fd30f6d17c0f325940ea1f9 && git merge --no-ff b53d7b5a347066148c25f196c97618d477d3723a
node scripts/docs-audit/affected-docs.mjs --json dcf3eb494afbfa1a5fd30f6d17c0f325940ea1f9 |
Fixes #21973
Clause-②: no
What changed
ObjectNavItemSchema.viewName's describe saidDefaults to "all". The console does not do that. The describe now states the console's real rule. One sentence changed, and "Ignored whenrecordIdis set." stays:packages/spec/src/ui/app.zod.ts: the describe, plus a short docblock above it naming the objectui code the sentence mirrors.content/docs/references/ui/app.mdx: regenerated withpnpm --filter @objectstack/spec gen:docs(the fiveviewNamerows). Not edited by hand.packages/lint/src/lint-view-refs.ts: only the header comment's quote of the old sentence (about:46) moves. This file was declared on [PM seat] domain:devx @ objectstack — ⏳ vacant #6023. No lint logic, rule or test changes..changeset/21973-nav-view-name-default.md:@objectstack/specpatch.The runtime rule, read at objectui
.objectui-sha=0abd4f9f8769fc4c19ad2f96707684876f74c09f(read-only)packages/layout/src/NavigationRenderer.tsxresolveHref: precedence isrecordId, thenfilters, thenviewName. With noviewName, the entry links to the bare object route, which has no view segment.packages/app-shell/src/views/ObjectView.tsx:2151:activeViewId = resolvedViewId || defaultViewId || views[0]?.id.defaultViewId(:2129) is the first tab whoseisDefaultis set.buildViewTabs(:936): it setsisDefault: trueon the primarylistand moves that tab to the front. It builds thefallbackTab,{ id: 'all', label: allRecords }, only whenviewList.length === 0, which means no defined view and no primarylist. Saved overlay rows are merged after that, and they can carry their ownisDefault(a user's set-default). "The object's default list view" covers both cases.resolveViewId(@object-ui/core,utils/resolve-view-id.ts) matches three ways: exact id, short name retried with the object prefix added, and qualified name retried with the prefix stripped. On a miss it returnsundefined.ObjectViewthen logs aconsole.warnand falls back todefaultViewId || views[0]. The describe leaves this out to stay short.view-ref-nav-view-missinginpackages/lintalready refuses an unresolvable name at build time.Census: other live text that restates the old default
Searched docs (excluding
content/docs/releases/), skills, examples,packages/specand the rest of the tree forDefaults to "all",Defaults to 'all', and default-all-view phrasings.content/docs/references/ui/app.mdx: lines 116, 465, 655, 842 and 1084. Regenerated in this PR.packages/lint/src/lint-view-refs.ts:46: the quote. Moved in this PR.packages/lint/src/lint-view-refs.test.ts:240: a test comment, "The schema documents viewName as 'Defaults to "all"'". It is in the lint lane and asserts nothing about the text, so it is listed here and not edited.*.test.ts,*.snapand*.json.skills/**,examples/**,content/docs/ui/apps.mdxordocs/**.Tests and gates (all at head
b53d7b5a34)pnpm --filter @objectstack/spec build: VERDICT command-exit 0.pnpm --filter @objectstack/spec check:generated:✗ 1 of 15 artifact(s) stale: content/docs/references/**.✓ All 15 generated artifacts are up to date.pnpm --filter @objectstack/spec typecheck: exit 0.pnpm --filter @objectstack/spec exec vitest run --project local --maxWorkers=2:Test Files 619 passed (619),Tests 18485 passed | 1 todo.pnpm --filter @objectstack/lint typecheckandvitest run --maxWorkers=2:Test Files 119 passed (119),Tests 5624 passed | 5 skipped.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 104 commands. All 104 ran and exited 0.--ranreconciliation:✓ dispatch-gates --ran: 104 derived famil(ies) accounted for — 104 run, 0 NOT-MEASURED.PREREQUISITE NOT MET(exit 3):check:doc-formula-expressions,check:doc-security-posture,check:skill-examplesandcheck:dual-build-cjs-loads. Each was re-run green after building what it reads.dispatch-gateslists (Test Core, Temporal Conformance, Dogfood, Dogfood Verify CLI, Build Core, Build Docs).pnpm lint.Changeset, measured
@objectstack/specshipsdistandsrc/**/*.zod.ts(files[]). After the build, the new describe text is inpackages/spec/dist/ui/index.{js,mjs}. Positive control: therecordIddescribe is in the same files. The old text has zero hits.@objectstack/lintships onlydist,README.mdandCHANGELOG.md. The header comment has zero hits inpackages/lint/dist. Positive control:view-ref-nav-view-missinghitsindex.js,index.cjsandruntime.js. So lint publishes nothing new and gets no changeset.Acceptance notes
allexists "only for an object that declares nolistViews". The code's condition is wider thanlistViews: no defined view AND no primarylist. An object that declares only a defaultlistgets noalltab, and in the speclistViewsmeans a container's additional named views. So the sentence says "declares no list view".packages/spec/src/ai/solution-blueprint.zod.ts:174,packages/platform-objects/src/apps/setup-users-nav-view.test.ts:13,packages/lint/CHANGELOG.md:4743andpackages/spec/CHANGELOG.md:17669. Rewriting it would make those quotes stale and step outside the declared file surface.views[0]and the user's tab order.views[0]follows a per-user tab order (localStorage) and savedsortOrderwhen they exist; otherwise it is declared order. The describe states the metadata rule.lint-view-refs.ts:64–:66is untouched. It says the schema'sall"resolves only when the object actually declares it". That is outside the declared quote. It stays true for the lint, because the rule skips objects whose list-view namespace is empty, and those are exactly the objects that get the runtime fallback tab. Carrier: none.app.zod.ts, about 1,200 lines away (near:1655).origin/mainwas re-fetched before this PR opened (dcf3eb494a). Nothing that landed touches these four files, so no merge was needed.Generated by Claude Code