Skip to content

feat(plugin-list): kanban lane-field picker offers lookup, user, master-detail and tree fields - #36830

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-36643-kanban-lane-picker-reference-fields
Nov 24, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-36643-kanban-lane-picker-reference-fields

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Yibo Wang · project thread

repo:objectstack#3 · os-support-ai · session_01WGufzhoBbwh8URjwQHde8v

Fixes #36643

Clause-②: no
Metadata-protocol: none

维护者速读

  • 管理员在看板的「视图设置」里选泳道字段时,现在可以选查找、人员、主从和树形字段了(以前只能选下拉和单选);能装多个值的引用字段仍然不出现。
  • 属于看板按负责人分泳道的那项工作:上一步已经让看板能按引用字段正确画泳道,但界面上选不到,这一步把入口补上。
  • 出错的话,管理员会在选项里看到不该出现的字段,或者少看到该出现的;只影响看板设置菜单,撤回这次改动即可恢复。
  • 无

What changes

  • ui/packages/plugin-list/src/ListView.tsx — the laneFieldOptions filter now offers, besides select / radio, any field whose type is in EXPANDABLE_FIELD_TYPES (lookup, user, master_detail, tree; the @object-ui/core set ListView already imports) and whose definition is not multiple: true. The comment that said reference lanes are not drawn yet is rewritten: since the merged reference-lane work, the board keys such a lane by the foreign key and titles it by name.
  • No second type list: kanbanReferenceLanes.ts exports laneKeyOf / lanesFromRecords / laneValueOf only, no type predicate, and plugin-list does not depend on plugin-kanban; the board itself decides reference lanes from the record value, and EXPANDABLE_FIELD_TYPES is the set the board's $expand reads, so the picker offers exactly the fields whose values the board receives expanded.
  • Test: ListView.kanbanSettings-36370.test.tsx now pins the offered set (stage, tier, account, owner, parent, region) and the refused set (a multi-valued lookup, a multi-valued user, a boolean, text, currency), and that choosing owner writes { groupByField: 'owner', lanes: null }.

Tests

Local, at head 86a26e3:

  • vitest run on ListView.kanbanSettings-36370.test.tsx and ViewSettingsPopover.kanban-36370.test.tsx: Test Files 2 passed, Tests 10 passed (lock VERDICT command-exit 0).
  • Ablation (source-resolved, same package, no build): scripts/ablation-replace.mjs replaced the EXPANDABLE branch of the filter with return false; (anchor x1 -> x0): 2 failed / 2 passed, the two new pins red. Restore blob b37e4b9d equals the HEAD blob, git diff HEAD empty. The multiple !== true guard is defence-in-depth (the group options already drop multi-valued fields), so it is not claimed as pinned by an ablation.
  • pnpm --filter @object-ui/plugin-list run type-check: exit 0 (lock VERDICT command-exit 0).

Acceptance notes

  • Third acceptance line (owner field gives one lane per owner, a drag changes the owner): the picker writes groupByField: 'owner' (pinned here); the board's behaviour on that groupBy is the merged reference-lane work, pinned by ObjectKanban.referenceLanes-36430.test.tsx. Not re-driven in a browser in this PR.
  • Optional swimlaneField sibling NOT taken: it is not the same laneKeyOf reuse. KanbanImpl.tsx stringifies card[swimlaneField] in two places (row keys ~1381, cell bucketing ~1774), uses the key as the row heading, sorts by it, and useCrossSwimlaneMove.ts writes the row key back. Swapping in laneKeyOf would turn [object Object] headings into raw ids; a correct fix also needs name titles and the expanded write-back value, so it wants a card of its own.

Verification

  • First file to read: the laneFieldOptions hunk in ListView.tsx.
  • Two-minute check: on a board view, open 视图设置 → lane field; Owner and Account appear next to Stage; pick Owner and the board redraws one lane per owner.

Generated by Claude Code

🤖 Generated with Claude Code

@github-actions github-actions Bot added size/s 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 24, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzesUz1Y8VZuKJRhVL8

席位核对 — ACCEPT · repo:objectstack#3 · head 86a26e3 · 2026-11-24T03:34Z

L1 read of #36830 against card #36643 (claim 7119838362), head 86a26e3dae41ccc8daaf1ae5d1f96c7cd156689e.

Face. l1-face.mjs --pr 36830 CLEAN (13 items read, none flagged). Latest run per check name at this head: all green.

Code. ListView.tsx laneFieldOptions now admits a field when it is select/radio, or a single-valued member of EXPANDABLE_FIELD_TYPES (imported from @object-ui/core, utils/expand-fields.ts:191, which starts with lookup and master_detail), with def?.multiple !== true as the guard. The board side already reads reference lanes via laneKeyOf in plugin-kanban/kanbanReferenceLanes.ts (#36642), so the picker now offers exactly what the board can render. The spec multiple key the guard reads exists.

Tests. Two new pins in ListView.kanbanSettings-36370.test.tsx. The body's Tests section is pinned to this head: the ablation (EXPANDABLE branch replaced with return false;) turns both new pins red and restores to the HEAD blob. The body honestly says the multiple !== true guard is defence-in-depth and is not claimed as ablation-pinned. Type-check exit 0.

Scope. Patch changeset for @object-ui/plugin-list. Clause-② no; Metadata-protocol none. swimlaneField is deliberately not taken here; it has its own card.

Acceptance. Criterion 3 (board renders the picked reference lane) rests on #36642's board pins plus this PR's picker pin. That chain is sound.

No must-fix, no should-fix.

Notes (nit, no action required):

  • N1. A pin that a multi-valued lookup stays out of the picker would make the defence-in-depth guard self-documenting; optional.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzhoBbwh8URjwQHde8v

Landing · 2026-11-24T03:35Z · area ux-B · head 86a26e3dae41ccc8daaf1ae5d1f96c7cd156689e

  • L1: ACCEPT 7121235483 (L1-a, on this head). One optional nit remains (N1: a pin that a multi-valued lookup stays out of the picker). It has no user effect and stays in the review record.
  • Contract review: none owed (Clause-② no, Metadata-protocol none).
  • check-governed-merges.mjs --pr 36830: NOT governed, 62 changed lines (≤ 3000).
  • landing-k.mjs --pr 36830: CAN'T ANSWER (UI-only PR, no Test Core planner ran). K read via merge-base: merge-base 14f4d8f → origin/main = 3 commits, K = 3 < 15.
  • Checks on this head: 39 success / 13 skipped / 0 failing; mergeable_state clean.
  • Action: ready for review + auto-merge through the merge queue.

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/s 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.

kanban: offer lookup, user, master-detail and tree fields in the lane-field picker (item 4 split from #36430)

2 participants