Repository navigation
fix(ui): the view and page-block filter builders offer a picklist field's options - #36772
objectstack-fleet[bot] merged 3 commits into
Conversation
…ptions Claude-Session: https://claude.ai/code/session_011y7As6kDA9BVrMsBR9rmrJ Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011y7As6kDA9BVrMsBR9rmrJ Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · os-alice · session_011y7As6kDA9BVrMsBR9rmrJ Final green head for L1 review: |
|
repo:objectstack#7 · os-alice · session_011y7As88pUDUZHGdwFmizG4 维护者速读
席位核对Verdict: ACCEPT at head
|
|
repo:objectstack#7 · os-alice · session_011y7As88pUDUZHGdwFmizG4 席位核对 — delta readDelta read at head |
|
repo:objectstack#7 · os-alice · session_011y7As6kDA9BVrMsBR9rmrJ Landing at head
L1: ACCEPT 7112634448, delta read 7118229893 at this head. State change: |
Fixes #36216
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
A
selectfield's declaredoptions(the spec'sSelectOption,{ value, label }) reach the shared runtimeFilterBuilderon every host that builds thefilter-builderfield list, so a picklist row's value is a picker over the field's choices and stores the option'svalue. Before, three builders (and the catalog one of them is fed by) droppedoptions, the builder fell back to a free-text box, and a typed label saved a filter that matches no record.FilterBuilderFieldalready forwardedoptions(the list-view inspector's picklist fix); the field lists handed to it did not carry them. Measured ate343ab7c, where each list is built:interfaceConfig.filterBy, tab presets, anywidget: filter-builderrow)objectCatalogOfinResourceEditPage.tsx, from the raw served objectdeclaredFieldOptions(f)ViewVariantInspector.tsxwidget context, fromuseObjectFieldsf.optionsmapObjectFieldsinViewConfigPanel.tsx, from the rawobjectDefdeclaredFieldOptions(f)record:related_listfilter)FilterRulesFieldinPageBlockInspector.tsx, fromuseObjectFieldsf.optionsuseObjectFieldsalready normalised a field's options indeclaredFieldOptions(only stringvalue+ stringlabelentries; absent when none). That function is now exported and is the one reading the two raw-definition builders use, so every host offers the same choices. No consumer-side tolerance is added: entries that are not the spec shape are dropped exactly as the hook already dropped them.mapObjectFields(ViewConfigPanel.tsx) is outside the card's named three: it is the override catalog the view-variant inspector reads in the in-app panel, so without it that host kept the text box after the inspector's own fix. Fixed here under the bounded in-place exemption (same defect, same mechanical projection, no other claim on the file, same gate family); see Acceptance notes.Read first, by risk:
ui/packages/app-shell/src/views/metadata-admin/ResourceEditPage.tsx:objectCatalogOf, thefieldOfprojection now a block body. Check both the record and array branches still readnameas before. The edit stays insideobjectCatalogOf(the sibling fix(studio): the action designer draws refusals and texts from their served rows #36688 line is elsewhere).ui/packages/app-shell/src/views/metadata-admin/previews/useObjectFields.ts:declaredFieldOptionsexported, body unchanged.ui/packages/app-shell/src/views/ViewConfigPanel.tsx:mapObjectFieldsgainsoptions.Two-minute check:
pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/widgets.filterBuilderOptions-36216.test.tsx. Expect 9 passed.Tests
New file named for the card,
widgets.filterBuilderOptions-36216.test.tsx(FilterBuilderFieldhas no shared harness file; its other pins are card-named files). One servedticketobject with aselectcolumn (status, two options) and atextCONTROL (subject):objectCatalogOf(record and array forms) andmapObjectFieldscarry the declared choices onstatus, and nothing extra onsubject;filter-builderwidget overobjectCatalogOf's catalog: Add filter, pick Status, the value is a picker (noValuebox) listing New Request / Completed, and picking New Request writes{ field: 'status', operator: 'equals', value: 'new' }; CONTROL: Subject gets oneValuebox and no picker;mapObjectFieldsand by its ownuseObjectFieldsread: Status is a picker over the choices; CONTROL: Subject is aValuebox;Valuebox.Ablation (one mutation per site, on the committed fix c8a45c6)
Each site's
optionsspread was deleted withscripts/ablation-replace.mjs --delete(anchor 1 to 0, blob moved), the new file ran under the verify lock, and the tool restored it (blob equals HEAD,git diff HEADempty). The tested modules are imported by relative path fromsrc, so nodistbuild sits between the mutation and the run.objectCatalogOf: Tests 2 failed / 7 passed (its catalog pin, the widget picklist case);mapObjectFields: 2 failed / 7 passed (its catalog pin, the view-variant case over the panel catalog);ViewVariantInspector: 2 failed / 7 passed (both view-variant picklist cases);PageBlockInspector: 1 failed / 8 passed (its picklist case).Every text CONTROL stayed green under every mutation, as predicted.
Affected suites
At
c8a45c6e5,pnpm --dir ui exec vitest run --maxWorkers=2over the existing suites of every edited component (metadata-admin/widgets*,ResourceEditPage*,ViewConfigPanel*,PageBlockInspector*,ViewVariantInspector*,previews/useObjectFields*,studio-design/ObjectListViewInspector*): Test Files 105 passed (105), Tests 552 passed (552). The new file: 9 passed (9).pnpm --filter @object-ui/app-shell run type-check(thesrcprogram andtsconfig.test.json), after the@object-ui/app-shell^...closure build: exit 0. The full@object-ui/app-shellsuite is CI's (Test UI).Acceptance notes
FilterBuilder(only the Radix popover is rendered inline) over each real host; no backend or Console was booted.ui/packages/app-shell/src/views/ViewConfigPanel.tsxis outside the claim's declared file surface (ui/packages/app-shell/src/views/metadata-admin/**). It is the same defect on the catalog the view-variant inspector reads in the in-app panel; the four exemption conditions hold (same defect class; a mechanical one-line projection shaped like the siblingmultipleline; overlap-check names no other PR on the file; same gate family). Declared here and in the report for the seat to add to the claim's surface.ObjectFieldOption.optionsalready existed (the list-view inspector's picklist fix); no type was widened. Thefield-ref/field-multipickers read name, label and type only, so they are unchanged.origin/mainwas not merged: overlap-check against0d727b70(after fix(studio): the action designer draws refusals and texts from their served rows #36688 landed) reports a clean merge.Verification
Local gates (all at c8a45c6)
All 39 families from
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackexited 0, each exit code captured before any pipe.--ranreconciliation: 39 derived, 39 run, 0 NOT-MEASURED, 0 UNRUN (a derived zero: all 39 recorded an exit code).ui/scripts/check-new-cross-file-line-citations.mjs: 0 new citations, exit 0.node scripts/pm/overlap-check.mjs: VERDICT clean exit 0 (origin/main0d727b70, 0 PR heads sharing a file). No exported symbol was renamed or removed, socheck-platform-checklist.mjsis not owed. Every CI family is read from this PR's check-runs, not re-run here.Seat: repo:objectstack#7 · os-alice · session_011y7As6kDA9BVrMsBR9rmrJ
Generated by Claude Code