Repository navigation
fix(console): Studio condition editors list fields by their label - #35296
Merged
objectstack-fleet[bot] merged 8 commits intoNov 19, 2026
Merged
Conversation
ConditionBuilder's labelSubjects now defaults to true, so the hook, action, page-block and generic widget condition mounts name a field subject by its label with its CEL spelling as the hint. A label that only repeats the field name reads as the spelling alone. Claude-Session: https://claude.ai/code/session_01ADHkmRcktQEQx7ViBAPoK5 Co-authored-by: Claude <noreply@anthropic.com>
…ndition-label-first
…bel-first name The subject dropdown now names a field by its label with the CEL spelling as the hint, so the pins that found or listed options by bare spelling read the spelling from the hint, or find the option by its label-first accessible name. The changeset carries the claim's Clause-② line verbatim. Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY Co-authored-by: Claude <noreply@anthropic.com>
…bjects Handing the file's mount helper an undefined took the helper's own default and passed true explicitly, so the builder's default was never read: the pin stayed green with the default flipped back off. Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY Co-authored-by: Claude <noreply@anthropic.com>
…t collection Each test file this change edits reaches a dynamic import of @objectstack/lint, @objectstack/formula or @object-ui/core through the builder; a module-top side-effect import pays that load during collection, as check:test-source-alias asks of every edited file. Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY Co-authored-by: Claude <noreply@anthropic.com>
…name-only rule labelOf returns string | undefined, so reading it twice left tFormat's argument typed as possibly undefined; read it once into a local. Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY Co-authored-by: Claude <noreply@anthropic.com>
…e context WidgetContext requires conditionScope; the pin declares the record scope a record-scoped host hands down, so the test program type-checks. Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY Final head for L1:
|
Contributor
Author
|
repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4 维护者速读
席位核对 — ACCEPT (L1-a) · repo:objectstack#5 · head
|
Contributor
Author
|
repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY Landing · area ux-1 · 2026-11-19T03:38Z
ACCEPT 6998618448 (L1-a) at |
objectstack-fleet
Bot
deleted the
claude/issue-34122-condition-label-first
branch
November 19, 2026 03:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Bill · project thread
Fixes #34122
Clause-②: no (
@object-ui/app-shellis"private": true; flipping thelabelSubjectsdefault reaches no published export)Metadata-protocol: none
维护者速读
ConditionBuilder的labelSubjects默认值翻为开启。status这类机器名,与流程「进入条件」和对象校验已有的标签显示不一致,作者要猜字段。false(一行)。没有标签、或标签与字段名相同的字段仍显示机器名。ConditionBuilder.tsx中labelSubjects = true默认值与labelOf那段;ConditionBuilder.mountScope.test.tsx末尾的四个挂载点用例;ConditionBuilder.subjectVocabulary.test.tsx的spellingOf(被迫改动的旧用例)。pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/inspectors/ConditionBuilder.mountScope.test.tsx,预期全部通过,含 "every mount names a field subject by its label" 四例。What changes
ConditionBuilder'slabelSubjectsnow defaults totrue, so every remaining mount names a field subject by its label with its CEL spelling as the hint (ux-conventions.labels-over-machine-names). A field with no label, or whose label only repeats its name (the object-field catalog fills an unlabelled field's label with its name), reads as its spelling alone. The compiled CEL is unchanged.The default-flip decision (the card's Ask): flip it. Every
ConditionBuildermount in the tree (git grep '<ConditionBuilder' ui/) lists the fields of a known object, so no mount needs the spelling primary; a future mount whose subjects are not object fields passeslabelSubjects={false}and says why at the mount (the prop's doc says so).Per mount, the subject read:
ActionDefaultInspector"Visible when" / "Disabled when"objectName= the action's object, catalog byuseObjectFieldsHookDefaultInspectorconditionobjectName= the hook's objectPageBlockInspector"Visible when"objectName= the record page's object; a page with no object offers no field subjectswidgets.tsxConditionWidgetcontext.objectFields, the bound object's catalog the host loadsFlowNodeConfigFieldentry condition,ObjectValidationsPanellabelSubjectsForced edits to existing pins
Each found or listed a subject by bare spelling, which the label-first option no longer renders as its whole text:
ConditionBuilder.contextSubjects.test.tsx"offers only subjects the record scope ACCEPTS": the option reader now reads the spelling hint, so the catalog field is filtered out of the context half by spelling as before.ConditionBuilder.nullGuard-27513.test.tsx"the card flow": picksEstimated Hours record.estimated_hours.ConditionBuilder.typedEmptyOps-11894.test.tsx"Add condition seeds equals": picksDue date record.due_date.ConditionBuilder.subjectVocabulary.test.tsx: thesubjectOptionsreader reads each option's spelling through aspellingOfhelper (the convention the flow-entry pins already use), which turns green "offers record.FIELD for the catalog…", "fieldPrefix: '' declares a flattened scope" and "includePrevious offers previous.FIELD…"; "COMPILES a chosen subject" picksAmount record.amount. The same reader keeps "hides hidden fields" and "offers no previous.* subject by default" meaningful: against label-first text their spelling negatives would have passed whatever the builder offered.Also in this branch
subjectLabels-27521default pin renders the builder with nolabelSubjectsprop at all: routed through the file'smounthelper, anundefinedtook the helper's own default and passedtrue, so the pin stayed green with the default flipped back off (measured by the ablation below).previous.FIELDlabels readlabelOfonce into a local, which the package type-check required.WidgetContext(conditionScope: 'record').check:test-source-aliasasks of edited files.Tests
New pins (one per changed mount, each with a CONTROL): action "Visible when", action "Disabled when", hook condition and record page block "Visible when" in
ConditionBuilder.mountScope.test.tsx; the generic widget inConditionWidget.conditionSubjects.test.tsx; the builder default and the name-only-label rule inConditionBuilder.subjectLabels-27521.test.tsx. Each finds the option by its label-first accessible name (Status record.status) and asserts the hint is the spelling; the CONTROL finds the unlabelled field by spelling with no hint.Acceptance notes
FlowNodeConfigFieldandObjectValidationsPanelstill passlabelSubjectsexplicitly; it now restates the default. Left in place (ObjectValidationsPanelis outside this card's file surface).test:repo, the full lint farm,check:type-check-debtandLint UIare CI's: not run locally.Verification
All readings below are on head
b6d441814bunless a block names another.Wide run — the whole
@object-ui/app-shellpackage, type-check + tests (head b6d4418)bash scripts/pm/os-verify-lock.sh -c "pnpm --filter @object-ui/app-shell run type-check && cd ui && pnpm exec vitest run --maxWorkers=2 packages/app-shell/"type-checkis both programs (tsc --noEmitandtsc -p tsconfig.test.json); the two earlier wide attempts went red there, which is what thelabelOflocal and the completeWidgetContextcommits fix.Targeted run before the forced edits (head 359883a) and after (head c31d3c8)
Before (the resume head merged with main):
Test Files 4 failed | 13 passed (17),Tests 7 failed | 171 passed (178)— exactly the seven pins listed above. After the forced edits:Test Files 17 passed (17),Tests 178 passed (178).Ablations ran on head
060a33c371(the final head only adds a local in theprevious.FIELDlabel and a test-context key since).Ablation 1 — default flipped back to false (anchor
labelSubjects = true, verdictPath })Mutation landed by
scripts/ablation-replace.mjs(anchor 1 → 0, blob40845f46e22b→ed604132839a), 8 files run:Test Files 6 failed | 2 passed (8),Tests 9 failed | 100 passed (109). Red: the four mount pins, the widget pin, the 27521 default pin, and the three forced-edit pickers (nullGuard, typedEmptyOps, COMPILES). Every CONTROL stayed green. Restored: blob == HEAD (40845f46e22b),git diff HEADempty.Ablation 2 — a label that repeats the name counts as a label (anchor
(f.label && f.label !== f.name ? f.label : undefined)→(f.label))Mutation landed (blob
40845f46e22b→0ba9b3f964d0):Test Files 2 failed | 1 passed (3),Tests 5 failed | 25 passed (30). Red: the four mount pins (their CONTROLcodefield arrives from the catalog labelledcode) and the 27521 name-only pin. Restored: blob == HEAD,git diff HEADempty.Derived gate families (dispatch-gates --commands, head b6d4418)
All 38 derived families exit 0, including
check:test-source-alias,check:nul-bytes,check:cross-package-test-inputs,check:type-check-coverage,check:type-check-debtandpnpm --dir ui exec vitest run scripts/(Test Files 171 passed | 2 skipped (173)). Reconciliation:Also
pnpm --dir ui check:new-line-citations:0 new citation(s).node scripts/pm/overlap-check.mjsbefore each push:VERDICT clean exit 0.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY