Skip to content

fix(kanban): lanes on a lookup or user field key by the foreign key and are titled by the record's name (#36430) - #36642

Merged
objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/project-thread-kco9wb
Nov 23, 2026
Merged

objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/project-thread-kco9wb

Conversation

@os-warren

@os-warren os-warren commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by Warren · project thread

Card thread for #36430, dispatched by seat repo:objectstack#1 · session_01JQwxba2NAjVpDLao1M9SYN

Fixes #36430 (items 1–3; item 4 is open, see below)

维护者速读

  • 看板按「负责人」这类查找 / 人员 / 主从 / 树形字段分列时,原来画出一堆标题为「[object Object]」的列、每列塞满全部卡片。现在每个被引用的记录一列,列名是它的名字(人名、客户名),卡片各归各列,没有值的卡片在「未分类」。
  • 把卡片拖到另一列,会把该字段改成那一列对应的记录(例如把负责人从 Alice 改成 Bob),卡片上的负责人名字也随之更新。
  • 第 4 项(在「视图设置 → 分列字段」里提供这些字段)还没做:它在列表视图的设置面板里,等维护者确认后补上,否则由席位另立卡。

What changes

ui/packages/plugin-kanban only.

  1. Lanes from a reference field — ObjectKanban#effectiveColumns' data-derived branch built lanes from String(record[groupBy]). The board fetches with $expand, so a reference value is the referenced record and every lane was "[object Object]". New kanbanReferenceLanes.ts: lanesFromRecords makes one lane per distinct key — the expanded record's id (_id), else the stored value — titled through core's referencedRecordTitle (the field's displayField, then the target object's nameField, then the shared ladder), else the key. When the lane field declares reference, the board reads that object's definition (useSettledSchema, cached) so its declared name field titles the lane. A record with no value names no lane (it was already bucketed to "Uncategorized"; before, a data-derived board also drew an empty lane titled null).
  2. Bucketing on the foreign key — bucketCardsIntoColumns keys a record by laneKeyOf(value), so expanded references land in their lane, including declared columns keyed by foreign key. Lane paging already filters each lane's query on the lane id (the key), unchanged.
  3. A drag writes the foreign key — the PATCH already sends the lane id, which is now the key. The optimistic local row holds the target lane's expanded record (laneValueOf) instead of the bare key, so the card keeps naming its new owner; the failure rollback restores the expanded value it held.

Item 4 (lane-field picker) is not in this diff. It lives in ui/packages/plugin-list/src/ListView.tsx (laneFieldOptions filter); the seat widened the surface, and the edit is waiting on the maintainer's go-ahead in the thread.

Why

A board grouped by owner is a common grouping and was unusable (#36430, graded p1).

Verification

Head 02acbeab, tree objectstack-ai/objectstack@02acbeab:

  • New ObjectKanban.referenceLanes-36430.test.tsx (4 rows: owner lanes titled by name with the right cards; lookup lane titled by the target's nameField; a drop writes { owner_id: 'u2' } and the card stays in Bob's lane; declared FK-keyed lanes take expanded values) and two rows in index.bucket.test.ts.
  • Ablation: with ObjectKanban.tsx and index.tsx restored from origin/main and the tests kept, 5 of the new rows fail (all 4 board rows and the FK bucketing row); with the fix, all pass.
  • vitest run packages/plugin-kanban/ on d8058107 (the later head only adds changeset lines): 84 files, 552 tests passed.
  • overlap-check.mjs: clean against origin/main d7411fa3 and 0 open PR heads.
  • NOT MEASURED locally: type-check for plugin-kanban (the @object-ui/* dependency declarations are not built in this container; every error printed was a missing-module / implicit-any cascade, none on the new code's logic). Type Check UI in CI is the verdict.

Clause-②: no
Metadata-protocol: none

Acceptance notes

  • Item 4 and the swimlane sibling. If the maintainer has not approved item 4 by the time CI is green, the seat (repo:objectstack#1) files two follow-up cards and lands this PR with Fixes #36430 covering items 1–3:
  • A multi-valued reference used as the lane field still draws [object Object],… lanes; the picker change for item 4 leaves multi-valued references out.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic.
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes (CI).
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: n/a.
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JQwxba2NAjVpDLao1M9SYN

@os-warren os-warren self-assigned this Nov 23, 2026
@github-actions github-actions Bot added size/m 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 23, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

维护者速读

看板按负责人、客户这类"关联字段"分组时,原来每张卡都自成一列、列名全是乱码;现在一个负责人一列,列名是他的名字,把卡拖到别的列就会改负责人。
"在列表设置里能选这类字段做看板分组"拆成了后续卡 #36643;在那之前,要手写分组字段才能用上这个修复。
CI 全绿,341 行,非受管面,席位落地。
要你做的:无。

席位核对 — ACCEPT (L1) · repo:objectstack#1 · head 02acbeab · 2026-11-23T06:58Z

  • Shape: Fixes #36430 (items 1–3). Files: ObjectKanban.tsx and index.tsx in plugin-kanban; a new kanbanReferenceLanes.ts; a new test ObjectKanban.referenceLanes-36430.test.tsx; two new rows in index.bucket.test.ts; one patch changeset. +330/−11. Tier S (not governed). No L2 face.
  • Read: laneKeyOf keys an expanded reference by id ?? _id. A keyless record goes to "Uncategorized" and never to a lane named [object Object]. Lanes from data are titled with referencedRecordTitle (field displayField, then the target's name field, then the ladder), reading the target def only when the field names a reference. bucketCardsIntoColumns uses the same key. A drag writes the lane id, which is the foreign key; the local copy keeps the expanded record, and a rollback restores the prior expanded value. The thread did not touch the expandableFamily.identity-5874 pin: it dropped its own extra read instead.
  • Evidence: plugin-kanban has 84 files and 552 tests, all green. An ablation that restores the source and keeps the new tests turns the 5 new rows red. overlap-check is clean.
  • Gates: 56 checks on 02acbeab: 41 success · 15 skipped · 0 failed. Type Check UI green settles the local type check, which was NOT MEASURED. Merge-base d7411fa3, K = 2.
  • Split: item 4 (the lane-field picker in plugin-list/ListView.tsx) and the swimlaneField sibling are filed as kanban: offer lookup, user, master-detail and tree fields in the lane-field picker (item 4 split from #36430) #36643 (suggested p1, untriaged). The PR body says so.
  • Landing: ready + auto-merge now.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 23, 2026 06:59
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit e9fa6b5 Nov 23, 2026
57 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-kco9wb branch November 23, 2026 07:18
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 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.

kanban: a board grouped by a lookup or user field draws [object Object] lanes holding every card

2 participants