Repository navigation
docs(spec): describe objectui's normaliseOptions as it is at the console pin - #24072
objectstack-fleet[bot] wants to merge 3 commits into
Conversation
…ole pin
The ActionParam options docblock, the comment above its guidance table and
one action.test.ts comment said objectui's normaliseOptions rebuilds each
inherited option as { label, value }. At the console pin (.objectui-sha
f8267df93aba) it returns { ...raw, label, value: raw.value }
(packages/fields/src/resolveActionParams.ts:515), so inherited keys survive
the resolver. The comments now say so, and give the remaining reason the
guidance does not prescribe inheriting: no reader of color / icon /
disabled on the inherited path is measured from this repo.
Comments only: no guidance string, schema, export or message changes.
Claude-Session: https://claude.ai/code/session_01LFqdRsuM5nkqoJdHd5ztVk
Co-authored-by: Claude <noreply@anthropic.com>
…ns comments @objectstack/spec ships src/**/*.zod.ts in its files[], so the rewritten comments in src/ui/action.zod.ts reach the published tarball verbatim. Claude-Session: https://claude.ai/code/session_01LFqdRsuM5nkqoJdHd5ztVk Co-authored-by: Claude <noreply@anthropic.com>
…tion-param-options-comments
📓 Docs Drift CheckThis PR changes 1 package(s): ⛔ 2 release-owned page(s) name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 142 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 dd586522046f69f9dfa3840c87b6a76e747fd7a9 && git checkout dd586522046f69f9dfa3840c87b6a76e747fd7a9
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 8133cc78052c95b6efd59487b64fe78f69860759 c89eef4e3be9f3f2e58d52a286513a56b1aec0f1 && git checkout -B drift-repro 8133cc78052c95b6efd59487b64fe78f69860759 && git merge --no-ff c89eef4e3be9f3f2e58d52a286513a56b1aec0f1
node scripts/docs-audit/affected-docs.mjs --json 8133cc78052c95b6efd59487b64fe78f69860759
|
Fixes #24047
Clause-②: no
What changes
Three comments in
packages/specstill said that objectui'snormaliseOptionsrebuilds each option a field-backed action param inherits as a bare{ label, value }pair. At the console pin it keeps every key by spread. This PR rewrites the three comments and adds a prose-only changeset. Nothing else changes.packages/spec/src/ui/action.zod.ts, theActionParamoptionsdocblock. The paragraph that began "What this does NOT fix" said the drop "is tracked in objectui". It now describes objectui at the pin, with file, lines and pin sha. It also gives the reason that is still true for the guidance not prescribing "make it field-backed and inherit": the keys survive the resolver, but nothing in this repo measures a reader ofcolor,iconordisabledon the inherited path.packages/spec/src/ui/action.zod.ts, the comment above the option shape'sguidancetable. Same correction. It points at the docblock for the pin and line.packages/spec/src/ui/action.test.ts, the comment insidekeeps each rejection pointing at where that vocabulary IS real. Same correction..changeset/24047-action-param-options-comments.md:'@objectstack/spec': patch, prose only (see "Changeset" below).No
guidancestring, schema, export or message text changes. All 34 changed lines inpackages/specare*or//comment lines. The mechanical check is under Verification.The pin reading
.objectui-sha=f8267df93aba8fb09cc1cc0692eadc0c8c5a5e56. I read the files withgit show PIN:PATHfrom the local objectui object store.packages/fields/src/resolveActionParams.ts:503declaresnormaliseOptions. Line:515isreturn { ...raw, label, value: raw.value };.:650-:651hold the field-backed branch,authoredOptions ?? normaliseOptions(field.options, ownerName, param.field, ctx.fieldOptionLabel). An authored list still wins over the inherited one.:241is in theresolveOptionLabelsdocblock. It names objectuifbc23e094as the change that madenormaliseOptionskeep keys.The card quoted
:503at objectuimain94b2489f. At the pin the return is on:515, the line the claim also read.Readers on the inherited path: a source read at the pin, not a runtime measurement
The card asked for any reader measurement to go here, not into a comment. I read the dialog path at the same pin:
packages/app-shell/src/views/ActionParamDialog.tsx:536re-spreads each option to localise its label ({ ...o, label: pickLocalized(o.label, language) }). Inherited keys survive this step as well.packages/app-shell/src/utils/paramToField.ts:102passesoptions: param.optionsinto the widget's field metadata unchanged.The four option widgets build each option from
valueandoptionDisplayLabel(option)and nothing else:packages/fields/src/widgets/SelectField.tsx:227-230MultiSelectField.tsx:191-206RadioField.tsx:134-145CheckboxesField.tsx:152-168optionDisplayLabel(packages/core/src/evaluator/optionRules.ts:173) reads onlylabelandvalue. Eachdisabledin those four files is the field-levelprops.disabled(SelectField.tsx:213,MultiSelectField.tsx:201,RadioField.tsx:129,CheckboxesField.tsx:163), never a per-option one. None of the four files readscolororicon.So at the pin, an inherited option's
color,iconanddisabledreach the widget, and none of the four widgets reads them. That matches the currentguidancetexts, so this PR proposes noguidancechange; the card puts any such change on a card of its own anyway. This reading has limits. It is a static source read of the four widgets the docblock already names, not a rendered dialog, and no test in this repo pins it. For that reason the comments say "not measured from this repo" and do not say "no reader".Changeset
The card allowed no changeset, or a prose-only
patchchangeset if a gate requires one.Check Changesetrequires either a changeset or theskip-changesetlabel.@objectstack/spec'sfilesarray shipssrc/**/*.zod.ts, so the rewritten docblock insrc/ui/action.zod.tsgoes into the published tarball verbatim. "Publishes nothing" would therefore be false, and the changeset is the accurate declaration. Its body carriesClause-②: no.Verification
All readings below are on the final head
c89eef4e3b(the merge ofmain) unless marked otherwise. Build and test ran throughscripts/pm/os-verify-lock.sh, and each exit code was captured before any pipe.pnpm --filter @objectstack/spec build: exit 0.pnpm --filter @objectstack/spec exec vitest run --project local --maxWorkers=2: exit 0,Test Files 692 passed (692),Tests 20952 passed | 1 todo (20953).pnpm --filter @objectstack/spec typecheck: exit 0, endingcheck:test-typecheck: OK.action.test.tsalone with--reporter=verbose, on the pre-merge head56ad5cf153:Tests 150 passed (150), includingkeeps each rejection pointing at where that vocabulary IS real.pnpm --filter @objectstack/spec check:generated: exit 0,All 14 generated artifacts are up to date. The rewritten docblock reaches no generated artifact.check:api-surfacereportspublic API surface + factory signatures unchanged, andcheck:docsreports227 generated files in sync.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 85 commands. All 85 exit 0.--ranreconciliation:85 derived, 85 run, 0 NOT-MEASURED, 0 UNRUN. Among them,check:nul-bytesreports OK,check-empty-changesetreports 1 declaring changeset added, andcheck-changeset-no-majorreports nomajorbump.PREREQUISITE NOT MET:check:doc-formula-expressions,check:dual-build-cjs-loads,check:lean-entry-closure), because their input packages were not built. After a build of@objectstack/formula,@objectstack/lintand@objectstack/objectql, all three exit 0 on the final head.node scripts/check-dev-prereqs.mjs: exit 0.git diff -U0 origin/main...HEAD -- packages/spechas 34 changed lines, and 0 of them start with anything other than*or//. A control-byte scan of the three files finds nothing.test:repo(Test Core), the type-check lanes, and the familiesdispatch-gateslists outside its runnable set.origin/mainhas gained twopackages/lint-only commits. Neither touches the three files here.Acceptance notes
packages/spec/CHANGELOG.mdstill describes the old drop in two entries (lines 40254 and 73939). Both are release-owned history. AGENTS.md routes any change to a released entry through a dedicated docs-only PR, so this PR leaves them as they are.optionsdocblock has avisibleWhenbullet that says objectui's inline branch "doesoptions: param.options". At the pin, the inline branch returnsoptions: authoredOptions(resolveActionParams.ts:574), which isresolveOptionLabels(param.options, ctx.locale). That call returns the list untouched when every label is already a string, and rebuilds it by spread otherwise. So the bullet's point, that the list is lowered verbatim, still holds; only the quoted expression is out of date. The claim's file surface names only the two comment blocks above, so this PR does not edit the bullet. Carrier: none.Deviations
git push, onepr_createand the report comment, and no label write.mainwas merged once before this PR opened (c89eef4e3b), as AGENTS.md section 10 asks. The incoming commits do not touch any of the three files. Spec was rebuilt and re-verified on the merged head.Generated by Claude Code