Skip to content

feat(plugin-list): the shared field list, quick filter values and condition chip row, not yet mounted - #35622

Merged
objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/issue-35549-list-filter-sort
Nov 19, 2026
Merged

objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/issue-35549-list-filter-sort

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread
Part of #35549
Part of #35550

repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:用户无感。列表页新的筛选和排序部件(可搜索的字段清单、按字段类型选值、视图栏下的条件标签行)先合进代码,第二步接到列表上以后才会出现。
  • 为什么做:属于「列表页重做」专题的筛选和排序两张子卡。您要求按参照产品重做筛选和排序的过程,席位定为两步:这一步只合不改变行为的部件。
  • 出错会怎样:这一步没有任何页面用到这些部件,出错不影响现在的列表,可以直接撤回。
  • 要你做什么:无。

What changes

This is step 1 of 2, ruled by the seat in claim amendment 7017578497 on the filter card. It adds components and locale keys only. No list mounts them yet, so this PR changes no behaviour. Step 2 wires them in.

  • ui/packages/plugin-list/src/conditions/FieldList.tsx: the shared field list. It has a search box over label and name, the fields the view shows first (in column order), then the hidden ones, a type icon on each row, and ArrowUp/ArrowDown/Enter. Filter and sort both use it, and the options card can reuse it.

  • FilterValuePanel.tsx: one condition's values, by field type.

    • Option field: a coloured multi-pick, default operator in.
    • Lookup: the existing LookupValuePicker.
    • Text: contains, sent 250 ms after the last keystroke.
    • Number: at least / at most / equals / between.
    • Date: four of the spec's DATE_RANGE_PRESET_MACRO_WINDOWS (today, this week, this month, last 30 days) plus a custom range.
    • Boolean: yes / no.

    The operator sits on top and can be changed at any point. Every pick hands the row back at once; there is no Apply.

  • ListConditionControls.tsx: three controlled components.

    • FilterPanel: field list, then values. Its footer opens the host's advanced panel (renderAdvanced, today's FilterBuilder, unchanged). An OR group opens the advanced panel directly.
    • SortPanel: the direction on top, then the field list. One click adds a level, or sets the direction of a level that already exists.
    • ConditionChipRow: sort chips first (a click reverses, a drag or Alt+Arrow reorders, × removes). Then the view's own conditions as locked chips with no ×. Then the reader's filter chips (a click reopens the values, × removes). Then 「Add filter」 and 「Reset」. It renders null when it has nothing to show, so the host's slot keeps empty:hidden.
  • conditionModel.ts: pure helpers. conditionTranslations.ts: a safe-translation hook with literal keys.

  • The 11 locale packs gain a listConditions namespace. zh-Hant.ts is generated by gen:zh-hant.

  • One allowlist line in untranslated-identity-4376.test.ts: listConditions.chips.pattern ({{field}}: {{value}}) is a format string and reads the same in ko/ru/ar. The precedent is console.assignedWork.failure.

  • The changeset is @object-ui/i18n patch only. @object-ui/plugin-list ships nothing new: after pnpm --filter @object-ui/plugin-list build, dist has 0 files with condition-chips / listConditions., while the positive control toolbar-filter-trigger hits 2.

No storage-format, uf_* or server-sort change. A quick filter writes ordinary FilterBuilderRowGroup rows. A sort chip edits the same SortItem[] that the column header writes.

Step 2 (separate PR, after the list-frame card lands)

Branch claude/issue-35549-list-filter-sort-wiring carries Fixes for both cards and contains:

  • In ListView.tsx, only at the list-frame card's list-condition-row slot and the Filter/Sort trigger targets:
    • the 「Filter」 popover opens FilterPanel, with today's FilterBuilder behind its 「Advanced filter」 footer and its props unchanged;
    • the 「Sort」 popover opens SortPanel;
    • ConditionChipRow fills the slot. Its 「Reset」 covers filter and sort only. The 「Personalized」 badge stays as it is.
  • Migration of the existing filter/sort popover tests. Expected, not measured: ListView filterFieldList-11810, filterDatePicker-12743, filterFieldRead-11925, storedRuleDialect-11533, sortFieldRead-11943, sortRemovableOnly-11943, relationalSort, sortFieldFallback, sortPersistLeak, restoreViewDefaults-28948, headerSort, phoneSortSearch-28911, toolbarRows-27520, toolbarAccessibleNames-12500, toolbarIconButtons-12695, emptyStateClearFilters-28908, personalization-28950; live e2e user-filters, saved-view-filter.
  • The platform-checklist filter and sort items.
  • Dropping the advanced panel's 「Where」 label: filterBuilder.where is retired and its testKey moves.
  • The Playwright geometry/interaction spec ui/e2e/list-condition-row-35549.spec.ts. It is already written, and it passed 3/3 in Chromium against these components at b356ac5a18. It covers: the CONTROL row takes 0 px; Filter → Stage → Negotiation in 3 clicks with the count going 12 → 3; Sort → Descending → Amount in 3 clicks; a real drag reordering two levels; Reset.

Header-click sort needs no grid change. handleHeaderSort already writes currentSort, which the chips read.

Tests

Tests migrated or retired: none in this PR, since nothing existing changes behaviour; the list for step 2 is above. Platform-checklist items edited: none in this PR; step 2 edits them.

New file: plugin-list/src/conditions/__tests__/listConditions.test.tsx, with 28 tests. Each acceptance item is a test:

  • From the trigger, a stage filter takes 3 clicks, and two stages take 4.
  • The group goes up on each pick, and an unfinished row is held back.
  • The chip reads 「Stage: Negotiation, Proposal」, reopens its values ticked, and × removes it.
  • View conditions are locked chips with no button.
  • No 「Where」 or 「其中」 appears.
  • Sort: from the trigger, amount descending takes 3 clicks; the direction is worded by type; a drag reorders two levels; Reset is disabled while the list matches the view.
  • CONTROL: the row renders nothing.
Test and type-check readings at 7892cab
  • pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-list/src/conditions/ packages/i18n/src/__tests__/ gave Test Files 105 passed (105), Tests 1984 passed | 13 skipped (1997).

  • pnpm --filter @object-ui/plugin-list type-check and pnpm --filter @object-ui/i18n type-check both exit 0. tsconfig.test.json --listFiles includes the 6 src/conditions files.

  • Ablation went through scripts/ablation-replace.mjs. Each mutation landed (anchor 1 → 0), and each restore matched the HEAD blob with git diff HEAD empty.

    • (a) The panel never hands the row up: vitest 5 failed.
    • (b) The empty-row return null is turned off: vitest 2 failed (CONTROL and the unfinished row).
    • (c) The sort drag is a no-op: vitest 1 failed.

    The same three mutations each turned the Playwright spec red as well (2, 3 and 1 failed).

Acceptance notes

  • In this PR the components are unreachable from any page, so there is nothing to see in the Console yet.
  • The seat ratified the five extra files under conditions/ (claim amendment 7017578497).
  • Head 1636c1c has 7892cab's tree byte for byte (git diff 7892cab41a 1636c1c2d5 is empty). It reverts e5ee237 and 620ea09, the field-list manager props for the Options → Fields card, which move to a stacked PR so this one stays under the 3,000-line line. The readings below were taken on that same tree.

Verification

Files to read first, by risk:

  1. ListConditionControls.tsx (FilterPanel.commit): a row reaches the host only once it filters, and is removed when its last value goes.
  2. conditionModel.ts (readViewConditions): which shapes of the view's own filter become locked chips.
  3. FilterValuePanel.tsx (DateValues): the date windows are the spec preset macros, not invented ones.

Two-minute check: pnpm --dir ui exec vitest run packages/plugin-list/src/conditions/ should end with Tests 28 passed (28).

Gates at 7892cab
  • node scripts/pm/dispatch-gates.mjs --commands derived 40 families. All 40 ran locally and exited 0.
  • --ran reconciliation: 「40 derived famil(ies) accounted for — 40 run, 0 NOT-MEASURED (a DERIVED zero …)」.
  • node scripts/pm/overlap-check.mjs exited 0 with VERDICT clean. It merges cleanly with origin/main and with feat(console): list page frame — 44px page bar, 40px view bar, denser grid, per-column totals #35615 (the list-frame PR, which shares the 11 locale files).
  • The merged tree's zh-Hant.ts equals the generator's output from the merged zh-Hans.ts.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY

…dition chip row, not yet mounted

The components under plugin-list/src/conditions/ and the listConditions
locale keys. Nothing in the list mounts them yet.

Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 19, 2026
FieldList takes the Options → Fields props as optional ones: order and
onOrderChange (drag, or a grip handle and the arrow keys), onHide (an eye
toggle on each shown row), onShow (one click on a hidden row), addable and
onAdd (fields that are not columns yet, under the hidden ones), and
searchPlaceholder. Every change is handed back at once. Without them the
list picks a field exactly as the filter and sort panels use it.

Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY
Co-authored-by: Claude <noreply@anthropic.com>
…space now carries

Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY
Co-authored-by: Claude <noreply@anthropic.com>
Reverts e5ee237 and 620ea09. The props move to their own stacked
PR so this one stays under the 3,000-line human-merge line; the tree is
back to 7892cab.

Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY

Final head for L1: 1636c1c2d5015232db2caf66017ac4690e748cbb · 2026-11-19T19:45Z

  • CI on this head: 46 success, 15 skipped, 0 failed. One PR-body guard run was cancelled by a body patch; its rerun on this head succeeded. check-governed-merges --pr 35622: not governed, 2,688 lines (+2,688 / −0, 19 files). Clause-②: no · Metadata-protocol: none. Part of #35549, Part of #35550.
  • Size history: ux-3's FieldList props (620ea09 and e5ee237) took the PR to +3,148. The seat ruled no PR may cross 3,000, so they are reverted here (no force-push). This head's tree equals 7892cab's: git diff --shortstat 7892cab41a 1636c1c2d5 is empty. The props move to PR 2 or to a stacked PR 1b.
  • K was 20, so the update-branch relay merged main in. Landing head 22aab9431eeff6981a89e92315533d7cdabffa22 is that main merge only; its CI is read at landing.
  • PR 1 of 2, ruled in claim amendment 7017578497: new components and locale keys only, with nothing mounted, so behaviour does not change. The plugin-list dist has 0 hits for the new symbols, against 2 for the positive control.
  • The new files sit under ui/packages/plugin-list/src/conditions/:
    • FieldList.tsx: the epic's shared field picker. A search box, the view's shown fields in column order, then hidden fields, type icons, and ArrowUp/ArrowDown/Enter.
    • FilterValuePanel.tsx: values by field type. Coloured multi-pick for options (default "is any of"), lookup records, text "contains" after 250 ms, number ≥ / ≤ / = / between, date windows from the spec presets plus a custom range, and yes/no. The operator sits on top, and every pick applies at once.
    • ListConditionControls.tsx:
      • FilterPanel: the field list, then values, with an 「高级筛选」 footer that opens the unchanged FilterBuilder;
      • SortPanel: direction on top, then the field list;
      • ConditionChipRow: sort chips first, the view's own conditions as locked chips, then the reader's filter chips, 「+ 添加筛选」 and 「重置」. It renders null when empty.
    • conditionModel.ts and conditionTranslations.ts.
    • The listConditions locale namespace is added in all 11 packs, plus a one-line allowlist entry in untranslated-identity-4376.test.ts.
  • Tests: listConditions.test.tsx has 28 tests. Locked vitest gives 105 files / 1,984 tests, and the plugin-list and i18n type-checks exit 0. Ablation (os-dev report 7018166004): instant apply off → 5 red, the empty-row guard off → 2, the drag no-op → 1. Each was restored with blob == HEAD. dispatch-gates --commands: 40 run, 0 not measured.
  • No storage-format, uf_* or server-sort change. Quick rows are ordinary FilterBuilderRowGroup rows, and sort chips edit the same SortItem[] that the header click writes.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4

维护者速读

  • 用户能看到什么变化:没有。列表新的筛选、排序部件和各语言文字先进代码,下一步接到列表上之后才会出现。
  • 为什么做:列表页重做专题里筛选和排序两张卡,席位定为分两步合并,这是第一步。
  • 出错会怎样:没有页面用到这些部件,影响不到现有列表,可以直接撤回。
  • 要你做什么:无。
  • 席位意见:通过;最新这次合并主干后的检查跑完全绿,区域就可以合并。

席位核对

L1-a: ACCEPT, one item before queueing · landing head 22aab9431eeff6981a89e92315533d7cdabffa22 (a clean merge of main over the reviewed head 1636c1c2d5) · Part of #35549, #35550 · K=0 · merge-tree clean · not governed (0 hits) · 2,688 lines, under 3,000 · 2026-11-19T19:47Z

Shape. 19 files, +2,688 / −0, all additions:

  • six new files under ui/packages/plugin-list/src/conditions/;
  • listConditions in the 11 locale packs, 62 lines each;
  • one allowlist line;
  • the changeset.

git diff 7892cab41a 1636c1c2d5 is empty, so the revert of the field-manager props leaves exactly the first commit's tree, as the relay says.

No behaviour change: holds. Nothing outside src/conditions/ imports from it: git grep "conditions/" over plugin-list/src returns only the directory's own files. The PR body's build check, 0 dist files with listConditions. against 2 for the positive control, agrees. The changeset grades only @object-ui/i18n patch and says "Nothing reads them yet", which fits a key-only addition.

Claim surface: holds. Amendment 7017578497 on #35549 names the src/conditions/ files, including the shared FieldList.tsx (it says ListControls; the file is ListConditionControls.tsx, the same item) and the allowlist line. The locale packs and .changeset/ are in the original claim 7016170973. Nothing in the diff touches the ⛔ files: ListView.tsx, ObjectView.tsx, ViewSettingsPopover.tsx, the #35548 files, and packages/spec/**. ListView.tsx is named for PR 2 only, after #35548 merges.

Pins. listConditions.test.tsx has 31 cells in 6 describes. The CONTROL cell checks that the chip row draws nothing with no sort, view condition or filter, the empty:hidden contract the frame slot relies on. Other cells cover:

  • the locked view-condition chip with no ×;
  • an OR group as one chip that opens the advanced panel;
  • a drag reorder of two sort levels;
  • never says 「Where」 / 「其中」.

No dangerouslySetInnerHTML, no as any. The allowlist entry follows the console.assignedWork.failure precedent, a format string of holes and a colon.

Size split. It is 1 of 2 by the seat's amendment, and both cards' Fixes lines travel together on PR 2, which fits the 17:01Z "one PR per related pair" reading. Nothing was split for no reason.

R1 (before queueing): CI green on 22aab9431e. At this reading: 5 success, 13 skipped, 18 in progress. The reviewed head 1636c1c2d5 showed 46 success, 15 skipped, and one cancelled: the PR-body guards, superseded by the push. That guard must pass on the landing head too.

Routing. Clause-② no, no packages/spec face, not governed: ux-1 lands it once R1 is met. No L2.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY

Landing · area ux-1 · 2026-11-19T20:07Z

Reading Value
check-governed-merges --pr 35622 not governed, 2,688 lines → ordinary queue landing
K (merge base..origin/main, first-parent) 0 (< 15)
CI on head 22aab9431e 45 success, 13 skipped, 0 failed or pending; PR-body guards success (R1 met)

Head 22aab9431eeff6981a89e92315533d7cdabffa22: L1-a ACCEPT 7020363168. Ready + auto-merge now. PR 1 of 2 for #35549 and #35550 (Part of). The cards stay open for PR 2.

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/xl tests 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.

2 participants