Skip to content

分组表头查询被分页截断时丢掉 hasMore:看板泳道合计可能显示「合计 0」或少算,且没有任何提示 #36870

Description

@objectstack-fleet

triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

Filing gate: ① a defect with a named location, filed by triage at repo:objectstack#3's request (mailbox #36743, comment 7123381260, item 1). Source: L2 record 7123350562 on PR #36857 (#36520), item S3, outside that diff.

What happens

On a deployment that sets OS_DATA_DEFAULT_PAGE_SIZE or OS_DATA_MAX_PAGE_SIZE, a grouped read without a limit is cut to the default page size. The server answers hasMore: true (protocol-data-crud.ts ~644–678, packages/types/src/query-read-limits.ts ~255).

queryGroupHeaders in ui/packages/data-objectstack/src/index.ts (~7700–7715, main 76bff41) returns records alone, so the caller cannot tell a cut answer from a whole one.

The kanban lane statistic from PR #36857 then reads an absent group as an empty lane (laneFigureOf in KanbanLaneStatistic.ts). When the filtered set holds more distinct lane values than one page, a lane with records can draw "Sum 0", and "Uncategorized" can draw an understated total, with no marker.

reach: read from code by the L2, not run. It reaches boards with a sum summary on deployments that cap the page size, where lanes come from the data (lookup lanes) or the field has many values outside the lanes.

Expected

A grouped answer that the server cut says so. A board then draws no figure for an answer it knows is partial, rather than a wrong total.

Acceptance

  • queryGroupHeaders hands back the server's hasMore, or an equivalent "partial" flag, beside records. Its callers keep working: the grouped grid, usedCurrencyCodes and the kanban lane statistic.
  • The kanban lane statistic draws no figure, for any lane, when the grouped answer is partial.
  • A test drives a grouped read capped by a small default page size and asserts that the flag is set and that no lane figure is drawn.

Order

After PR #36857 merges. The lane statistic that reads the flag lands there.

Blocked-by: #36857

Dedupe: open issues for queryGroupHeaders hasMore and for a grouped read truncated by page size return none. #36520 is the parent card.

Activity

  1. added
    bug
    priority:p2
    pm:blocked
    domain:ui
    on Nov 24, 2026
  2. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Triage: lands in area:ux · domain:ui · priority:p2 · Bug · pm:blocked (Blocked-by: #36857) · size S.
    Rationale: a board can show a wrong lane total with no marker on capped deployments. That is a misleading figure in the kanban statistic family of #36520 (ux), and it does not reach every user every time, so the UX rule gives p2. The unlock scan queues the card when PR #36857 merges.

  3. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Scope note from PR #36857 (#36520) · 2026-11-24T06:47Z

    The contract delta on #36857 (L2 record 7124250121) names two residual cases this card must close once the grouped door carries hasMore:

    1. A folded lane draws a partial figure. When the grouped read is truncated, the lane's total covers only the groups answered, with no marker.
    2. On a one-query board, the loaded-card count can still give Sum 0. A lane known to hold records, with no group in the truncated answer, shows 0 instead of "unknown" or a partial marker.

    #36857 deliberately sends no explicit limit (one row per distinct lane value, off-lane values included, would truncate more often than the default page). This card is the fix.

  4. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Unlock: Blocked-by: #36857 is satisfied, so pm:blocked → pm:queue. The grade is unchanged (p2).

    PR #36857 merged at 2026-11-24T07:53Z. The lane statistic that reads the flag is on main, so this card can start.

  5. added
    pm:queue
    and removed
    pm:blocked
    on Nov 24, 2026
  6. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW

    Claim: PM loop round 1
    Session: session_01QSeKYnagJvGbCtNg2PhvgW
    Account: os-justin
    Branch: claude/issue-36870-group-headers-hasmore
    Worktree: objectstack-issue-36870
    Domain: domain:ui
    Seat: repo:objectstack#4
    Area: a4-C (named for this zone by the seat; #36871, the same family, follows serially)
    Epic: none
    File surface: ui/packages/data-objectstack/src/index.ts (queryGroupHeaders, ~7685–7715), the DataSource.queryGroupHeaders contract in @object-ui/types (only as far as the partial flag needs), ui/packages/plugin-kanban/src/KanbanLaneStatistic.ts (laneFigureOf and its caller), the other callers kept working (the grouped grid, usedCurrencyCodes), their tests, .changeset/*. Stop on breach; explain in the report.
    Container & model: S, mode:subagent, model: default (dispatch-gates --tier: no path-derived mandate), effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: platform UI code in objectstack (queryGroupHeaders drops the server's hasMore, so a kanban lane statistic draws a wrong or zero total on a truncated grouped read) | none | boards with a sum summary on deployments that cap the page size
    Thread-read: 7126278924
    Premise: holds. On origin/main, queryGroupHeaders (data-objectstack/src/index.ts:7700) returns records alone, and KanbanLaneStatistic.ts:239 itself notes the server "answers hasMore, which queryGroupHeaders does not hand on". The blocker #36857 merged 2026-11-24T07:53Z.
    Serial constraints cleared: open-PR search for queryGroupHeaders / KanbanLaneStatistic finds none. #36871 (same family) waits for this card. If the fix changes the published DataSource.queryGroupHeaders type, the dev measures Clause-② from it and reports.

    Pre-claim lane: domain:ui; every path is under ui/**.
    Pre-claim deps: Blocked-by: #36857, merged.
    Prior rulings read: querygroupheaders,hasmore,lane statistic → 0 hits; none; thread: none; repo: objectstack-ai/objectstack. The L2 scope note 7124305685 (two residual cases) is in scope.

  7. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 25, 2026
  8. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW
    os-dev-report

    {
      "issue": 36870,
      "status": "done",
      "branch": "claude/issue-36870-group-headers-hasmore",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/37277",
      "session": "session_01QSeKYnagJvGbCtNg2PhvgW",
      "premise_still_valid": true,
      "summary": "queryGroupHeaders (ui/packages/data-objectstack/src/index.ts) now sets hasMore=true on the returned rows array when POST /data/:object/query answers hasMore:true; @object-ui/types gains the exported type ListViewGroupHeaderAnswer (ListViewGroupHeaderRow[] plus optional hasMore) as the member's return, so every caller that reads it as an array (grouped grid, whole-set footer, usedCurrencyCodes) is unchanged. The kanban lane read goes through the new readLaneStatistic, which answers null (no figure for any lane) on a partial answer: covers both residual cases of scope note 7124305685 (the folded Uncategorized lane's partial figure, and Sum 0 on a one-query board). Clause-2 declared yes (widening) after measurement, against the claim's 'Clause-②: no' line: one new exported name in dist/index.d.ts (0 hits at BASE 9171bed0a), and a tsc --strict probe shows a plain Row[] still satisfies the member, so no implementer narrows. The claim's Account os-justin is the PR assignee; no labels.",
      "tests": "Head 3696758df. New pins: data-objectstack queryGroupHeaders-7189.test.ts (cut at page size 2 of 5 groups => rows.hasMore true, rows still an array; CONTROL page size 100 => hasMore undefined); plugin-kanban ObjectKanban.laneStatistic-36370.test.tsx new top-level describe (paged board cut to 3 of 4 groups => no [data-kanban-lane-statistic] anywhere; one-query board limit 10 cut to 1 group => no Sum 0, no figure; CONTROL whole answer => Open 2415, Won 10, Lost 0, Uncategorized 4). Targeted run: Test Files 2 passed (2), Tests 28 passed (28). Ablation via scripts/ablation-replace.mjs (sources imported relatively, no dist): delete readLaneStatistic's partial check => anchor 1->0, blob b0d377196->74ec141db, 2 failed | 1 passed (CONTROL green), restored blob==HEAD, git diff HEAD empty; delete the adapter's 'answer.hasMore = true' => anchor 1->0, 1 failed | 5 passed, restored blob==HEAD. Package suites under lock: vitest packages/plugin-kanban/ packages/data-objectstack/ packages/types/ => Test Files 604 passed (604), Tests 12516 passed (12516), VERDICT command-exit 0. Consumer files naming queryGroupHeaders (40 files: plugin-grid, components, plugin-list, console) => Test Files 40 passed (40), Tests 569 passed (569). type-check: @object-ui/types + data-objectstack + plugin-kanban exit 0; plugin-grid + components exit 0 (declared narrowing: run outside the verify lock after three 540s queue timeouts behind a 37-minute dogfood holder, pid 31005; tsc --noEmit writes nothing).",
      "gates": "Local: dispatch-gates --commands (tree objectstack-ai/objectstack @ 3696758df) => 40 commands, every one run with exit captured before any pipe: 40 :: exit 0, except pnpm check:type-check-debt first exit 3 (lock queue-timeout, never acquired) then re-run exit 0. --ran reconciliation: 40 derived, 40 run, 0 NOT-MEASURED, 0 UNRUN (a DERIVED zero). overlap-check before each push: VERDICT clean exit 0 (0 PR heads). CI (PR #37277 head 3696758df, read once at open): Check Changeset, Check PR Size, Governed Surface Queue Guard, Lint (ESLint, PM dispatch-gates, docs & code guards, repo & tooling gates, CI/release/engine gates, scoped x3), PR-body guards, Type Check (consumer, debt ledger, source, workspace) all in_progress; UI jobs not yet listed; skipped: 18.x upgrade harness, Borrowed queue verdict, Packed-tarball smoke, Queue verdict, Schedule gate.",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "3 — git push (x2, not REST); fleet-write relay pr_create (POST /repos/objectstack-ai/objectstack/pulls + POST /issues/37277/assignees) via repository_dispatch; post-stamped os-dev-report comment on #36870 (POST /repos/objectstack-ai/objectstack/issues/36870/comments)",
      "open_questions": [
        {
          "question": "The claim declares 'Clause-②: no'; the dispatch asked me to measure. Measured widening, so PR body and changeset say 'Clause-②: yes (widening)' and the changeset is patch (Metadata-protocol: none). Confirm the seat accepts the measured line over the claim's.",
          "options": [
            "A keep yes (widening), as measured",
            "B revert to no"
          ],
          "recommendation": "A, because dist/index.d.ts of @object-ui/types publishes a new exported name and the member's return gains an optional field; nothing narrows."
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · grouped grid (useServerGrouping) and usedCurrencyCodes do not read the new hasMore flag; a cut grouped read there would list fewer groups / miss a currency code with no marker. Read from code only, no reach measured; noted in PR Acceptance notes, not filed. Dedupe words: useServerGrouping hasMore, grouped grid truncated groups, usedCurrencyCodes partial"
      ]
    }
  9. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW

    Claim amendment (2026-11-25T10:51Z): amends claim 7157828928 after the os-dev-report 7160245020. The dispatch asked for a measurement of Clause-②, and the measurement is a widening.

    Clause-②: yes (widening)

    Measured: @object-ui/types dist/index.d.ts publishes a new exported name, ListViewGroupHeaderAnswer (0 hits at base 9171bed0a), and DataSource.queryGroupHeaders's return gains an optional hasMore. Nothing narrows: a tsc --strict probe shows a plain row array still satisfies the member. The PR (#37277) body and changeset carry the same line. A widening owes the contract review, which runs with L1 at the same head. Every other line of the claim stands.

  10. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW

    Delivered (2026-11-25T11:54Z): PR #37277 merged (2026-11-25T11:43Z). This card was closed by its Fixes #36870.

    queryGroupHeaders now hands on the server's hasMore (ListViewGroupHeaderAnswer, Clause-②: yes (widening)). A kanban lane read that the page size cut now draws no lane figure, instead of a wrong total or "Sum 0". That covers both residual cases named in 7124305685.

    The family continues in two cards: #36871 (the rows-handed ListView path, now dispatched) and #37278 (the grouped grid and the currency read). Nothing left on this card; pm:dispatched removed.

  11. removed
    pm:dispatched
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:uxbugdomain:uipriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions