Repository navigation
fix(spec,studio): a record:quick_actions bar's location refuses record, and Studio stops offering it (#38045) - #38581
objectstack-fleet[bot] wants to merge 12 commits into
Conversation
…dio stops offering it (#38045) WIP: spec narrowing, Studio dropdown, registration enum, pins. Claude-Session: https://claude.ai/code/session_01FEkQ5pH8MaBBP5T2dVcTHL Co-Authored-By: Claude <noreply@anthropic.com>
#38045) Claude-Session: https://claude.ai/code/session_01FEkQ5pH8MaBBP5T2dVcTHL Co-Authored-By: Claude <noreply@anthropic.com>
… location set (#38045) Claude-Session: https://claude.ai/code/session_01FEkQ5pH8MaBBP5T2dVcTHL Co-Authored-By: Claude <noreply@anthropic.com>
) Claude-Session: https://claude.ai/code/session_01FEkQ5pH8MaBBP5T2dVcTHL Co-Authored-By: Claude <noreply@anthropic.com>
…ick-actions-no-record
…ADR-0122 (#38045) Claude-Session: https://claude.ai/code/session_01FEkQ5pH8MaBBP5T2dVcTHL Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5pH8MaBBP5T2dVcTHL Co-Authored-By: Claude <noreply@anthropic.com>
…ick-actions-no-record
…s; bar-worded retired-word prescriptions; Clause-② yes (#38045) Claude-Session: https://claude.ai/code/session_01FEkQ5pH8MaBBP5T2dVcTHL Co-Authored-By: Claude <noreply@anthropic.com>
Main dropped one published schema while this branch adds RecordQuickActionsLocation, so the counts read 1742 total and 187 in UI. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jT4byCJU6xgZwQDh8y
… no conversion backs On a record:quick_actions bar, the five retired location words shared one tail ending in the `os migrate meta --from 18` sentence. Protocol 19's step covers the four page-part words on a bar, but no conversion ever covered a bar's own `global_nav`, so the sentence was untrue for that row. The tail is split: the places sentence for all five, the migrate sentence for the four. The bar's pin now holds both halves. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jT4byCJU6xgZwQDh8y
📓 Docs Drift CheckThis PR changes 1 package(s): 2 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 4 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 181 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 dcdb646369d8bc2e22c21cbbf7be3e1aa7d0f374 && git checkout dcdb646369d8bc2e22c21cbbf7be3e1aa7d0f374
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 62eecbca5359164b15c0163fda29b792c5e74e9b 5496b7a4f5d724d6fc307244608d0c9cfc1acf41 && git checkout -B drift-repro 62eecbca5359164b15c0163fda29b792c5e74e9b && git merge --no-ff 5496b7a4f5d724d6fc307244608d0c9cfc1acf41
node scripts/docs-audit/affected-docs.mjs --json 62eecbca5359164b15c0163fda29b792c5e74e9b
|
|
repo:objectstack#1 · zhuangjianguo · session_01QsR2jQkLKMF81cpqpt8p1a Delta contract-tier review at this head by an isolated sub-agent of seat 1's L1 thread: this PR supersedes #38541, whose record 7255183085 (PASS at |
Requested by Jianguo · project thread
Fixes #38045
Clause-②: yes (narrowing)
Metadata-protocol: narrowed
Skills-docs: none — no text or eval under skills/ writes a record:quick_actions bar's own location; action locations themselves are unchanged
维护者速读
Supersedes #38541
Seat: repo:objectstack#1 · zhuangjianguo · session_01QsR2jTsdScTh3o2fSjbxSz (takeover of seat repo:objectstack#5, Claim 7255614866, amendment 7255639984)
Branch: claude/project-thread-y2muak (started at claude/issue-38045-quick-actions-no-record @c68dfcc7)
Ruling-ref: record 7251596106 on the card (maintainer ruling A, verbatim 「A 下拉和格式都去掉」). Analysis: 7251023956.
Takeover round (seat 1, Claim 7255614866 + amendment 7255639984)
This PR replaces #38541: its dev's account ran out of tokens, and the new branch starts at that PR's head
c68dfcc7, where the seat L1 (7255089417, ACCEPT) and the contract review (7255183085, PASS with S3 open) were recorded. Every prior commit was re-read and kept; nothing was dropped or rewritten.40b0b59amergesorigin/mainat30141766throughscripts/pm/os-regen-merge.sh. The only conflict was the generatedcontent/docs/references/index.mdx. It was regenerated from the merged tree (gen:schema, specbuild,gen:api-surface,gen:export-origins,gen:declaration-map,gen:docs) in7fb066f7: main dropped one published schema while this PR addsRecordQuickActionsLocation, so the counts read 1742 total and 187 in UI. No other generated file moved, and no hand-written file needed a resolution (en.ts and zh.ts auto-merged).global_navprescription no longer ends with theos migrate meta --from 18sentence, which no conversion backs for that word (protocol 19's step covers a bar's four page-part words; the protocol-17 step strippedglobal_navfromaction.locationsonly).QUICK_ACTIONS_BAR_PLACES_TAILis split into the places sentence (all five rows) and the house migrate sentence (the four page-part rows). The bar's pin now asserts theglobal_navmessage has noos migrate meta --fromand each of the four names`os migrate meta --from 18`. Commit5496b7a4.global_navmessage proof that the row rides the shared enum; it points at the positive pin.5496b7a4. Speccomponent-record-blocks.test.ts,action.test.ts,retired-key-migrate-sentence.test.ts,type-alias-convention.pin.test.ts: 4 files, 209 passed. Ablation throughscripts/ablation-replace.mjs: theglobal_navrow put back on the migrate tail turns "answers each retired word on the bar with a single place, neverrecord" red (1 failed / 35 passed); restored, blob == HEAD. PR body gates (check-closing-keyword-parity,check-changeset-no-major --base origin/main,check-adr-0087-registration --base origin/main,check-partof-closing-keyword): exit 0. NOT MEASURED yet: the full dogfood battery and the derived gate sweep at this head are running; this section is updated when they finish.Rework round (contract review 7253506178, seat ruled both should-fix its way)
Head c68dfcc (merges main at d64541c first).
action-locations-page-parts-retired(packages/spec/src/migrations/entries/semantic/19.action-locations-page-parts-retired.ts) now says, insurface,replacementandacceptanceCriteria, that arecord:quick_actionsbar's ownlocationtakes one place only (record_page, its default,record_row,record_related,record_sectionorlist) and thatrecordthere is refused at parse with the prescription namingrecord_page. No new id, no new entry. The changeset's ADR-0087 marker now says this change extends that entry's surface, and no longer says the conversion maps every protocol-18 bar location: it mapsrecord_header,list_itemandlist_toolbar, and leaves a bar atrecord_moreas stored with a TODO. The ledger feeds only gitignored projections (upgrade guide,spec-changes.json);check:upgrade-guideandcheck:spec-changesare green and nothing else regenerated.Clause-②: yes (narrowing)here and in the changeset (see Acceptance notes).record_header,list_item,list_toolbar,record_more,global_nav) now gets a prescription written for a bar: it names the one place to write and never offersrecord. The shared enum's action-side prescriptions are unchanged. N2 and N3 are untouched.What changes
Ruling A, carried out as one PR. On the
record:quick_actionsbar,recordis not a place the bar can be set to;recordon an action's ownlocationsis untouched.packages/spec/src/ui/action.zod.tsaddsRecordQuickActionsLocationSchema(and its typeRecordQuickActionsLocation):ActionLocationSchema.exclude(['record']), so it rides the shared enum (a location the vocabulary adds reaches the bar too). Its error map answersrecordwith a prescription that namesrecord_page, the five retired words (global_navand the four page-part words) from the bar's own map of bar-worded prescriptions, and every other value with zod's own enum error; the shared enum keeps its action-side prescriptions.RecordQuickActionsProps.locationuses it; its describe says "any action location butrecord". Proposed refusal text (the contract review judges it):block-config.ts) is built from a total label map keyed byRecordQuickActionsLocation(a TypeScript Record type) (theActionDefaultInspectorLOCATION_LABELSmechanism), so the compiler keeps the options equal to the spec's set: re-addingrecordis TS2353. Display order unchanged exceptrecordis gone (record_pagefirst).engine.inspector.pageBlock.option.location.recordremoved from en (Record · page and rows) and zh (「记录 · 页面与行」).ui/packages/plugin-detail/src/index.tsx(the bar's registration, not the renderer) publishedlocationas[...ACTION_LOCATIONS]; that list is serialized intosdui.manifest.json, which JSX page validation reads. Left as it was, the manifest would still offerrecordon the bar, a second door that accepts what the spec now refuses. It now publishesRecordQuickActionsLocationSchema.options;sdui.manifest.json,scripts/sdui-manifest.record.jsonandcontent/docs/ui/components/record.mdxare regenerated by their generators (the manifest diff is the one enum member and the description). The renderer (record-quick-actions.tsx) is unchanged.api-surface/,export-origins/,declaration-map/,json-schema.manifest/ui.jsonandcontent/docs/references/**regenerated by the spec gates (no hand edits).type-alias-convention.pin.test.tspins the new alias as isomorphic (ADR-0122;check:spec-parsed-aliasasked for it) and its count line moves 879 → 880..changeset/38045-quick-actions-no-record.md:minoron spec, plugin-detail, app-shell and i18n, the two declaration lines, a FROM → TO table, and ADR-0087 dispositionnot-required (already-registered action-locations-acted-on, action-locations-page-parts-retired), whose semantic entry this PR extends (rework round, S1).Census of authored bars at
location: 'record'(any quoting, any file type): 0 in objectstack (git grep -nE "[\"']?location[\"']?\s*:\s*[\"']record[\"']"at 545a4fa), 0 in HotCRM (same pattern at origin/main d48b030b; its onerecord:quick_actionsmention is a test). The authored bars areshowcase_task_detailandsys_user, all atrecord_section, and both still parse.Read first
packages/spec/src/ui/action.zod.ts, theRecordQuickActionsLocationSchemahunk: the refusal text and the.exclude()with an explicit error (the explicit param replaces the copied one, so the bar's own retired-word map,QUICK_ACTIONS_BAR_RETIRED, is what answers those words on the bar).ui/packages/app-shell/src/views/metadata-admin/previews/block-config.ts, theQUICK_ACTIONS_LOCATION_LABELSmap and the dropdown'soptions.ui/packages/plugin-detail/src/index.tsx, the registration'slocationenum (the surface addition above).Two-minute check
pnpm --filter @objectstack/spec exec vitest run src/ui/component-record-blocks.test.ts— expect 36 passed, including the four cases under "record:quick_actionslocation— single places only, neverrecord".Tests
All at head aeb79b9 unless noted.
component-record-blocks.test.ts, new top-level describe in the bar's existing harness): positive (the bar accepts exactlyACTION_LOCATIONSminusrecord, each parses), negative (location: 'record'refused, one issue,code: 'invalid_value',path: ['location'], message first sentence andlocation: 'record_page'),recordstill on the shared enum, and each retired word on the bar is answered with one issue (invalid_value,location), a message that opens with the word, names a single place and never offersrecord, while the shared enum'srecord_headerprescription still offersrecord. A schema refusal carries no ADR-0112status(that envelope is the API's), so the pin iscode+path+ prescription, theadd-record-config-retirement.test.tsprecedent.block-config.test.ts): offers exactlyRecordQuickActionsLocationSchema.options; does not offerrecord(with the non-empty guard); no leftover…option.location.recordtranslation in either locale, with a still-offered key as control.Test runs
pnpm --filter @objectstack/spec test913 files passed, 28896 tests passed, 1 todo; speccomponent-record-blocks.test.ts+action.test.ts+action-locations-acted-on.test.ts198 passed;pnpm --filter @objectstack/spec build && check:generatedall 14 up to date.pnpm --filter @objectstack/spec test(at 8a55fce, before the merge of main and the pin-count commits): Test Files 913 passed (913), Tests 28896 passed, 1 todo.pnpm --filter @objectstack/spec typecheck: exit 0 (check:test-typecheck: OK), rerun after the pin edit.component-record-blocks.test.ts+type-alias-convention.pin.test.ts: 2 files, 39 passed.ui:block-config.test.ts+block-config-i18n.test.ts: 2 files, 68 passed.ui: plugin-detail quick-actions and registration tests + all ofpackages/i18n/: 125 files, 1978 passed, 13 skipped. (The whole plugin-detail suite did not finish inside one 10-minute foreground run; narrowed to the files that read the registration or the bar, and left toTest UI.)pnpm --filter @object-ui/plugin-detail type-check: exit 0.pnpm --filter @object-ui/app-shell type-check(both tsconfigs): exit 0.pnpm --filter @objectstack/dogfood test): lock VERDICT command-exit 0, Test Files 495 passed, 3 skipped (498), Tests 4183 passed, 68 skipped (4251).pnpm --filter @objectstack/dogfood testafter building its closure): lock VERDICT command-exit 0, Test Files 495 passed, 3 skipped (498), Tests 4183 passed, 68 skipped (4251).Ablations (each mutation through scripts/ablation-replace.mjs, landing and restore checked by blob hash)
location: RecordQuickActionsLocationSchema.optional()→ActionLocationSchema.optional(): "refuseslocation: 'record'…" red (1 failed / 35 passed); restored, blob == HEAD..exclude(['record'])→.exclude(['record', 'record_row']): "accepts every action location exceptrecord…" red; restored.recordtoQUICK_ACTIONS_LOCATION_LABELS: "offers exactly the locations the spec accepts" and "does NOT offerrecord" red (2 failed / 45 passed), andtsc --noEmitin app-shell red withTS2353:'record'does not exist in the type, a Record keyed by exactlylist,record_page,record_row,record_relatedandrecord_section— the reverse check that the Console compiles against the rebuilt, narrowed.d.ts. A first attempt was refused by the tool (its replacement contained its anchor) and changed nothing; the run quoted is the second.record" red (1 failed / 35 passed); restored, blob == HEAD.recordoption" red; restored.Gates
Rework round, at c68dfcc:
dispatch-gates --commandsderives 130 families;--ranwith exit codes: 129 run, 1 NOT MEASURED (check-plugin-teardown-shape --self-test, exit 3, shallow clone cannot reach its pinned fixture commit). Six gates first answered exit 3 on an unbuilt closure in the fresh worktree andpnpm --dir ui exec vitest run scripts/was SIGKILLed on the shared box; after building the CLI and lint closures each was rerun: exit 0 (ui scripts: 172 files passed, 2 skipped).check-adr-0087-registration --base origin/main: exit 0 with the reworded marker.Overlap at c68dfcc:
overlap-checkexit 1. Textual conflicts with two open draft PRs on files this PR changed in its first round (generated outputs): feat(spec)!: actions that act on many records are placed atselection; a list view'sbulkActionsis retired #38550 oncontent/docs/references/ui/component.mdx,content/docs/ui/components/record.mdx,scripts/sdui-manifest.record.json; feat(runtime)!: retire POST /packages/:id/adopt-orphans and its two console entries (#38150 PR-B1) #38545 oncontent/docs/references/index.mdx. Not resolved by hand; whichever lands second regenerates.dispatch-gates --commands(derived at c1cb23b, the same list at aeb79b9): 127 families run;--ranwith exit codes: 124 run, 3 NOT MEASURED, all threePREREQUISITE NOT METexit 3, none reading a file this diff changes:check-plugin-teardown-shape --self-test(shallow clone cannot reach its pinned fixture commit),spec check:skill-examples(readspackages/client-react/dist, not built here),check:dual-build-cjs-loads(reads dists of packages not built here). CI runs all three.One real finding along the way, fixed in this PR:
check:spec-parsed-aliasasked for a pin of the new alias (exit 1, then 0).pnpm --filter @objectstack/spec check:generatedafter rebuilding spec on the merged tree: all 14 artifacts up to date.check-adr-0087-registration --base origin/main: exit 0 (the already-registered disposition).check-sdui-manifest,check:sdui-reference,check:nul-bytes,check:issue-citations,check-empty-changeset,check-changeset-no-major: exit 0 at aeb79b9.check:query-options-erasureandcheck:type-check-debtexceed 300 s; rerun without that cap: exit 0 both.Acceptance notes
not-required (already-registered …)stands, and the semantic entry it names is extended here so the claim is a fact (rework round, S1). The original argument, kept for the record: The dispatch left open whether this narrowing needs a conversion entry. The registration gate refusesno-migration-prescriptionon anyMetadata-protocol: narrowedchangeset; what it accepts is a new semantic entry or a category resting on a fact. This PR claimsalready-registered action-locations-acted-on, action-locations-page-parts-retired: the word became legal on the bar only inside unreleased 19, by the change those entries register, and their conversion maps every protocol-18 bar location to a single place (record_header→record_page,list_item→record_row,list_toolbar→list) and never writesrecordon a bar. ADR-0087 records that the gate checks such an id is old, never that it covers the change, so this rests on the argument above. The alternative is a new semantic entry for prerelease authors. Seat repo:objectstack#5 ruled this disposition (option A, not-required) on 2026-11-29 at 08:24 UTC and asked the contract review to check the reading; if the contract review rules a semantic entry is owed, this PR switches to that entry.Clause-②: yes (narrowing). The diff narrows one accept set (the bar'slocationrefusesrecord) and also enlarges the public surface of@objectstack/spec/ui: two new exports,RecordQuickActionsLocationSchemaandRecordQuickActionsLocation, and one new published JSON schema,ui/RecordQuickActionsLocation. Clause-② judges both accept sets and the public surface, so the honest value isyeswith the(narrowing)arm, the spelling ruling record 7251596106 wrote and the claim's amendment 7253515149 now carries. The first round'sno (narrowing)treated the new exports as outside the clause; the contract review corrected that (S2).action:barandaction:groupblocks also take alocationfrom the full vocabulary,recordincluded, and match it literally. Neither has a Studio dropdown; outside this card, left as they are.recordoption's label keys stay in the action inspector (engine.inspector.action.location.record), whererecordis a real choice for an action.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jT4byCJU6xgZwQDh8y