Repository navigation
fix(kanban): a list view board laned by a lookup draws its Uncategorized lane when every empty-lookup record sits past the first page - #38112
Conversation
…read's count A list view board laned by a lookup draws lanes past the page from the grouped lane read, but the trailing Uncategorized lane was drawn only by the cards it held, so it vanished when every record with an empty lookup sat past the first page. bucketCardsIntoColumns takes keepUncolumned; ObjectKanban sets it from the read's uncolumned count under the gate the past-page lanes take. Claude-Session: https://claude.ai/code/session_01L9qibwxBy3QieJMqJbJtTk Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 L1-a: REWORK at
|
…ameter as a widening bucketCardsIntoColumns is exported from the plugin-kanban entry, so its new optional keepUncolumned parameter widens the public surface. Claude-Session: https://claude.ai/code/session_01L9qibwxBy3QieJMqJbJtTk Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 Contract reviewServed-tier: ① Derived judgments
② Semver levelpatch for ③ Boundary flags
Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 L1-a: ACCEPT at
|
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 Contract reviewServed-tier: ① Derived judgments
② Semver levelpatch for ③ Boundary flags
Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 L1-a: ACCEPT at
|
|
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU Landing · 2026-11-28T03:53Z · zone
|
…lane's cards with "Load more" (objectstack-ai#38178) repo:objectstack#3 · os-tesla · session_01L9qibwxBy3QieJMqJbJtTk <!-- claude-projects-attribution: {"github_login":"os-tesla"} --> _Requested by **Tesla** · [project thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoEynsd5XL1JYxPkwhkywADp)_ Fixes objectstack-ai#37517 Clause-②: no Metadata-protocol: none ## 维护者速读 - 列表视图里按查找字段分道的看板,道头计数是整道的(比如 30),道里却只有第一页上的那几张卡(13 张),第一页之后的道和「未分类」道更是 0 张卡,没有任何办法看到其余记录;现在每个「已画卡数少于整道计数」的道底都有「加载更多」,就地读出该道后面的记录。 - 接在 objectstack-ai#37327(整道计数、补画越页分道)和 objectstack-ai#38112(越页「未分类」道)之后,补上这些道缺的加载入口。 - 只多一次按道读取,读法与列表那一页同源(同一筛选、排序、搜索),不改数据和配置;数据源不支持分组读、或分组读被拒绝或截断时不出现按钮,与现在一致,可以直接撤回。 - 无 ## What changes - `ui/packages/plugin-kanban/src/ObjectKanban.tsx`: `rawData` resolves through the same ladder as before; `boardData` is `rawData` followed, on the board handed one page, by the rows its lanes loaded past it, and the cards, the lane pages and the drag handlers read it. On that board a list view hands one page to, under the gate the lanes past the page already take (`hostLaneRead && flatLanes && lanesFromData && laneTargetObject`, now named `pastPageLanes`) and only while the grouped read answered counts, every lane whose cards on the board are fewer than its count gets a lane page through the existing `KanbanLanePagingContext`, so `KanbanImpl` draws its existing "Load more". `loadMoreHostLane` reads `find(object, { $filter: view filter AND lane value, $orderby, $expand (FLS-gated as the board's own query), $search/$searchFields (the host's), $count: true, $skip: <lane's cards on the board>, $top: 50 })`; the "Uncategorized" lane reads `laneField is_null`. The rows are appended after the host's rows in `boardData` (deduped by id), held under the question the host's page answers (filter, sort, search, reload key, the page's ids), and dropped when it changes. A read that answers no more records ends the lane's "Load more". A self-paged board (`lanePaging`) keeps its own channel. - `ui/packages/plugin-kanban/src/KanbanImpl.tsx` (one line): `hostCount` is read beside a lane page too, so a lane none of whose records is on the board still says "Cards not loaded: N" while it offers "Load more". No behaviour change on a self-paged board: `laneCounts` is set only when `hostLaneRead`, which requires that the host sent no `lanePaging`, and a board pages its own lanes only when it did, so the two paths never meet and a self-paged lane reads `null` there as before. - `ui/packages/plugin-kanban/src/KanbanLanePaging.ts`: package-private `emptyLaneQueryFilter` (the view's filter AND `laneField is_null`). Not exported from the package entry. - `patch` changeset for `@object-ui/plugin-kanban`. ## Tests `ui/packages/app-shell/src/__tests__/listKanbanEveryRecord-12619.test.tsx`, inside the objectstack-ai#37327 describe (the objectstack-ai#36871 rig: 70 deals, page 25; acc-a 30 with 13 on the page, acc-b 30 with 12, acc-c "Cyan Corp" 10 all past the page): - past-page lane: "Load more" offered while "Cards not loaded: 10" still shows; one click draws its 10 cards in place, the button goes, the other lanes keep their page's cards (35 in all); the read is `$skip: 0, $top: 50, $count: true`, `account = acc-c`, the host page's `$orderby`; - first-page short lane: acc-a loads from `$skip: 13` to 30 distinct cards; acc-b keeps its 12 and its button; - dedupe: a source whose lane read starts two records early draws 30 distinct cards, not 32; - under the view's filter (`amount > 9`): `$skip: 13`, filter carried, 25 cards; - "Uncategorized" past the page: `account is_null`, 10 cards; - reset: after a load, the toolbar Refresh drops the loaded cards and the lane offers them again; a toolbar search does the same and the next read carries `$search`; - CONTROL: no grouped door, a refused read and a cut read offer no "Load more" and send no lane read; a board laned by a text field offers none. <details><summary>Readings (head e4d27cf, after merging origin/main 4f7aa88; the fix commits are ef889db and 1a8a066)</summary> - Premise at 6ce1975, before the fix (probe on the same rig, kept in the project at `/mnt/project-files/card-37517/`, not in this PR): `Cyan Corp` badge 10, 0 cards, no `[data-kanban-load-more]`; acc-a 13 of 30 and acc-b 12 of 30 with no load entry either; one deal `find` in all. - Ablations on the committed fix at 1a8a066 (same counts at ef889db) through `scripts/ablation-replace.mjs`, each `vitest run …listKanbanEveryRecord-12619.test.tsx -t 37327`, each restored to blob == HEAD with `git diff HEAD` empty: - channel `{ pages: hostLanePages, loadMore: loadMoreHostLane }` → `null`: `Tests 7 failed | 22 passed`, the 7 new load pins, every control green; - `KanbanImpl` `hostCount` back to `pagedCount ? null : wholeLaneCount(…)`: `Tests 5 failed | 24 passed`, the "Cards not loaded" pins of objectstack-ai#37327 / objectstack-ai#37516 and the load pins that read it; - id dedupe on the merged rows removed: `Tests 1 failed`, the dedupe pin. - At 1a8a066: `pnpm --filter @object-ui/plugin-kanban type-check` exit 0; `pnpm --filter @object-ui/plugin-kanban test`: `Test Files 91 passed (91)`, `Tests 614 passed (614)`; the rig file: `Tests 38 passed (38)`; every other test file that reads `ObjectKanban.tsx`, `KanbanImpl.tsx` or `KanbanLanePaging.ts` off disk (18 files outside the package, the record-source ladder pin `object-kanban-record-source-7780.test.ts` among them): `Tests 604 passed (604)`. - CI on ef889db: `Test UI (1/16)` failed on that ladder pin, which reads the `rawData` line verbatim; 1a8a066 keeps the line and moves the appended rows to `boardData`. CI on 1a8a066: every check green. - e4d27cf merges origin/main (18 commits behind; none touches `plugin-kanban`, `plugin-list` or `core`): `plugin-kanban` type-check exit 0; the rig file and the ladder pin `Tests 55 passed (55)`. CI on e4d27cf: every check green (52 check runs, none failed). - eslint on the four changed files: 0 errors. - Derived local gates: see Acceptance notes. </details> ## Acceptance notes - Scope is the claim's: every lane on a lookup-laned list-view board whose drawn cards are fewer than its whole count, the past-page lanes and the objectstack-ai#38112 "Uncategorized" lane included. Boards laned by declared options already page their lanes; text-field lanes are objectstack-ai#38120; swimlane boards are objectstack-ai#37844. - `$skip` = the lane's cards on the board is right because the list hands its kanban the first page of the view's query (it pages only its grid: `paginate` is `currentView === 'grid'`), so a lane's cards on it are that lane's first records in the same order. The id dedupe covers ties in that order. - In the rig the source does not expand lookups, so once Cyan Corp's cards load, the lane is titled by its key `acc-c`, as the page's lanes are; under a backend that expands, both are titled by the account's name. - File surface: `KanbanImpl.tsx` was outside the claimed surface; the seat agreed to the one-line change before the PR. - Local narrowing: `@object-ui/app-shell`'s full suite is left to `Test UI`; only the rig file this PR edits was run locally. - Derived local gate set at ef889db (1a8a066 changes only `ObjectKanban.tsx`, so the derived set is the same): `dispatch-gates --ran` reconciles 38 derived, 38 run, every one exit 0, 0 NOT MEASURED, 0 unrun. `check:type-check-debt` first exited 3 (prerequisite not met: this worktree's install predated a workspace dependency of `service-knowledge`); after `pnpm install --frozen-lockfile` it exited 0. ## Verification Read first (by risk): 1. `ui/packages/plugin-kanban/src/ObjectKanban.tsx`: `hostLanePages`, `loadMoreHostLane` and `lanePagingChannel` beside `keepUncolumned`; `boardData` below `rawData`. 2. `ui/packages/plugin-kanban/src/KanbanImpl.tsx`: the `hostCount` line. 3. The new pins in `listKanbanEveryRecord-12619.test.tsx`. Two-minute check: from `ui/`, `pnpm exec vitest run packages/app-shell/src/__tests__/listKanbanEveryRecord-12619.test.tsx -t 37327` shows 29 passing; set the `hostLanePages` arm of `lanePagingChannel` in `ObjectKanban.tsx` to `null` and the 7 load pins fail. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L9qibwxBy3QieJMqJbJtTk --------- Co-authored-by: Claude <noreply@anthropic.com>
repo:objectstack#3 · os-tesla · session_01L9qibwxBy3QieJMqJbJtTk
Requested by Tesla · project thread
Fixes #37516
Clause-②: yes (widening) —
@object-ui/plugin-kanbanbucketCardsIntoColumns(exported from the package entry) gains the optional sixth parameterkeepUncolumned, defaultfalseMetadata-protocol: none
维护者速读
What changes
ui/packages/plugin-kanban/src/index.tsx:bucketCardsIntoColumnstakes an optionalkeepUncolumned(defaultfalse). When it is true the trailingKANBAN_UNCOLUMNED_IDlane is drawn even when no card of the page lands in it; the page's uncategorized cards, if any, still go into that one lane. Every other caller passes nothing and keeps today's behaviour.ui/packages/plugin-kanban/src/KanbanBoardCore.tsx: akeepUncolumnedprop, passed through tobucketCardsIntoColumns(a prop, not a schema key, for the reasonlaneCountsis one).ui/packages/plugin-kanban/src/ObjectKanban.tsx:keepUncolumnedis true under the gate the lanes past the page already take (hostLaneRead && flatLanes && lanesFromData && laneTargetObject) when the lane read counts records underKANBAN_UNCOLUMNED_ID(hostLaneCounts[KANBAN_UNCOLUMNED_ID] > 0). A partial (hasMore) or refused read answers no counts, so no lane is drawn from it. TheextraLaneIdsdocblock now says how the empty group is drawn.patchchangeset for@object-ui/plugin-kanban.Tests
ui/packages/app-shell/src/__tests__/listKanbanEveryRecord-12619.test.tsx, inside the List view kanban over a lookup lane: lane count and summarizeField total cover only the loaded page #37327 describe (the 列表里的看板:泳道按查找字段或分组决定时只拿一页数据,泳道「合计」只加这一页,却没有「仅已加载」标记 #36871 rig), deals 60–69 with a null account, all past the first page of 25:Uncategorizedlast (afteracc-a,acc-b), badge10, zero cards, andCards not loaded: 10;Uncategorizedis drawn once as before, badge12, its 2 cards;Uncategorizedlane (the page counts read13+).ui/packages/plugin-kanban/src/index.bucket.test.ts, new describe: kept with no uncategorized card ⇒ an empty trailing lane titled as passed; kept with one ⇒ one lane holding it; not kept ⇒ no lane.Readings (fix head 3700f53, base origin/main f72f335; 916e7a8 changes only the changeset declaration)
/mnt/project-files/card-37516/in the project, not in this PR): the grouped read answered[{account:'acc-a',count:30},{account:'acc-b',count:30},{account:null,count:10}]and the board's lane groups wereacc-a,acc-bonly. Control (two null deals on the page):Uncategorizeddrawn, badge 12, 2 cards.scripts/ablation-replace.mjs:keepUncolumned={keepUncolumned}→keepUncolumned={false}inObjectKanban.tsx;vitest run …listKanbanEveryRecord-12619.test.tsx -t Uncategorized:Tests 1 failed | 4 passed | 22 skipped (27), the failure being the new past-page pin, every control green. Restore: blob == HEAD,git diff HEADempty.pnpm --filter @object-ui/plugin-kanban type-checkexit 0;pnpm --filter @object-ui/plugin-kanban test:Test Files 91 passed (91),Tests 614 passed (614); the rig file:Tests 27 passed (27).Acceptance notes
Uncategorizedlane); per the claim, the seat files it.Uncategorizedlane past the page shows its whole count and "Cards not loaded", with no way to load its cards yet. That is 看板按查找字段分道:第一页之后的分道只显示计数,没有办法加载它的卡片(接 #37327) #37517 (a past-page lane offers no way to see its cards); its fix covers this lane too, whose read condition is "lane field is empty".@object-ui/app-shell's full suite is left toTest UI; only the rig file this PR edits was run locally.dispatch-gates --ranreconciles 38 derived, 38 run, every one exit 0, 0 NOT MEASURED, 0 unrun. One earlier full run ofpnpm --dir ui exec vitest run scripts/timed out a single test (check-i18n-call-site-keys, 20 s on the shared box while a build ran beside it); that file passed alone (152/152) and the whole family passed on the final head.Verification
Read first (by risk):
ui/packages/plugin-kanban/src/ObjectKanban.tsx: thekeepUncolumnedgate besideextraLaneIds.ui/packages/plugin-kanban/src/index.tsx: thekeepUncolumnedarm at the end ofbucketCardsIntoColumns.listKanbanEveryRecord-12619.test.tsx.Two-minute check: from
ui/,pnpm exec vitest run packages/app-shell/src/__tests__/listKanbanEveryRecord-12619.test.tsx -t Uncategorizedshows 5 passing; setkeepUncolumned={false}inObjectKanban.tsxand the past-page pin fails.Generated by Claude Code