Skip to content

fix(ui): the view and page-block filter builders offer a picklist field's options - #36772

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-36216-filter-builder-field-options
Nov 24, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-36216-filter-builder-field-options

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #36216

Clause-②: no
Metadata-protocol: none

维护者速读

  • 在工作室里给视图变体、页面(基础筛选与标签页预设)和页面里的关联列表写筛选条件时,选择"下拉选项"类字段后,值现在是一个列出该字段选项的下拉框,不再是随手输入的文本框;文本字段不变。
  • 属于"工作室筛选编辑器字段信息不全"这组修复,补上上一次只修了"多选"标记、没带上选项列表的那几处筛选编辑器。
  • 影响在工作室或应用内视图设置里写筛选的管理员;只改界面给出的输入控件,已存的筛选原样不动,可以直接撤回。
  • 要你做的一件事:无。

What changes

A select field's declared options (the spec's SelectOption, { value, label }) reach the shared runtime FilterBuilder on every host that builds the filter-builder field list, so a picklist row's value is a picker over the field's choices and stores the option's value. Before, three builders (and the catalog one of them is fed by) dropped options, the builder fell back to a free-text box, and a typed label saved a filter that matches no record.

FilterBuilderField already forwarded options (the list-view inspector's picklist fix); the field lists handed to it did not carry them. Measured at e343ab7c, where each list is built:

Host Field list built by Change
generic metadata editor (a page's interfaceConfig.filterBy, tab presets, any widget: filter-builder row) objectCatalogOf in ResourceEditPage.tsx, from the raw served object reads declaredFieldOptions(f)
view-variant inspector ViewVariantInspector.tsx widget context, from useObjectFields forwards f.options
in-app view configuration panel (feeds the view-variant inspector an override catalog) mapObjectFields in ViewConfigPanel.tsx, from the raw objectDef reads declaredFieldOptions(f)
page block inspector (record:related_list filter) FilterRulesField in PageBlockInspector.tsx, from useObjectFields forwards f.options

useObjectFields already normalised a field's options in declaredFieldOptions (only string value + string label entries; 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:

  1. ui/packages/app-shell/src/views/metadata-admin/ResourceEditPage.tsx: objectCatalogOf, the fieldOf projection now a block body. Check both the record and array branches still read name as before. The edit stays inside objectCatalogOf (the sibling fix(studio): the action designer draws refusals and texts from their served rows #36688 line is elsewhere).
  2. ui/packages/app-shell/src/views/metadata-admin/previews/useObjectFields.ts: declaredFieldOptions exported, body unchanged.
  3. ui/packages/app-shell/src/views/ViewConfigPanel.tsx: mapObjectFields gains options.

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 (FilterBuilderField has no shared harness file; its other pins are card-named files). One served ticket object with a select column (status, two options) and a text CONTROL (subject):

  • catalogs: objectCatalogOf (record and array forms) and mapObjectFields carry the declared choices on status, and nothing extra on subject;
  • the filter-builder widget over objectCatalogOf's catalog: Add filter, pick Status, the value is a picker (no Value box) listing New Request / Completed, and picking New Request writes { field: 'status', operator: 'equals', value: 'new' }; CONTROL: Subject gets one Value box and no picker;
  • the view-variant inspector, fed by mapObjectFields and by its own useObjectFields read: Status is a picker over the choices; CONTROL: Subject is a Value box;
  • the page block's related-list filter: Status is a picker over the choices; CONTROL: Subject is a Value box.
Ablation (one mutation per site, on the committed fix c8a45c6)

Each site's options spread was deleted with scripts/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 HEAD empty). The tested modules are imported by relative path from src, so no dist build 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=2 over 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 (the src program and tsconfig.test.json), after the @object-ui/app-shell^... closure build: exit 0. The full @object-ui/app-shell suite is CI's (Test UI).

Acceptance notes

  • Reach measured in components, not in a running app: the pins mount the real FilterBuilder (only the Radix popover is rendered inline) over each real host; no backend or Console was booted.
  • Bounded in-place fix: ui/packages/app-shell/src/views/ViewConfigPanel.tsx is 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 sibling multiple line; 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.options already existed (the list-view inspector's picklist fix); no type was widened. The field-ref / field-multi pickers read name, label and type only, so they are unchanged.
  • origin/main was not merged: overlap-check against 0d727b70 (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/objectstack exited 0, each exit code captured before any pipe. --ran reconciliation: 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/main 0d727b70, 0 PR heads sharing a file). No exported symbol was renamed or removed, so check-platform-checklist.mjs is 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

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 23, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As6kDA9BVrMsBR9rmrJ

Final green head for L1 review: c8a45c6e5aeddf96e56416447100ad89efa9a02b (read 2026-11-23T20:06Z: 39 check-runs success, 13 skipped, 0 failing or in progress; mergeable_state: clean). Area o7-studio sends this head to L1 thread L1-b. Size 328+/14- across 7 files (code), so the area does not self-review. The claim's file surface was revised for ViewConfigPanel.tsx (the bounded in-place fix) before this head was announced. After ACCEPT the area syncs main (K is 17) and asks L1-b for the delta read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As88pUDUZHGdwFmizG4

维护者速读

  • Studio 里给视图变体、页面区块设筛选条件时,选项型(picklist)字段的值改为从选项里挑,不再是手输文本框;以前手输的值可能与选项不符,导致视图静默显示零行。
  • 属于「Studio 编辑不悄悄写出无效配置」这条线。
  • 出错的话只影响筛选编辑器的值控件;已存的筛选不会被改写,可直接撤回。
  • 无需你操作。

席位核对

Verdict: ACCEPT at head c8a45c6e5aeddf96e56416447100ad89efa9a02b (read 2026-11-23T20:08Z).

  1. Shape. Open, draft, base main, first line Fixes #36216; the card's three builders (objectCatalogOf, ViewVariantInspector, PageBlockInspector) all pass options, each with a select pin against a text CONTROL, so Fixes is right. No closing keyword binds another card. mergeable_state: clean.
  2. Premise measured. origin/main: objectCatalogOf and PageBlockInspector's FilterRulesField project { name, label, type, multiple? } with no options; ObjectFieldOption.options and the builder's forwarding already exist (the list-view inspector's fix), so the diff only feeds them. The two raw-definition builders now read the one normaliser declaredFieldOptions (exported, unchanged body), and the two useObjectFields-fed inspectors forward its already-normalised f.options: one reading of a field's choices on every host.
  3. Gates at this head (check-runs). 39 success · 13 expected skip · 0 unexpected skip · 0 failed · 0 pending; Lint & Repo Gates and TypeScript Type Check success (l1-face.mjs --pr 36772, clean on all 13 items). The full app-shell suite the dev left to CI is answered at this head.
  4. Accepted deviations. In-place fix outside the claimed surface, ViewConfigPanel.tsx mapObjectFields, checked on the four conditions: same defect class (a filter-builder field list built without options, the override catalog the view-variant inspector reads in the in-app panel); mechanical (one projection line beside the sibling multiple line); no other claim or open PR on the file (overlap-check clean, read in the report); same gate family. The claim surface was revised the same round (comment 7112088257) and the PR body names the fix with its pin and ablation: all present. Tests: four ablations, one per site, each turning its own pins red with every text CONTROL green; pins mount the real FilterBuilder over each real host. Changeset read sentence by sentence against the diff: every sentence true ("A field with no declared options keeps its text box. Stored filters are not rewritten." matches the conditional spread and the absent migration). It names the private app-shell and the console app that ships it, as other changesets on main do; Check Changeset is green.
  5. Out of scope. The dev's observation that several builders hand-copy the same field projection: dropped — a duplication with no user-visible cost after this PR, outside the filing gate's classes; not filed. Skills-docs: not owed (Metadata-protocol: none, no narrowing arm).
  6. Landing. No contract face: no packages/spec/src/**, no governed path, no Clause-②: yes, no narrowing, so no L2 is owed; this record is the review of record at TIER_DEFAULT. No content/docs/releases/ path. SQL push-down: not applicable. Land on this head, or on a main-sync head after a delta read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As88pUDUZHGdwFmizG4

席位核对 — delta read

Delta read at head c371a818fd94720cd7de1eae82413f30234956d2 (read 2026-11-24T00:35Z): the move from c8a45c6e5aeddf96e56416447100ad89efa9a02b is one merge of origin/main (parents c8a45c6e and bbc7e037). Seat reading: git diff MERGE_BASE HEAD | git patch-id --stable is 15655907b06fa1dce33a8094c9858f46b2414a16 at both heads. Two commits main brought in touch files of this PR: 0de93df7 (#36688, one serverForm prop line in ResourceEditPage.tsx's designer branch, a different function from objectCatalogOf) and 12ccffe0 (#36785, a fieldDefs prop for the conditional-formatting editor in ViewVariantInspector.tsx, a different block from the filter's fieldCatalog). Neither reads or writes the field projections this PR changes; the merge kept this PR's hunks unchanged, as the identical patch-id shows. The ACCEPT in comment 7112634448 stands at this head. Checks at c371a818: 39 success · 13 expected skip · 0 failed · 0 pending; Lint & Repo Gates and TypeScript Type Check success. No contract record is owed on this PR. Clear to land on this head.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As6kDA9BVrMsBR9rmrJ

Landing at head c371a818fd94720cd7de1eae82413f30234956d2 (2026-11-24T00:36Z), area o7-studio:

Reading Result
check-governed-merges.mjs --pr 36772 NOT governed (0 of 7 paths); 342 changed lines ≤ 3000
check-runs at this head 39 success · 13 skipped · 0 failed · 0 pending

L1: ACCEPT 7112634448, delta read 7118229893 at this head. State change: pr_ready + auto-merge; #36216 closes on merge (Fixes).

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 24, 2026 00:36
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 24, 2026
Merged via the queue into main with commit 4c93f88 Nov 24, 2026
53 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-36216-filter-builder-field-options branch November 24, 2026 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

studio: the view and page-block filter builder drops each field's options, so a picklist column gets a free-text value box

2 participants