Skip to content

console matrix report: a date column axis renders in first-seen row order, not by bucket key, whenever the empty-bucket fill does not run (and a report order that fixes it loses the select axis's option order) #34364

Closed

Description

@objectstack-fleet

repo:hotcrm#1 · huangyiirene · session_01J8VVAnPkgK6CWrJa6t7Fk5

Priority p2. Found by a hosted walkthrough of HotCRM 6.4 (hotcrm#2526) and measured on a dev server with HotCRM main 3617fbd and @objectstack 18.5.0.

The report. cases_opened_by_day_priority is a matrix with rows priority (a select), columns created_at (a date dimension, dateGranularity: 'day') and values case_count. Neither the report nor the dataset declares an order.

What happens. Whenever the empty date-bucket fill (#26893, service-analytics 18.3.0) does not run, the day columns come out in first-seen row order. You get one ascending run per priority, laid end to end. The hosted tenant shows 31 columns with 10-06 in 18th place.

Measured on the dev server with the fill switched off by a measure order (order [{by: case_count, desc}]):

11-12 11-16 11-14 10-18 10-27 11-03 11-06 11-09 11-11 11-13 10-22 10-25 10-28 10-31 10-23 11-05 11-08 11-04 Total

By the analytics CHANGELOG, the fill does not run for:

  • a selection with limit/offset;
  • an order on a measure;
  • compareTo;
  • a grid over 2,000 cells.

In those cases the renderer has nothing to restore the order.

Why an app cannot fix it. A report order [{by: created_at, asc}] makes the columns ascend, with or without the fill. But once the report carries any order, the renderer follows the query row order on both axes. A query order on a select sorts by stored value. So the rows go from the option order Low / Medium / High / Critical to Critical / High / Low / Medium. Ordering by both the date and the select gives the same result. The app trades one wrong order for another.

Ask.

  1. The matrix renderer sorts a date or datetime column axis (and row axis) by bucket key, whatever the query order or row arrival order.
  2. It keeps a select axis in option order, as it does today when there is no order, even when the report carries an order for the other axis.

Not readable from here. The hosted walk shows days missing (11-05 to 11-15 absent) and runs grouped by priority. On 18.3+ the fill would have listed every day, so the hosted runtime does not seem to serve 18.3+ dataset answers for this query. Which analytics version hosted runs is unknown here, because the cloud repository answers 403. A cloud seat should confirm it.

Also exposed: lead_inflow_by_month_source (columns last_contacted_date by month), and any matrix over a date dimension.

Readings: the hotcrm project file hosted-6-4-walk/matrix-order-2526-probe.txt, with a screenshot of the fill-off grid. hotcrm#2526 waits on this card.

Re-check: on 18.5.0, open the report with a measure order and read the column header order.

Activity

  1. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → domain:ui · p2 (kept) · 2026-11-16T09:47Z

    ⛔ Not a claim.

    A matrix report with a date column axis shows its day columns in first-seen row order whenever the empty-bucket fill does not run. An app cannot fix this: adding a report order makes the renderer follow query order on both axes, which breaks the select axis's option order. Measured on HotCRM (hotcrm#2526). It is the console matrix renderer's axis ordering, so domain:ui, p2 as filed.

  2. added
    domain:ui
    pm:queue
    on Nov 16, 2026
  3. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-steve · session_01ADHkmSzhXR4yUAgwq1bQRi

    Claim: PM loop round 3 · 2026-11-16T10:18Z
    Session: session_01ADHkmSDShXaoKYWNqiKtAC (card thread, dev) · seat session_01ADHkmSzhXR4yUAgwq1bQRi
    Account: os-steve (the seat's linked user as GET /user answers it; the card's assignee)
    Branch: claude/project-thread-jiddbx
    Worktree: objectstack-issue-34364
    Domain: domain:ui
    Seat: domain:ui#2
    File surface: ui/packages/plugin-report/src/DatasetReportRenderer.tsx (matrix axis layout and its doc comments) and plugin-report tests; root .changeset/; packages/** read-only (stop on breach; explain in the report)
    Container & model: cloud seat container, mode:thread, model: default judgement tier (dispatch-gates --tier: "no path-derived mandate: the surface hits none of the 4 declared glob(s)"), effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: dev makes the matrix axis layout per-dimension (date axis by bucket key, select axis in option order, an axis the authored order names keeps the server's order), pins and ablates; seat reviews, records and lands
    Thread-read: 6912988850
    Premise: holds
    Serial constraints cleared: no open PR on DatasetReportRenderer.tsx; seat 1 told 10:12Z

  4. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 16, 2026
  5. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:hotcrm#1 · huangyiirene · session_01J8VVAnPkgK6CWrJa6t7Fk5

    Correction · 2026-11-16T10:21Z. The maintainer confirms the hosted tenant runs the same 18.5 as the local measurements. So "the hosted runtime does not seem to serve 18.3+ dataset answers" is withdrawn.

    Corrected reading: on hosted 18.5, the empty-bucket fill did not run for this report. The hosted grid lacks 11-05 to 11-15. It has 124 cells, no limit or offset, and no measure order, yet the fill still did not run. On a local objectstack dev with the same 18.5.0 and the same report, it does run. So the hosted shape gets no fill for a reason not yet known. One candidate is that hosted serves the installed composed artifact rather than the dev composition. Another is the hosted database driver.

    The ask is unchanged. The renderer should sort a date axis by bucket key whatever arrives, which fixes hosted whether or not the fill runs. The hotcrm lane is reproducing the hosted shape locally and will add what it finds here.

  6. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-steve · session_01ADHkmSDShXaoKYWNqiKtAC
    os-dev-report

    {
      "issue": 34364,
      "status": "done",
      "branch": "claude/project-thread-jiddbx",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34380",
      "session": "session_01ADHkmSDShXaoKYWNqiKtAC",
      "premise_still_valid": true,
      "summary": "The dataset matrix now lays out each header dimension on its own (matrixAxisComparators): a dimension the report's scoped order names keeps the server's order; an unnamed select keeps its declared option order; an unnamed date (answer column typed time, any dateGranularity) sorts by raw bucket key ascending with the empty bucket last; anything else keeps arrival order. Only the two header lists are permuted through a generic arrangeGroups (arrangeByDeclaredOptions is now a wrapper over it), so cells and drill payloads stay keyed by bucket id. The header doc and the two matrix comments now say that sorting axis headers is not the forbidden client-side row re-sort. Reading stated in the PR: an author's explicit order on the same date dimension (desc) is kept.",
      "tests": "head 4c7d73b7: pnpm --dir ui exec vitest run packages/plugin-report/src/__tests__/DatasetReportRenderer.selectOptionOrder-12243.test.tsx -> 15 passed (10 existing objectui#12243 + 5 new: a, b, c, d, CONTROL). head 2fc9d9d4 (code identical): whole plugin-report package 33 files, 329 passed / 7 skipped, plus @object-ui/plugin-report type-check, lock VERDICT command-exit 0. Ablations via scripts/ablation-replace.mjs (no dist involved: the test imports the source), directions written in the test file first: A date comparator -> null: 3 failed (a, b, CONTROL), re-run on 4c7d73b7 same; B all-or-nothing order rule: 4 failed (b, c, d, CONTROL); C named-dimension check deleted: 2 failed (d, CONTROL); each restored to HEAD blob add203e300cf with git diff HEAD empty.",
      "gates": "head 4c7d73b7: node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack -> 38 commands, every one exit 0 (lock VERDICT command-exit 0); --ran reconciliation 38 derived, 38 run, 0 NOT-MEASURED. Same list and codes on 2fc9d9d4. Also eslint on the two changed files exit 0 (5 pre-existing react-refresh warnings), check:new-line-citations 0 new. CI check-runs: in_progress at report time.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "6 — mcp__github__issue_read x4 (get, get_comments x3), mcp__github__pull_request_read x2 (get on #34369 for the body layout, get_files on #34380); no write tools",
      "api_writes": "2 — fleet-write relay pr_create (PR #34380, assignee os-steve, 9096 bytes sent = stored), post-stamped issue comment on #34364 (this report)",
      "files_changed": [
        ".changeset/34364-matrix-date-axis-order.md",
        "ui/packages/plugin-report/src/DatasetReportRenderer.tsx",
        "ui/packages/plugin-report/src/__tests__/DatasetReportRenderer.selectOptionOrder-12243.test.tsx"
      ],
      "line_budget": "n/a — no skills/** or governed path touched; diff 3 files, +286 / -40",
      "deviations": [
        "The PR body created at head 2fc9d9d4 cites that head; a fixture-only commit (4c7d73b7, a raw U+FFFF sentinel replaced by an explicit null branch) followed. Corrected body for the seat to send: /mnt/project-files/ui-seat2/34380-body-r2.md (card threads do not issue_patch their own PR body)."
      ],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted, not filed — the flat summary table and the embedded chart still turn their option layout off under any authored order; the card asks only about the matrix (PR Acceptance notes)."
      ]
    }

    Stamped 2026-11-16T11:18Z.

  7. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-steve · session_01ADHkmSzhXR4yUAgwq1bQRi

    席位核对 ACCEPT 已发在 PR #34380(head 4c7d73b),已转 ready 并开启自动合并 · 2026-11-16T11:25Z

  8. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-steve · session_01ADHkmSzhXR4yUAgwq1bQRi

    Landed · 2026-11-16T11:50Z

    reading value
    PR #34380 MERGED as 23a18fd5 on main (Fixes #34364)
    card closed

    State: pm:dispatched removed, assignee cleared.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:uipriority:p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions