Skip to content

fix(console): remove Studio form-view leftovers, package-less scope references and nav resolver staleness - #39783

Draft
objectstack-fleet[bot] wants to merge 9 commits into
mainfrom
claude/issue-39003-wip
Draft

objectstack-fleet[bot] wants to merge 9 commits into
mainfrom
claude/issue-39003-wip

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Elon · project thread

Fixes #39003
Fixes #38785
Fixes #38859

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:Studio 的视图编辑器只按列表视图编辑(本来也只能遇到列表);侧边栏里对象的图标和颜色在对象读取晚到时也会正确显示,不再停在默认灰色;其余用户无感。
  • 为什么做:收尾"表单成为独立元数据类型"之后视图编辑器里残留的表单分支、已退役的无包作用域留下的空字段与过时注释,以及侧边栏导航的同一类首帧过时问题。
  • 出错会怎样:Studio 作者若手里还有旧的表单形视图,会被当成列表打开;侧边栏图标颜色若有问题只影响显示,可直接撤回本改动。
  • 要你做什么:无。

What changes

#39003, form-view leftovers after the protocol-19 form switch (a view holds lists only since spec 19, ADR-0159 D7):

  1. view-variant-model.ts: the form family (FORM_FAMILY, familyFromViewKind, isFormFamilyKey) and the binding's familyKey are removed. A binding is { storeKey, schema }; no family other than list is derived.
  2. ViewVariantInspector.tsx: the form branch is removed (form layout picker and labels, getFormVariantSchema reads, and the required-in-gated-section Save gate that only a form body could reach, with requiredInGatedSection.ts and its tests). The formViewType-30046 test goes; a new ViewVariantInspector.listOnly-39003.test.tsx pins that a draft still saying viewKind: 'form' is offered the list types only.
  3. ViewConfigPanel.tsx / ViewInspector.tsx: the always-false isFormFamilyKey call and the familyKey prop are removed.
  4. form-preview.ts: toInlineFormType (no caller outside its own test) and its test are removed.
  5. recordFormNavigation.ts: resolveFormViewChrome (its one caller always passed null for the named form) and the FormViewDefinition type (not exported from the package entry) are removed; resolveRecordFormChrome returns the host's chrome directly. Removal of a dead arm, not a re-point.
  6. Studio locales: engine.viewPreview.formFailed and the six engine.inspector.view.gatedRequired.* keys are removed from en.ts and zh.ts; no call site reads any of them (check:i18n-keys green).
  7. 19.internal-record-forms-not-loaded.ts: the lint rule form-view-internal-not-loaded it named is retired at 19, so its comment and acceptance text no longer name it.

#38785, the retired package-less Studio scope: MetadataAreaHost.emptyListHint (no host set it) and its two reads in ResourceListPage.tsx are removed; the list falls back to the type's own hint. The include prop doc in DraftChangesPanel.tsx now names its one caller (DraftPreviewBar), and the backfill comment no longer describes the package-less scope.

#38859, nav-row resolver contract: NavTargetLabelResolver, NavTargetIconResolver and NavTargetColorResolver (@object-ui/layout, TSDoc only) state that a resolver's answers are fixed for its identity and that it may keep them for its own lifetime, never across a metadata version; the label doc no longer says nothing is stored. useNavTargetIcon / useNavTargetColor read live provider state, so both now use the label hook's answeringOnce cache (now generic, exported from useNavTargetLabel.ts), pinned by useNavTargetIcon.answersAsOfItsRender-38859.test.tsx.

Also, made false by item 5: packages/spec/liveness/form.json's buttons note named resolveFormViewChrome as a reader; it now names readFormButton in the console form page.

Tests

All readings at head 89d682f0 (merge of origin/main 56bed06 in), local, through the shared verification lock.

Targeted UI tests
  • pnpm --dir ui exec vitest run over app-shell hooks/, utils/, metadata-admin/inspectors/, metadata-admin/previews/ and the five other changed test files: 593 files passed, 1 failed, 1 skipped. The one failure, AddWidgetPicker.oneRegistry-26745.test.tsx ("expected 20 widget cells, saw 0", the renderer still on its loading spinner), is in a file this diff does not touch; rerun alone it passes.
  • Rerun of that file with packages/layout/src/, ResourceListPage*, DraftChangesPanel*, ViewConfigPanel*: 78 files, 625 tests passed.
  • pnpm --filter @objectstack/spec exec vitest run src/migrations/: 6 files, 255 passed, 4 todo.
  • Ablation: with ViewVariantInspector.tsx, ViewInspector.tsx, view-variant-model.ts, view-schema.ts, requiredInGatedSection.ts and useNavTargetIcon.ts restored from origin/main, the two pins go red (4 failed, the 2 controls pass); restored to the branch, green.
Typecheck and lint
  • pnpm --filter @object-ui/layout --filter @object-ui/i18n --filter @object-ui/app-shell run type-check: exit 0.
  • eslint over the 17 changed source files: 0 errors (pre-existing warnings only).
  • ui check:i18n-keys, check:i18n-dead-keys, check:i18n-drift, check:new-line-citations: exit 0.
Repo gates

Run locally (exit 0 each): check:liveness, check:spec-changes, check:upgrade-guide, check:llms-txt (spec); check:issue-citations, check:cross-package-test-inputs, check:doc-authoring, check:gitlink-declared, check:merge-driver, check:nul-bytes, check:published-files, check-adr-0087-registration, check-changeset-no-major, check-empty-changeset, check-closing-keyword-parity, check-affected-docs, check-drift-comment. dispatch-gates --ran names 76 of 93 derived families unrun locally; CI runs them on this PR.

Acceptance notes

Verification

Read first, by risk:

  1. ui/packages/app-shell/src/hooks/useNavTargetIcon.ts: the icon and colour resolvers now cache per object for the resolver's life.
  2. ui/packages/app-shell/src/views/metadata-admin/inspectors/ViewVariantInspector.tsx: the form branch removal; the list branch is otherwise unchanged.
  3. ui/packages/app-shell/src/utils/recordFormNavigation.ts: resolveRecordFormChrome inlined.

Two-minute check: pnpm --dir ui exec vitest run packages/app-shell/src/hooks/useNavTargetIcon.answersAsOfItsRender-38859.test.tsx packages/app-shell/src/views/metadata-admin/inspectors/ViewVariantInspector.listOnly-39003.test.tsx from the repo root: both files pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_016WV4cwiNRyb9B38wT2fjYj

… references and nav resolver staleness

The view inspector, view-config panel and variant model edit list views
only (a `view` holds lists only since protocol 19); dead form-view arms,
the record-form named-form chrome arm, toInlineFormType and their dead
strings go. The unset `emptyListHint` host member and stale package-less
scope comments go. The sidebar icon and colour resolvers keep the first
answer per object, as the label resolver does, and the three resolver
types document that contract.

Claude-Session: https://claude.ai/code/session_01Utp6CbHNxjZcHJuqartB
Co-authored-by: Claude <noreply@anthropic.com>
…mments and a stale liveness note reference

Claude-Session: https://claude.ai/code/session_016WV4cwiNRyb9B38wT2fjYj
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Dec 5, 2026
@github-actions

github-actions Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. ⚠️ 1 changed file(s) yielded no anchor (packages/spec/liveness/form.json), 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/spec/liveness/form.json) — pages documenting those are invisible to this run
  • the SDK route bridge reached 71 of 255 client-bound route-ledger rows — the other 184 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 184: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 60 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 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 — 185 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 881809cf53e394c59704cb9ba100386fba74804a → packageMentionDocs.

Which tree this was computed on

This run read content/docs from db7f2f82c6878482026252219c2c3d1cb4ef2a47 — the merge of head 590e85aab39b763fc9b1cb5e42e678e1819823d2 into base 881809cf53e394c59704cb9ba100386fba74804a, 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 db7f2f82c6878482026252219c2c3d1cb4ef2a47 && git checkout db7f2f82c6878482026252219c2c3d1cb4ef2a47
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 881809cf53e394c59704cb9ba100386fba74804a 590e85aab39b763fc9b1cb5e42e678e1819823d2 && git checkout -B drift-repro 881809cf53e394c59704cb9ba100386fba74804a && git merge --no-ff 590e85aab39b763fc9b1cb5e42e678e1819823d2

node scripts/docs-audit/affected-docs.mjs --json 881809cf53e394c59704cb9ba100386fba74804a

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

…at collection in four inspector tests

ADR-0159 line 83 anchored the docblock of an interface this branch removes.
It now anchors RecordFormModalLayout in the same file, whose docblock has
said the same thing since the record forms stopped loading a form view, and
quotes that docblock.

Four inspector test files reach a lazy import of @objectstack/lint from the
source under test; each now loads it at module top so no case pays the first
load inside its clock (check:test-source-alias).

Claude-Session: https://claude.ai/code/session_016WV4cwiNRyb9B38wT2fjYj
Co-authored-by: Claude <noreply@anthropic.com>
The file pinned the editor's refusal of an object-required field inside a
predicate-gated section of a form view. This branch removes that refusal
with the view inspector's form branch, since a view holds lists only, so
the two refusal cases can no longer hold and the two controls pass with
nothing to control. The neutral Save title they shared stays pinned by
ResourceEditPage.celGate.test.tsx and ResourceEditPage.defaultGate.test.tsx.

Claude-Session: https://claude.ai/code/session_016WV4cwiNRyb9B38wT2fjYj
Co-authored-by: Claude <noreply@anthropic.com>

This branch has not been deployed

No deployments
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 size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants