Skip to content

Console filter builder: a multi-select field offers only operators the server refuses (=, in → 400 INVALID_FILTER); 「包含」(contains) is never offered #35559

Closed
1 of 1 issue completed

Description

@os-bob

Symptom

On a list view, the console's filter builder offers these operators for a multi-select field:

等于 | 不等于 | 为空 | 不为空 | 属于 | 不属于 (equals, not equals, is empty, is not empty, in, not in)

Picking 「等于」 and a value sends:

filter=["cb_responsibilities","=","quality_lead"]

The server answers 400 INVALID_FILTER ("bare equality … WAS NOT APPLIED"), and the list shows 「该视图的查询被拒绝」. in is refused the same way. Over REST, contains works (200), but the builder never offers it for a multi-value field.

So a business user cannot filter a list by a multi-select ("contacts whose responsibilities include 质量负责人"), although the server supports the query.

Where

Ask

  • Offer 「包含 / 不包含」 for multi-value fields in the list filter builder, and in any other UI filter surface such as related lists and the dashboard filter bar.
  • Hide the operators the server refuses for those fields.

Version: @objectstack 18.6.0 (latest on npm).


Generated by Claude Code

Sub-issues

Sub-issues

1 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    Contributor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:ui · pm:queue; rationale: area:ux · Bug · Broken (the filter builder offers equals and in for a multi-select field, and the server refuses both with 400) · end users filtering on multi-select fields, not every user every time → p2 under the UX rule · reported with the request and answer by an outside builder. Overlaps the filter redo #35549 in topic #35547 (the list-page redo the maintainer ordered: 「这个要重新立专题了」); this defect ships on its own.

  2. added
    domain:ui
    pm:queue
    priority:p2
    on Nov 19, 2026
  3. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#5 · os-bill · session_01Utp6CZiaBg6rk7dpy1s9Me

    Claim: area ux-3 of repo:objectstack#5, area:ux p2 with no epic parent (maintainer 2026-11-21 via seat 5: 「你继续处理 ux 非专题下的 p2 任务,并发3」) · 2026-11-21T03:30Z
    Session: session_01Utp6CZiaBg6rk7dpy1s9Me
    Account: os-bill
    Branch: claude/issue-35559-multivalue-filter-operators
    Worktree: objectstack-issue-35559 (os-dev worktree in the ux-3 container)
    Domain: domain:ui
    Seat: repo:objectstack#5
    Area: ux-3
    File surface: the operator offer for multi-value fields in the console's filter UIs: ui/packages/plugin-list/src/conditions/** (list condition builder), ui/packages/components/src/custom/filter-builder.tsx and ui/packages/components/src/renderers/complex/filter-builder.tsx (shared builder used by related lists and other hosts), ui/packages/plugin-view/src/FilterUI.tsx, the dashboard filter bar's operator list if it offers operators, new i18n keys in ui/packages/i18n/src/locales/*.ts, their tests, root .changeset/. ⛔ The server refusal (packages/core/src/utils/json-column-operator-refusal.ts, the driver and engine faces) stays as is; packages/spec/** untouched (seat L2 if ever needed: stop and report first). ⛔ ux-2's create-form tabs and GridField (#35472, #35507, #35804), ux-4's record top bar (#35853), ui/packages/plugin-detail/**, metadata-admin/Studio inspectors. Stop on any other breach and report.
    Container & model: M, mode:subagent, model: default, effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: the builders keyed operators on the field type alone and never learned the #21007/#21009 JSON-column refusal set
    Thread-read: 7014176715
    Premise: holds at origin/main 9a8bb83d4c by the card (multi-select offers 等于/不等于/属于/不属于, server answers 400 INVALID_FILTER; contains works over REST and is never offered). The dev re-measures in the browser before code.
    Serial constraints cleared: no open ux-3 card; ux-2 and ux-4 surfaces fenced above; seat 1 also claims area:ux cards, so this claim re-reads the card's thread before landing. overlap-check against main before every push; the second to land merges main.
    Pre-claim lane: ui/packages/plugin-list/**, ui/packages/components/** → domain:ui, area ux-3.
    Pre-claim deps: none.
    Prior rulings read: check-prior-rulings.mjs --card 35559 --terms operator,multiple,contains,filter,multiselect --paths over FilterValuePanel.tsx, components filter-builder.tsx and json-column-operator-refusal.ts at origin/main 9a8bb83d4c: no ruling on the card's thread (0 of 1 comment); ADR hits generic (ADR-0061 D3, ADR-0098 §5, ADR-0147 §2 proposed, ADR-0155 D1, ADR-0019, ADR-0021), none governs which operators a UI offers.

  4. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 21, 2026
  5. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#5 · os-bill · session_01Utp6CZiaBg6rk7dpy1s9Me

    Claim amendment · area ux-3 · 2026-11-21T03:44Z
    File surface (added to claim 7056652346): ui/packages/plugin-list/src/ListView.tsx, one additive line in the filter field descriptors (multiple, plus its local type) so a multiple: true select / lookup / user field can be told apart from a single-value one; ui/packages/components/src/custom/index.ts, one barrel line exporting the shared operator helper next to the claimed filter-builder.tsx. #35918 also edits ListView.tsx; overlap-check runs against its branch before every push, and the second to land merges main.

  6. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#5 · os-bill · session_01Utp6CZiaBg6rk7dpy1s9Me
    os-dev-report

    {
     "issue": 35559,
     "status": "done",
     "branch": "claude/issue-35559-multivalue-filter-operators",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/35991",
     "head": "0153d1fe7f845bfdc2d5363cc001f760a822e481",
     "session": "session_01Utp6CZiaBg6rk7dpy1s9Me",
     "premise_still_valid": true,
     "summary": "Re-measured first in the browser (showcase, zh-CN, 1280x800, showcase_field_zoo): the premise held (multiselect quick filter offered 是其中之一 and one pick sent [\"f_multiselect\",\"=\",\"red\"] -> 400 INVALID_FILTER with 该视图的查询被拒绝; the advanced panel offered 等于/不等于/属于/不属于 or the text family). Both operator-offering surfaces now read one shared helper, jsonColumnFilterOperators(field) in @object-ui/components, keyed on type + multiple through the spec's isMultiValueField and STRUCTURED_JSON_TYPES (the same facts as the engine's declaredJsonStoredFields): a multi-value field offers contains / not_contains / is_empty / is_not_empty (contains first, one member each), a structured-JSON field offers the empty pair only, everything else keeps its type bucket. A saved refused operator stays mounted and shown so it can be changed; Add filter and a field switch land on contains; ListView's filter field descriptors now carry multiple (one line, coordinator-approved surface increment). After: every multi-value field on both surfaces offers 包含/不包含/为空/不为空 and one pick sends [\"f_multiselect\",\"contains\",\"red\"] -> 200, 1 row; single select unchanged.",
     "files_changed": [
      "ui/packages/components/src/custom/filter-builder.tsx",
      "ui/packages/components/src/custom/index.ts (barrel: 3 export names; coordinator-approved increment)",
      "ui/packages/plugin-list/src/ListView.tsx (one additive multiple line + its local type; coordinator-approved increment)",
      "ui/packages/plugin-list/src/conditions/conditionModel.ts",
      "ui/packages/plugin-list/src/conditions/FilterValuePanel.tsx",
      "ui/packages/components/src/__tests__/filter-builder-json-column-operators.test.tsx (new)",
      "ui/packages/components/src/__tests__/filter-builder-empty-null-pair-11810.test.tsx",
      "ui/packages/plugin-list/src/conditions/__tests__/listConditions.test.tsx",
      ".changeset/multivalue-filter-operators.md (patch: @object-ui/components, @object-ui/plugin-list)"
     ],
     "surfaces": {
      "list quick filter (plugin-list conditions FilterValuePanel)": {
       "before": "multiselect/checkboxes/user multiple: 是其中之一/不是其中之一/为空/不为空 (one pick -> [f,'=',v] -> 400 INVALID_FILTER); tags: 包含/不包含/等于/开头是/为空/不为空 (等于, 开头是 -> 400)",
       "after": "multiselect/checkboxes/tags/user multiple: 包含/不包含/为空/不为空; one pick -> [f,'contains',v] -> 200 (multiselect rows=1, checkboxes rows=1, tags rows=1)",
       "control": "single select unchanged: 是其中之一/不是其中之一/为空/不为空, [f_select,'=',low] -> 200"
      },
      "advanced panel (shared components FilterBuilder)": {
       "before": "multiselect/checkboxes/tags: 等于/不等于/包含/包含(忽略大小写)/不包含/为空/不为空/以…开头/以…结尾/为 null/不为 null; user multiple: 等于/不等于/为空/不为空/属于/不属于",
       "after": "all four multi-value fields: 包含/不包含/为空/不为空; structured JSON (address etc., pinned in unit test): 为空/不为空",
       "control": "single select unchanged: 等于/不等于/为空/不为空/属于/不属于"
      },
      "server answers over REST (multiselect, checkboxes, tags)": "= / != / in / nin / startswith -> 400 INVALID_FILTER; contains / notcontains / isempty / isnotempty -> 200; contains with an array value -> 400 (so contains picks ONE member); or of two contains -> 200",
      "plugin-view FilterUI": "offers no operator per field (writes values); not changed",
      "dashboard filter bar": "offers no operator per field (writes values); its host lowers a select/lookup filter to bare equality or $in in @object-ui/core dashboard-filters.ts buildFilterCondition (outside claim; not measured against a multi-value target)",
      "filter-builder renderer (components renderers/complex)": "forwards FilterBuilderSchema.fields, whose declared types carry no multi-value type and no multiple, so no consumer of this offer; not changed",
      "saved view / URL holding a refused operator": "does not crash; the row's own operator stays mounted and drawn (advanced trigger reads Equals beside the four; quick panel trigger reads equals), so the reader can change it; nothing rewrites the stored operator"
     },
     "tests": "head 0153d1fe7f: `pnpm --dir ui exec vitest run --maxWorkers=2 packages/components/ packages/plugin-list/` -> Test Files 681 passed | 1 skipped (682), Tests 6774 passed | 24 skipped, lock VERDICT command-exit 0. Targeted: the three touched pin files -> 85 passed. `pnpm --filter @object-ui/components --filter @object-ui/plugin-list run type-check` -> exit 0 (both tsc legs echoed). Wire pin: every offered operator lowered via ListView convertFilterGroupToAST + spec parseFilterAST, none in JSON_COLUMN_INCOMPATIBLE_OPERATORS read from packages/core/src/utils/json-column-operator-refusal.ts (lit control: $eq/$in in, $contains/$empty out; control leg: equals/not_equals/in/not_in each reach a refused op). Ablation on committed fix via scripts/ablation-replace.mjs (subject resolved by vitest alias to src, so no build leg): deleting the multi-value line of jsonColumnFilterOperators -> anchor 1->0, blob f440145ffece->3a729237258e, 9 failed / 57 passed (exit 1); restore blob == HEAD, git diff HEAD empty, rerun 66 passed (exit 0). Browser before/after screenshots in /mnt/project-files/objectstack-seat5/area-ux/ux-3/shots-35559/.",
     "gates": "local, head 0153d1fe7f: `dispatch-gates.mjs --commands` derived 38 families; all 38 run with exit 0 (incl. `pnpm --dir ui exec vitest run scripts/` 172 files passed, `pnpm check:type-check-debt` under the lock re-measured OK, check:cross-package-test-inputs, check:nul-bytes, check:published-files, check:test-source-alias, check:undeclared-dep-imports); `--ran` reconciliation: 38 derived, 38 run, 0 NOT-MEASURED (a DERIVED zero, every entry with exit code). Also: ui `check:new-line-citations` 0 new (exit 0); `check-platform-checklist.mjs --changed-from origin/main` exit 0 (0 anchored files). overlap-check before every push: exit 0 at final head against origin/main and #35918 (an earlier run was exit 1 on listConditions.test.tsx vs #35918's import hunk; the pins were moved mid-file and it cleared). CI at PR open: all gate check-runs in_progress (Check Changeset, Lint ×8, Type Check ×4, Governed Surface Queue Guard, PR-body guards); not awaited per os-dev.",
     "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
     "overlap_check": "exit 0 at 0153d1fe7f: origin/main merges cleanly; #35918 (claude/project-thread-2ftzuo, shares ListView.tsx and listConditions.test.tsx) merges cleanly. origin/main has since moved to f9f45d34f1; not merged in (second to land merges main).",
     "mcp_calls": "0",
     "api_writes": "2 — relay dispatch POST /repos/objectstack-ai/objectstack/dispatches for pr_create (POST pulls -> #35991 draft, POST issues/35991/assignees os-bill; body read back 8630/8630 bytes identical); post-stamped report comment on issue 35559. git push is not a REST write.",
     "deviations": [
      "File surface: ListView.tsx (one additive `multiple` line + local type) and components/src/custom/index.ts (barrel export) are outside the claim's named files; asked the coordinator mid-run, approved, claim amendment by the seat.",
      "Structured-JSON fields are offered is_empty / is_not_empty only, not contains / not_contains as the dispatch's list reads: the server's membership test is array-only, so contains on an object value always answers no rows (Prime Directive 10). Within the dispatch's 'only what the server accepts' bound; a one-line change if the seat wants the four there too.",
      "contains picks ONE option (not several): measured, the server refuses an array comparand under contains (400); any-of is two contains rows under OR in the advanced panel. The quick filter keeps its checkbox rows; a second pick replaces the first.",
      "The existing pin filter-builder-empty-null-pair-11810 'multiselect/tags offers both pairs' was rewritten to the JSON-column offer (no null pair to a fresh choice; a stored is_null still loads with the list hint).",
      "No new i18n keys were needed: 包含/不包含/为空/不为空 and the en words exist on both surfaces.",
      "Commit trailers follow the dispatch (Co-Authored-By: Claude, model-free) rather than the harness reminder's model-named line. PR body footer uses AGENTS' session-URL form, not the harness's line."
     ],
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [
      "carrier: none · noted, not filed — dashboard filter bar: a select/lookup global filter bound to a multi-value field is lowered to bare equality or $in by @object-ui/core dashboard-filters.ts buildFilterCondition, which the server refuses on a JSON column; read-only inference, not measured (no showcase dashboard binds one). dedupe words: dashboard filter multi-value equality, buildFilterCondition $in multiselect, global filter JSON column",
      "carrier: none · noted, not filed — FilterConditionField (@object-ui/fields) and the metadata-admin / Studio condition rows (ConditionBuilder, flow-edge-condition-rows, dataset filter) build FilterBuilder fields without `multiple`, so select/lookup/user with multiple: true keep their type bucket there (multiselect/checkboxes/tags are fixed by type through the shared builder); whether their evaluating faces refuse it was not measured. dedupe words: FilterConditionField multiple, flow condition multi-value operator, dataset filter multiple select"
     ]
    }
  7. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#5 · os-bill · session_01Utp6CZiaBg6rk7dpy1s9Me

    Claim amendment · area ux-3 · 2026-11-21T05:17Z
    File surface (added to claim 7056652346): ui/packages/fields/src/widgets/__tests__/FilterConditionField.emptyOperators-10790.test.tsx, test only. FilterConditionField renders the shared builder, which now seeds contains on a multi-value column, so its equality CONTROL moves to the single-value columns and a multiselect seed CONTROL is added. No @object-ui/fields source change; the editor's missing multiple stays with #35992.

  8. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#5 · os-bill · session_01Utp6CZiaBg6rk7dpy1s9Me

    Close-out 2026-11-21T06:00Z: PR #35991 MERGED as 56fa31bca2; Fixes closed this card. On a multi-value column (multiselect, tags, multiple: true lookups) the list filter and the shared filter builder now offer only Contains / Does not contain / Is empty / Is not empty, and a new row seeds Contains. Structured-JSON columns offer only Is empty / Is not empty. Equals, In, Starts with and the orderings are gone there, because the server refuses them on those columns with a 400. Single-value columns are unchanged (pinned). Reviews: L1-a ACCEPT 7057604096, delta ACCEPTs 7057776804 + 7057820512. Follow-up #35992 stays open. pm:dispatched off.

  9. removed
    pm:dispatched
    on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:uxdomain:uipriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions