Skip to content

fix(plugin-list): a condition chip names an advanced-panel operator in the panel's words, never by its id - #36588

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-36462-chip-operator-labels
Nov 23, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-36462-chip-operator-labels

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread
Fixes #36462
Clause-②: no
Metadata-protocol: none

维护者速读

  • 列表与仪表盘钻取弹窗里的筛选条件标签,原来在冒号后直接显示操作符的内部代号,现在显示与高级筛选面板下拉项一致的文字,如「金额:不为 null」「金额:大于 100」。
  • 属于列表筛选体验打磨,替在 CRM 仪表盘做钻取的业务用户解决看不懂条件的问题。
  • 只影响条件标签上的文字;万一措辞不合适,读者看到的是一个可读词而不是机器名,撤回这次合并即可恢复原样。
  • 无

What changes

quickOperatorLabel (plugin-list's condition chip and quick-filter operator wording) returned the raw operator id for every operator outside its 13 quick-filter words. A drill dialog's base filter carries ['amount', 'is_not_null', true], so the chip read "Deal Value: is_not_null" (HotCRM: 「金额:is_not_null」, 「阶段:not_equals 失败」).

  • The five operators the card names (not_equals, greater_than, less_than, is_null, is_not_null) now read the advanced filter panel's own key for each operator, filterBuilder.operators.ID — the same key the panel's dropdown row draws. No new key: every one of the 11 packs already translates them, so no locale pack changes and a chip can never word an operator differently from the panel. The provider-less defaults table gains the seven rows verbatim from the en pack (as it already does for the dashboard range keys); check:i18n-keys holds them equal.
  • Bounded in-place fix, same defect class: icontains and ends_with are also operators only the advanced panel writes (its text operator list offers both) and showed their id the same way; they take the same one-line arm each. All four exemption conditions hold: same defect class, mechanical with the form pinned by the five above, same file surface the claim declares, same gate family.
  • Unknown operator fallback: any other spelling now reads listConditions.filter.operator ("Condition" / 「条件」), the quick filter's existing name for the operator control, already in all 11 packs. A view triple's comparison symbol (=, !=, >, >=, <, <=) still reads as written ("Amount: >= 10"), which existing pins hold.
  • describeConditionValue: a named operator with no value text is now the operator alone, never followed by a trailing space ("Deal Value: Condition", not "Deal Value: Condition " for a value-less unknown operator). is_null / is_not_null were already in isValuelessOperator's set, so their chips carry no value: "Deal Value: Is not null".

Tests

New top-level describe in the shared harness listConditions.test.tsx (ConditionChipRow — an operator only the advanced panel writes): the chip text for each of the seven operators in en and zh-CN; the reader's own filter chip; every pack words each of the seven and never as the id; the unknown-operator fallback in en and zh-CN; a CONTROL that symbols still read as written. No existing test was changed.

Runs at head 66eb08b
  • vitest run packages/plugin-list/src/conditions/ (lock VERDICT command-exit 0): Test Files 2 passed, Tests 74 passed.
  • Full package, vitest run packages/plugin-list/ (lock VERDICT command-exit 0): Test Files 185 passed (185), Tests 2032 passed (2032).
  • pnpm --filter @object-ui/plugin-list type-check (tsc --noEmit && tsc -p tsconfig.test.json): lock VERDICT command-exit 0.
  • Ablation 1, ablation-replace.mjs --delete of the is_not_null arm: mutation landed (anchor 1 to 0), 3 failed / 3 passed of the new describe ("Received: Deal Value: Condition"); restored, blob == HEAD, git diff HEAD empty.
  • Ablation 2, fallback default: back to return operator: mutation landed, 1 failed (the fallback test) / 5 passed; restored, blob == HEAD.
  • pnpm --dir ui check:i18n-keys, check:i18n-dead-keys, check:i18n-drift: exit 0 each.

Acceptance notes

  • The card's example said "Deal Value: is set"; the chip reads "Deal Value: Is not null". To do 1 says to reuse the advanced panel's own operator wording, and the panel's word for is_not_null is "Is not null" (「不为 null」). "Is set" is the panel's word for a different operator, exists, whose fold onto is_not_null the filter-builder header records as refused (objectui#9559 ruling B: two labels for one wire predicate). Rewording "null" for business readers would change the panel and the chip together, since they now share one key; that is a wording decision for the panel, not done here.
  • Casing: the panel's words are sentence-case ("Greater than"), the quick filter's own 13 are lower-case ("is any of"), so an en chip can read "Deal Value: Greater than 100" beside "Stage: is any of". Reusing the panel's keys was chosen over a new chip-cased key per operator in each of the 11 packs to keep one wording per operator and no locale pack edits; CJK packs are unaffected.
  • Symbols from view triples still read as written ("Amount: >= 10", where the quick filter says "≥ 10"). Observation only, unchanged and pinned by existing tests.
  • Lowered AST spellings that are not canonical ids (nin, isnotnull, startswith) reach the chip only from a hand-written view filter; they now read "Condition", readable but unspecific. Observation only.

Verification

Read first: conditionTranslations.ts (the new arms and the default:), then ListConditionControls.tsx (describeConditionValue's last return).

Two-minute check: cd ui && npx vitest run packages/plugin-list/src/conditions/__tests__/listConditions.test.tsx -t "advanced panel writes" shows 6 passing tests, among them the en chips "Deal Value: Is not null" and the zh-CN chips 「金额:不为 null」.

Session: https://claude.ai/code/session_01ADHkmRGDrq6JSytBsNFabU

🤖 Generated with Claude Code

…n the panel's words, never by its id

Claude-Session: https://claude.ai/code/session_01ADHkmRGDrq6JSytBsNFabU
Co-authored-by: Claude <noreply@anthropic.com>
@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#2 · os-steve · session_01ADHkmRGDrq6JSytBsNFabU

席位核对

ACCEPT — PR #36588 @ 66eb08bca9de14ead5a4508e13c94f46dcd70ff2 · card #36462 · L1 read by area s2-D itself (seat area order item 9), at 2026-11-23T01:30Z

  • Shape: draft → main; first line Fixes #36462 (labels for the five named operators, a readable fallback, en and zh-CN pins); no closing keyword on another card; Clause-②: no · Metadata-protocol: none in body and changeset (l1-face.mjs --pr 36588: CLEAN).
  • Premise: at origin/main quickOperatorLabel's default: returned the raw id; measured again by the dev at 06c3e5ac.
  • Diff read (4 files, +147/−7): not_equals, greater_than, less_than, is_null, is_not_null read the advanced panel's own filterBuilder.operators.* keys (already in all 11 packs, so no locale pack changes and no new key), as to-do 1 asks ("reusing the advanced panel's own operator wording"); view-triple symbols (=, >=, …) still read as written, which existing pins hold; any other spelling falls back to listConditions.filter.operator ("Condition" / 「条件」), never the id. describeConditionValue drops the trailing space when there is no value.
  • Bounded in-place addition, accepted: icontains and ends_with take the same arm — same defect class (panel-only operator shown by id), mechanical one line each, no other claim, same gate family, declared in the PR body.
  • Accepted deviation from the card's example wording: the chip reads 「Deal Value: Is not null」 / 「金额:不为 null」, the panel's word for is_not_null, not the example "is set", which is the panel's word for exists (merging the two was refused, objectui#9559 ruling B). To-do 1 names the panel's wording; the example is illustrative. The capitalisation difference against the quick filter's lower-case words and the word "null" are noted in the PR's Acceptance notes, not filed.
  • Tests: a new top-level describe in the shared harness listConditions.test.tsx covering seven operators in en and zh-CN; no existing test changed. Ablations: the is_not_null arm removed ⇒ 3 red; the old default: restored ⇒ 1 red; both restored blob == HEAD.
  • Gates: check-runs at 66eb08bc: 39 success, 13 expected skip, 0 failed (pr-state.mjs --pr 36588); 38 derived families reconciled 0 NOT-MEASURED (/mnt/project-files/objectstack-seat2/36462-gates-ran.txt); overlap-check clean (no locale pack touched, so no overlap with PR feat(kanban): the board's own view settings, lane header create and menu, and a lane statistic #36411).
  • Landing: check-governed-merges.mjs --pr 36588 ⇒ NOT governed, 154 lines ≤ 3000; no contract face ⇒ no L2 owed; K = 11 < 15, no locale pack added on main since the merge base ⇒ area lands it.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 23, 2026 01:31
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit 89d9608 Nov 23, 2026
53 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-36462-chip-operator-labels branch November 23, 2026 02:01
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.

plugin-list: a condition chip shows the raw operator id (is_not_null, less_than, ...) for operators only the advanced panel writes

2 participants