Skip to content

docs(spec): ObjectNavItemSchema.viewName states the view the console opens when it is omitted - #21981

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-21973-nav-viewname-default
Oct 6, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-21973-nav-viewname-default

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #21973

Clause-②: no

What changed

ObjectNavItemSchema.viewName's describe said Defaults to "all". The console does not do that. The describe now states the console's real rule. One sentence changed, and "Ignored when recordId is set." stays:

Default list view to open. When omitted, the console opens the object's default list view, else its first declared list view; all names the console's fallback tab, which exists only for an object that declares no list view. Ignored when recordId is set.

  • 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 with pnpm --filter @objectstack/spec gen:docs (the five viewName rows). 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/spec patch.
  • ⛔ No schema, type, optionality, default, export or accept-set change. No runtime change, and no objectui file.

The runtime rule, read at objectui .objectui-sha = 0abd4f9f8769fc4c19ad2f96707684876f74c09f (read-only)

  • packages/layout/src/NavigationRenderer.tsx resolveHref: precedence is recordId, then filters, then viewName. With no viewName, 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 whose isDefault is set.
  • buildViewTabs (:936): it sets isDefault: true on the primary list and moves that tab to the front. It builds the fallbackTab, { id: 'all', label: allRecords }, only when viewList.length === 0, which means no defined view and no primary list. Saved overlay rows are merged after that, and they can carry their own isDefault (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 returns undefined. ObjectView then logs a console.warn and falls back to defaultViewId || views[0]. The describe leaves this out to stay short. view-ref-nav-view-missing in packages/lint already 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/spec and the rest of the tree for Defaults 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.
  • No test asserts the describe text. Searched *.test.ts, *.snap and *.json.
  • No hit in skills/**, examples/**, content/docs/ui/apps.mdx or docs/**.

Tests and gates (all at head b53d7b5a34)

  • pnpm --filter @objectstack/spec build: VERDICT command-exit 0.
  • pnpm --filter @objectstack/spec check:generated:
    • Before the regeneration: ✗ 1 of 15 artifact(s) stale: content/docs/references/**.
    • After: ✓ 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 typecheck and vitest run --maxWorkers=2: Test Files 119 passed (119), Tests 5624 passed | 5 skipped.
  • node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 104 commands. All 104 ran and exited 0.
    • --ran reconciliation: ✓ dispatch-gates --ran: 104 derived famil(ies) accounted for — 104 run, 0 NOT-MEASURED.
    • The first attempt hit four PREREQUISITE NOT MET (exit 3): check:doc-formula-expressions, check:doc-security-posture, check:skill-examples and check:dual-build-cjs-loads. Each was re-run green after building what it reads.
  • NOT MEASURED, because CI owns them:
    • The six path-scheduled CI jobs that dispatch-gates lists (Test Core, Temporal Conformance, Dogfood, Dogfood Verify CLI, Build Core, Build Docs).
    • The workflow-valued families.
    • The repo-wide pnpm lint.

Changeset, measured

  • @objectstack/spec ships dist and src/**/*.zod.ts (files[]). After the build, the new describe text is in packages/spec/dist/ui/index.{js,mjs}. Positive control: the recordId describe is in the same files. The old text has zero hits.
  • @objectstack/lint ships only dist, README.md and CHANGELOG.md. The header comment has zero hits in packages/lint/dist. Positive control: view-ref-nav-view-missing hits index.js, index.cjs and runtime.js. So lint publishes nothing new and gets no changeset.

Acceptance notes

  • Wording vs. the dispatch. The dispatch said all exists "only for an object that declares no listViews". The code's condition is wider than listViews: no defined view AND no primary list. An object that declares only a default list gets no all tab, and in the spec listViews means a container's additional named views. So the sentence says "declares no list view".
  • The first sentence is kept. "Default list view to open." is quoted verbatim in four places: 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:4743 and packages/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 saved sortOrder when they exist; otherwise it is declared order. The describe states the metadata rule.
  • lint-view-refs.ts:64–:66 is untouched. It says the schema's all "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.
  • Serial note. docs(spec, docs): App.defaultAgent and actions-as-tools name the agent route as the one chat door #21976 (docs(spec, docs): App.defaultAgent's docblock and actions-as-tools.mdx name POST /api/v1/ai/assistant/chat, a route cloud retired (cloud#2621) #21968) also edits app.zod.ts, about 1,200 lines away (near :1655). origin/main was re-fetched before this PR opened (dcf3eb494a). Nothing that landed touches these four files, so no merge was needed.

Generated by Claude Code

claude added 2 commits October 6, 2026 10:04
…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>
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

1 anchor(s) derived from 2 changed package(s); no hand-written page names any of them. ⚠️ 1 changed file(s) yielded no anchor (packages/lint/src/lint-view-refs.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/lint/src/lint-view-refs.ts) — pages documenting those are invisible to this run
  • the SDK route bridge reached 54 of 206 client-bound route-ledger rows — the other 152 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 152: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 55 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 97 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 138 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json dcf3eb494afbfa1a5fd30f6d17c0f325940ea1f9 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 0c13c4bdf0acd91f5cb54be02ab7e05f2e80388a — the merge of head b53d7b5a347066148c25f196c97618d477d3723a into base dcf3eb494afbfa1a5fd30f6d17c0f325940ea1f9, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# 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

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation protocol:ui size/s tooling

Projects

None yet

2 participants