Repository navigation
fix(console): remove Studio form-view leftovers, package-less scope references and nav resolver staleness - #39783
objectstack-fleet[bot] wants to merge 9 commits into
Conversation
… 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>
Claude-Session: https://claude.ai/code/session_016WV4cwiNRyb9B38wT2fjYj 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>
Claude-Session: https://claude.ai/code/session_016WV4cwiNRyb9B38wT2fjYj Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. What this run could not see
Coarse fallback — 185 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 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 |
…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>
Claude-Session: https://claude.ai/code/session_016WV4cwiNRyb9B38wT2fjYj Co-authored-by: Claude <noreply@anthropic.com>
Requested by Elon · project thread
Fixes #39003
Fixes #38785
Fixes #38859
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
#39003, form-view leftovers after the protocol-19 form switch (a
viewholds lists only since spec 19, ADR-0159 D7):view-variant-model.ts: the form family (FORM_FAMILY,familyFromViewKind,isFormFamilyKey) and the binding'sfamilyKeyare removed. A binding is{ storeKey, schema }; no family other than list is derived.ViewVariantInspector.tsx: the form branch is removed (form layout picker and labels,getFormVariantSchemareads, and the required-in-gated-section Save gate that only a form body could reach, withrequiredInGatedSection.tsand its tests). TheformViewType-30046test goes; a newViewVariantInspector.listOnly-39003.test.tsxpins that a draft still sayingviewKind: 'form'is offered the list types only.ViewConfigPanel.tsx/ViewInspector.tsx: the always-falseisFormFamilyKeycall and thefamilyKeyprop are removed.form-preview.ts:toInlineFormType(no caller outside its own test) and its test are removed.recordFormNavigation.ts:resolveFormViewChrome(its one caller always passednullfor the named form) and theFormViewDefinitiontype (not exported from the package entry) are removed;resolveRecordFormChromereturns the host's chrome directly. Removal of a dead arm, not a re-point.engine.viewPreview.formFailedand the sixengine.inspector.view.gatedRequired.*keys are removed fromen.tsandzh.ts; no call site reads any of them (check:i18n-keysgreen).19.internal-record-forms-not-loaded.ts: the lint ruleform-view-internal-not-loadedit 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 inResourceListPage.tsxare removed; the list falls back to the type's own hint. Theincludeprop doc inDraftChangesPanel.tsxnow names its one caller (DraftPreviewBar), and thebackfillcomment no longer describes the package-less scope.#38859, nav-row resolver contract:
NavTargetLabelResolver,NavTargetIconResolverandNavTargetColorResolver(@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/useNavTargetColorread live provider state, so both now use the label hook'sansweringOncecache (now generic, exported fromuseNavTargetLabel.ts), pinned byuseNavTargetIcon.answersAsOfItsRender-38859.test.tsx.Also, made false by item 5:
packages/spec/liveness/form.json'sbuttonsnote namedresolveFormViewChromeas a reader; it now namesreadFormButtonin 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 runover app-shellhooks/,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.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.ViewVariantInspector.tsx,ViewInspector.tsx,view-variant-model.ts,view-schema.ts,requiredInGatedSection.tsanduseNavTargetIcon.tsrestored 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.uicheck: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 --rannames 76 of 93 derived families unrun locally; CI runs them on this PR.Acceptance notes
formitem has no custom Studio designer; view form: layout horizontal is stored and served, but the label stays above the input #29676 and Studio form designer: show a form view's_diagnostics.warnings(a section naming a field its object lacks) #29311 are closed. The required-field-in-a-gated-section author check (objectui#6900) was reachable only from a form held in a view, which a 19 view never is, so removing it removes no live check; aformitem does not get that check today. Recorded here, not filed: no reproduction was made.inspectors/ViewInspector.tsx(thefamilyKeyprop),inspectors/requiredInGatedSection.tsand its two tests (only the removed form branch imported it),utils/index.ts(theFormViewDefinitiontype export),previews/form-preview.test.ts, five test files that passedfamilyKey, andpackages/spec/liveness/form.json(note text).DraftChangesPanel.tsxlives undersrc/preview/, notviews/metadata-admin/as the claim spelled it.ui/packages/data-objectstack/src/index.tskeeps its ownFORM_FAMILYset (a list filter in the data adapter); not touched.Verification
Read first, by risk:
ui/packages/app-shell/src/hooks/useNavTargetIcon.ts: the icon and colour resolvers now cache per object for the resolver's life.ui/packages/app-shell/src/views/metadata-admin/inspectors/ViewVariantInspector.tsx: the form branch removal; the list branch is otherwise unchanged.ui/packages/app-shell/src/utils/recordFormNavigation.ts:resolveRecordFormChromeinlined.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.tsxfrom the repo root: both files pass.🤖 Generated with Claude Code
https://claude.ai/code/session_016WV4cwiNRyb9B38wT2fjYj