Skip to content

feat(service-analytics): bucket + format date dimensions (no more epoch millis)#1682

Merged
os-zhuang merged 1 commit into
mainfrom
fix-analytics-date-dimension-format
Jun 10, 2026
Merged

feat(service-analytics): bucket + format date dimensions (no more epoch millis)#1682
os-zhuang merged 1 commit into
mainfrom
fix-analytics-date-dimension-format

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Problem

Date dimensions on trend charts rendered the raw stored timestamp (1777632968596) instead of a readable date — a plain selected date dimension grouped by the raw field and the value was never formatted. (Reported alongside the lookup-id / select-value issue fixed in #1680.)

Fix

  • DatasetExecutor — a selected date dimension that declares an explicit dateGranularity (single-entry compiled granularities) is promoted to a time dimension, so it buckets (one row per month/day/…) instead of one per raw timestamp. Dimensions already carried by selection.timeDimensions (e.g. compareTo) are left untouched.
  • dimension-labels — grouped date values are formatted to a sort-stable label per granularity: year2026, quarter2026-Q2, month2026-04, day/week2026-04-15. Parses epoch-ms / epoch-s / ISO defensively; non-dates pass through unchanged.
  • showcasechart-gallery dataset's created_at gains dateGranularity: 'month'.

Verification

Browser-tested on the showcase Chart Gallery: "Tasks Created (monthly)" x-axis now reads 2026-05 / 2026-06 (was epoch millis); status/priority bars still show resolved labels. New unit tests for formatDateBucket + date-dimension resolution. turbo build 72/72, turbo test 123/123 green.

Completes the analytics dimension-display follow-up (after #1680 labels + #1681 report rendering).

🤖 Generated with Claude Code

…ch millis)

Date dimensions on trend charts rendered the raw stored timestamp
(`1777632968596`) because a plain selected date dimension grouped by the raw
field and the value was never formatted.

- DatasetExecutor: a selected date dimension that declares an explicit
  `dateGranularity` (single-entry compiled `granularities`) is promoted to a
  time dimension, so it buckets (one row per month/day/…) instead of one row
  per raw timestamp. Dimensions already carried by `selection.timeDimensions`
  (e.g. compareTo) are untouched.
- dimension-labels: grouped date values are formatted to a sort-stable label
  per granularity (year `2026`, quarter `2026-Q2`, month `2026-04`,
  day/week `2026-04-15`); parses epoch-ms/epoch-s/ISO defensively and leaves
  non-dates unchanged.
- showcase chart-gallery dataset: `created_at` gains `dateGranularity: 'month'`
  so the trend widgets bucket monthly.

Browser-verified on the showcase Chart Gallery: "Tasks Created (monthly)" now
shows `2026-05` / `2026-06` buckets. turbo build 72/72, test 123/123 green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 10, 2026 11:18am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation tests tooling size/m labels Jun 10, 2026
@os-zhuang
os-zhuang merged commit abcbbf1 into main Jun 10, 2026
12 checks passed
@os-zhuang
os-zhuang deleted the fix-analytics-date-dimension-format branch June 10, 2026 11:20
xuyushun441-sys added a commit that referenced this pull request Jun 13, 2026
…ing (#1803)

* chore: bump objectui to 76c38108544d

test(e2e): lookup quick-filter coverage (CRM parity) (#1682)

objectui@76c38108544dd92abf965c0e07b0e4d92264708a

* feat(service-ai): open framework AI is query-only, declines app-building

The unified `data_chat` persona (ADR-0040) advertises that it can BUILD or
CHANGE the application, but that capability is supplied entirely by the cloud
AI Studio plugin's `metadata_authoring`/`solution_design` skills and their
tools. On the open single-env framework those skills are not registered, so
the authoring tools never resolve — yet the LLM, still reading the "you can
build" persona, role-plays designing a whole system (emitting design docs it
has no tools to execute). Users saw the standalone open framework "develop"
a full 进销存 app that it could not actually create.

Fix: in buildSystemMessages, when no authoring (build-register) skill is
active, append a deployment-capability note constraining the assistant to
data/query and instructing it to decline build requests instead of pretending.
Keyed off actual skill presence, so cloud/EE (AI Studio loaded) keeps the full
build UX with zero extra wiring. Adds tests for both the absent and present
build-register cases.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
xuyushun441-sys pushed a commit that referenced this pull request Jun 13, 2026
test(e2e): lookup quick-filter coverage (CRM parity) (#1682)

objectui@76c38108544dd92abf965c0e07b0e4d92264708a
xuyushun441-sys added a commit that referenced this pull request Jun 13, 2026
Picks up objectui#1684 — interface pages (ADR-0047) now render data
columns when the referenced source view is served hollow (columns only
in named views), instead of a bare row-number grid. Also rolls up
#1680/#1681/#1682 (toolbar viz dropdown, URL filter persistence, lookup
quick-filter e2e) that landed after the previous pin (76c38108544d).

build-console.sh builds clean at this SHA (33 MB dist, verified locally).

Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <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 tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant