Skip to content

fix(plugin-kanban): a kanban drawn in swimlanes shows the lane statistic the view settings offer - #37714

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-axt9gn
Nov 26, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-axt9gn

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

Fixes #37326

What changes

  • KanbanImpl.tsx, the swimlane layout.
    • It now draws the view's lane statistic (kanban.summary) once per column, in a foot row (data-kanban-swimlane-foot) under every swimlane. The figure comes from the same LaneFootStatistic the flat board uses, read for the column's whole lane.
    • The foot row joins the board's one horizontal axis (adoptSwimlaneScroll, data-swimlane-scroll-row). It takes each cell's width from laneBox, so a figure sits under its column. A collapsed column draws an empty cell.
    • The column-title row writes swimlaneColumnCount. That is the whole-lane count from laneCounts where the host hands it (wholeLaneCount), else the cards drawn, marked over a windowed fetch as before.
    • Its LaneTotal now gets the laneId, so a header total reads the whole lane's figure where one exists.
    • A swimlane row's own count is marked + unless swimlaneCountIsWhole holds.
  • ObjectKanban.tsx.
    • The one grouped lane read is asked on a swimlane board too, grouped by the lane field alone. The flatLanes gate moves off the question and off hostLaneRead.
    • The lanes past the page (extraLaneIds) stay flat-only.
  • A new test file and a changeset (@object-ui/plugin-kanban patch).

Why

The view settings offer count, sum, avg, min and max on every kanban. A board drawn in swimlanes rendered no lane foot, and it asked no lane read, so a picked statistic was blank there with no explanation.

The card's scope widening (7188972467) adds the rows-handed board: its swimlane column counts read the page, unmarked.

Verification

  • ObjectKanban.swimlaneStatistic-37326.test.tsx has 6 tests on a swimlane board, with swimlaneField: 'region' over 24 deals:
  • Ablation. With KanbanImpl.tsx and ObjectKanban.tsx reverted to main, (a), (b), (c) and (e) fail, and the controls (d) and (f) pass.
  • vitest run on ui/packages/plugin-kanban, plus ListView.kanbanOwnsLanes-12619 and app-shell listKanbanEveryRecord-12619: 92 files, 633 passed.
  • tsc --noEmit -p packages/plugin-kanban/tsconfig.json passes. eslint on the changed files reports 0 errors; the warnings are the files' existing any.
  • overlap-check is clean against origin/main. feat(kanban): card footer with open comment threads and attachments (#36423) #37667 shares both files and merges cleanly.

Small decisions

  • The product fork the card leaves to the claimant: draw the statistic, do not hide the option. The setting then works on every kanban it is offered on, and the picker is unchanged.
  • The shape is one figure per column, across every swimlane, at the board's foot. It is the same figure the flat board draws for that lane. No cell (column × swimlane) draws its own figure, because the grouped read has no second grouping, and a per-cell figure would need one read per swimlane or a two-key group.
  • The foot row is not sticky. It sits after the last swimlane, as a foot does. The title row's sticky pinning stays the only pinned row.
  • A swimlane row's count is bare only when the board holds every record of its query. That means no windowed fetch and, on a rows-handed board, every lane the read counted drawn with all of its records. Otherwise it is a floor and is marked +.
  • A swimlane board does not add the lanes that exist only past the page (extraLaneIds). Such a lane would be an empty column in every swimlane. The flat board keeps them.

Clause-②: no
Metadata-protocol: none

Owed

  • L1 (seat).

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (not touched)
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes on the changed files.
  • 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: its generated artifacts are regenerated and committed. (not touched)
  • 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_01L6bhgU7eeqHgQrtv5CeJK6


Generated by Claude Code

…tic the view settings offer

The swimlane layout drew no lane foot, and ObjectKanban asked the grouped
lane read only on a flat board, so a picked `kanban.summary` was blank on
every swimlane board. The board now asks the same one read (grouped by the
column field) and draws the statistic once per column in a foot row under
every swimlane, on the board's one horizontal axis.

On a board handed one page with its query, the swimlane column counts and
header totals read the whole lane from that read, marked `+` while it is
pending or refused; a swimlane row's own count is marked `+` unless the
page holds every record of the query. Lanes past the page stay flat-only.

Claude-Session: https://claude.ai/code/session_01L6bhgU7eeqHgQrtv5CeJK6
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 26, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgU7eeqHgQrtv5CeJK6

Final head for L1: 7107c85f085f8070854c65b1fc08f0975f161524. CI is green on it: 52 check runs, each one a success or skipped by the path filter, none failed. All 16 Test UI shards pass.


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 7107c85f085f8070854c65b1fc08f0975f161524
Local-runs: none

First round, declaration face. Inputs: card #37326 (body and all 5 comments, including the scope widening 7188972467 and the claim 7204712217), this PR's body, its 4-file list and the net diff against main (merge-base 2d149e1), and the 52 check-runs on the head. Every check-run is success or skipped (path filter); none failed. The affected plan started 10 Test UI (k/16) legs, and all 10 are green, as is the aggregate Test UI.

① Derived judgments

The diff changes no accept set. It touches nothing in packages/spec, adds no schema key, no export and no prop, and changes no exported signature. The behaviour changes it implies, each judged:

  • The lane read is now asked on a swimlane board (ObjectKanban.tsx: flatLanes is gone from laneStatisticQuestion, and hostLaneRead = hostHandsQuery && !!schema.groupBy). Right. It is still ONE grouped aggregate per board, grouped by the column field alone, with the same filter, search pair and lane folding (statisticLanesKey) as the flat board. This is the "one read per board" that 7188972467 asks for. A self-querying board asks it only for a drawable aggregate; a rows-handed board with its query asks it always (laneCount, plus the header total where one is drawn). Pin (a) asserts the exact query and one call.
  • The foot statistic equals the flat board's. Right for every type in the closed set. sum, avg, min and max go through the same LaneFootStatistic, which uses laneFigureOf(figures, laneId, type, …) over the same read, and holdsRecords is fed from the same count. count is swimlaneColumnCount, which is wholeLaneCount where the host hands counts, else the cards drawn marked over a windowed fetch. That is exactly the figure a flat board on the same entry path writes. One difference remains: on a self-querying board that ListView lane-pages, the flat layout pages its lanes, but swimlanes never do (pagedLaneIdsKey is null there, as on main). A windowed swimlane count therefore reads N+ where that flat board reads an exact count. That is honest, the swimlane column header already behaved this way on main, and ListView's own grouping path takes the rows-handed route with whole counts (kanbanLanesPaged excludes grouping). See N5.
  • The whole-column count is read under the viewer's row access. Right. queryGroupHeaders posts to POST /data/:object/query, which routes to engine.aggregate under the viewer's session. It is the same door, with the same filter, as the flat board's read since 列表里的看板:泳道按查找字段或分组决定时只拿一页数据,泳道「合计」只加这一页,却没有「仅已加载」标记 #36871 and List view kanban over a lookup lane: lane count and summarizeField total cover only the loaded page #37327, so no row the viewer cannot read is counted. A 403 reads as no figure and marks every count + (pin e).
  • The + marker (swimlaneColumnCount, swimlaneCountIsWhole). Right, and conservative in every branch.
    • A windowed fetch is marked.
    • laneCounts === null (pending, refused, cut by hasMore, or no door) is marked.
    • Otherwise a row is bare only if no lane the read counted holds more than the board draws. readLaneCounts folds groups outside the declared lanes into the uncolumned id, so an undrawn value still counts against "whole".
    • It over-marks, never under-marks: after a drag, before the re-read, and with hidden lanes. N+ is still true in those cases. The bare laneCounts === undefined branch is reached only where the rows are whole by contract (self-querying unwindowed, or handed whole without a query).
    • Pins (c), (d) and (e) cover marked, bare and refused.
  • The column-title row writes the whole count and the whole total (countText(swimlaneColumnCount(…)), LaneTotal laneId=…). Right. This is the same contract as the flat header's hostCount and LaneTotal.
  • Past-page lanes stay flat-only (extraLaneIds gains !flatLanes). Right, and not new. On main, hostLaneRead already required flatLanes, so a swimlane board never appended them. The PR only makes that implicit gate explicit. See ③ for the small decision, and N3.
  • KanbanBoardProps.laneCounts is now drawn on the swimlane layout too. The behaviour is right, but its jsdoc still says "Drawn on the flat layout only" (N2).

② Semver level

.changeset/37326-swimlane-lane-statistic.md: '@object-ui/plugin-kanban': patch. Matches. It is a bug fix in a released package, it has no accept-set change and no protocol change, and Check Changeset is green on the head.

Clause-②: no, line-initial in both the PR body and the changeset. Right, because nothing an author or consumer can write is widened or narrowed. Metadata-protocol: none is also right. kanban.summary keeps its meaning and its accepted values; the change honours an existing key on a layout that silently ignored it. That is enforcement of a declared key, not a semantic change, so none and patch hold.

③ Boundary flags

  • The card's product fork (draw, or hide the option). The dev chose to draw it, which the card left to the claimant. Answered. It meets Done-when: the figure is drawn, pins (a) and (b) cover it, and the PR reports ablation reds for (a), (b), (c) and (e) with controls (d) and (f) green.
  • Scope 7188972467 (rows-handed swimlane counts). Answered. Column counts are whole from the same read, and are page counts marked + while that read is pending, refused or cut. The test is pin (c) in the 列表里的看板:泳道按查找字段或分组决定时只拿一页数据,泳道「合计」只加这一页,却没有「仅已加载」标记 #36871 rig, with controls (d) and (e).
  • Small decision: lanes past the page are not added in swimlanes. My call: accepted as stated; not a defect of this head.
  • The foot row is not sticky; one figure per column, no per-cell figure. Stated. Accepted.
  • The PR body and the claim carry no open_questions entry, and none is owed.
  • SQL push-down (Prime Directive 5). No new id materialisation and no in-app join. The change adds one grouped aggregate in the database, and it removes the past-page title read (id IN) from the swimlane path. Swimlane row counts stay page counts marked +, computed in the app as on main. A one-read two-key groupBy (column, swimlane) could make them whole in SQL; the PR states its reason (out of this card's scope). That reason is accepted, and it is a follow-up candidate (N5).
  • Author. PR user.login is objectstack-fleet[bot], so no external author needs naming.
  • Observation (not graded). The L1 hand-off comment 7205399887 says "All 16 Test UI shards pass". The head ran the 10 legs its affected plan started, all green. The gate verdict is unaffected, but the sentence overstates it.

Findings, all nit (none affects correctness or the contract):

  • N1 · nit. The changeset's last sentence, "A swimlane board does not add the lanes that exist only past the page, as the flat board does.", can be read as the opposite of the truth. It ships as CHANGELOG text. Suggested wording: "…unlike the flat board, which adds them."
  • N2 · nit. The jsdoc is stale in KanbanImpl.tsx. KanbanBoardProps.laneCounts still says "Drawn on the flat layout only." The LaneFootStatistic jsdoc names SwimlaneFootRow, but no such component exists; the foot row is inline in KanbanBoardInner.
  • N3 · nit. No test in this diff pins the now-explicit !flatLanes gate on extraLaneIds, which carries a stated decision. Add the pin when 看板按查找字段分道:第一页之后的分道只显示计数,没有办法加载它的卡片(接 #37327) #37517's work revisits swimlane past-page lanes.
  • N4 · nit. The swimlane foot is pinned for sum and count only. avg, min and max share the path by construction, but no pin holds that.
  • N5 · nit, follow-up candidate. Swimlane row counts and per-cell figures stay page floors. On a self-querying windowed board, the count statistic and column counts are floors, although the same read could carry laneCount. One two-key grouped read would push both to SQL. This is outside this card's scope.

Implemented-by: claude/project-thread-axt9gn
Reviewed-by: session_01L6bhgV6i8jfWwSXjpWJrjA

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

席位核对 — ACCEPT · head 7107c85 · card #37326 · area s2-ux-P · 2026-11-26T23:25Z

L1 checklist

  • Shape and relation. l1-face.mjs --pr 37714 read 13 items and flagged none; 52 check-runs on this head, each success or a path-filter skip (10 planned Test UI legs ran, all green). Four files in @object-ui/plugin-kanban, patch.
  • Fixes #37326 is right. A kanban in swimlanes now draws the lane-foot statistic the view settings offer: one row under all lanes, one figure per column, the same figure as the flat board for count, sum, avg, min and max, read under the viewer's own access. With one page handed over, column counts read the whole column; a swimlane row's own count stays a page floor marked +. The card left the choice to the implementer; drawing it is the PR's stated decision.
  • Small decision. Swimlane boards do not append columns that only have records on later pages, while the flat board does. This is main's behaviour made explicit (the swimlane layout has no per-cell "not loaded" state); the reviewer accepted it. Loading past-page lanes is 看板按查找字段分道:第一页之后的分道只显示计数,没有办法加载它的卡片(接 #37327) #37517's, which should cover swimlanes.
  • Contract review. Record 7205497529 on this head: PASS, nits N1–N5 only, no must-fix, no should-fix. Adopted; the nits go to follow-up card review follow-ups of PR #37714: swimlane kanban changelog line reads backwards; stale jsdocs; unpinned later-page gate and aggregates #37718.
  • Declarations. Clause-②: no, Metadata-protocol: none. True.
  • Governance. check-governed-merges.mjs: not governed. Tier S.

Tier: S. Landing: ready + auto-merge by this stroke.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 26, 2026 23:25
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 26, 2026
Merged via the queue into main with commit 0f8e13b Nov 26, 2026
53 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-axt9gn branch November 26, 2026 23:53
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…nd pins say what it does (objectstack-ai#37849)

<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuDJAbBe3iTrFcF7GZrucZ32)_

Fixes objectstack-ai#37718

These are the review nits N1–N4 left by PR objectstack-ai#37714, the swimlane lane
statistic. N5 moves to objectstack-ai#37844 and is not in this PR.

## Premise, measured on `main`

- **N1.** `.changeset/37326-swimlane-lane-statistic.md` is still
unreleased on `main`. Its last sentence reads "A swimlane board does not
add the lanes that exist only past the page, as the flat board does."
That can read as if the flat board also does not add them.
- **N2.** `KanbanImpl.tsx` has two stale jsdocs:
- `KanbanBoardProps.laneCounts` says "Drawn on the flat layout only".
The swimlane layout reads it in `swimlaneColumnCount` and
`swimlaneCountIsWhole`.
- The `LaneFootStatistic` jsdoc names `SwimlaneFootRow`, which is
defined nowhere.
- **N3.** Nothing pins the `!flatLanes` gate on `extraLaneIds` in
`ObjectKanban.tsx`.
- **N4.** The 37326 test pins `sum` and `count` only.

## What changes

- **Changeset (N1):** the sentence now ends "unlike the flat board,
which adds them". The open release PR (objectstack-ai#37661) carries the old sentence.
It picks up the new one when it regenerates.
- **`KanbanImpl.tsx`, jsdoc only (N2):**
- `laneCounts` is drawn on both layouts: the flat lane header, and a
swimlane board's column title row and foot. There it is the column's
count across every swimlane. A swimlane row's own count stays the cards
drawn, and only takes its `+` from `laneCounts`.
- `LaneFootStatistic` now names the swimlane layout's
`data-kanban-swimlane-foot` row.
- **`ObjectKanban.swimlaneStatistic-37326.test.tsx`:**
- **(g), N4:** `avg`, `min` and `max` at the swimlane foot, one case
each. Each is read from the one grouped read, grouped by the column
field alone: avg `9.5`/`1.5`, min `0`/`0`, max `19`/`3`. The test's
grouped-read stub now computes those three functions too.
- **(h), N3:** a board laned by a lookup field, handed one page with its
query, where one account's deals all sit past the page.
- In swimlanes it draws the page's two columns only and asks no title
read for the later lane.
- **CONTROL:** the flat board draws that lane, titled by its account,
after an `id IN ('a3')` read.
- With the `!flatLanes` term removed, the swimlane case goes red and the
CONTROL stays green.

## Decisions made here

- **N3 pinned here, not with objectstack-ai#37517.** The pin sits next to the swimlane
foot tests it guards and needs no other change. objectstack-ai#37517 can extend it.
- **No new changeset.** No shipped behaviour changes. The one changeset
edit is N1.

## Verification

- `vitest` over all of `@object-ui/plugin-kanban`: 91 files, 609 passed.
The 37326 file alone: 11 passed, 1 red with the gate removed, as above.
- `tsc -p tsconfig.test.json` for plugin-kanban: clean.
- `overlap-check`: exit 0. It shares the changeset with release PR
objectstack-ai#37661, which merges cleanly.

Clause-②: no
Metadata-protocol: none
Skills-docs: none

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(No spec change.)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `eslint` on the changed files passes (the
full `pnpm lint` runs in CI).
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01L6bhgUuauSMJu1nVSQRQri)_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01L6bhgUuauSMJu1nVSQRQri

<!-- signed: repo:objectstack#2 · os-sales ·
session_01L6bhgUuauSMJu1nVSQRQri -->

Co-authored-by: Claude <noreply@anthropic.com>
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.

Kanban in swimlanes draws no lane-foot statistic, though the view settings offer one

2 participants