Repository navigation
analytics: ready for React 19 and Router 7 (drizzle-cube 0.12.2) - #14
Merged
Merged
Conversation
Widen SavePortletModal's builder ref to RefObject<T | null>, drop the removed v7 future flags from the date-filter test's MemoryRouter, and resolve the @nivo/heatmap alias with import.meta.dirname so Vite 8's native config loader stops warning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0.12.2 declares React 19 peers and fixes a stored XSS in markdown portlets. Its types only gain optional fields and it reads stored dashboard configs unchanged. Since 0.10.1 drizzle-cube warns on a portlet mapped to a universal time filter it cannot reach, so Recent Members now pins the filter to TenantUsers.joinedAt, and the template test fails such a mapping. The skills and docs describe 0.12.2's query rules: no server gap fill, granularity-less time dimensions filter only, unparseable dates and ungrouped measure filters are 400s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
drizzle-cube resolves a universal time filter from dateRange before values, and its filter editor saves both. dashboardDateFilters only replaced values, so once a dashboard's date filter had been edited the page's 7/30/90-day control no longer changed that dashboard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The kit's vite.config.ts names '@nivo/heatmap' in a comment, and Biome splits the alias across lines, so counting the bare name prints 2 on a correct install. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0.12.2 shows its own date filter bar to viewers and disables a filter the host owns unless the host takes its changes. The dashboard now passes onDashboardFiltersChange, so both controls drive the same URL state. A bar choice the page buttons don't offer, such as last 3 months or this quarter, is kept as ?range=rel&rel=<range>, checked against the relative ranges the server parses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
plugin upgrade replaces the heatmap alias line but does not run Biome, so the gate fails lint until vite.config.ts is formatted. Pages copied from Organisation Overview keep the old mapping and cannot be reset, so the note says how to remap the card instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step 1 of the React 19 / Router 7 move: analytics compiles and runs on today's kit (React 18, Router 6) and on React 19.3 with Router 7.18, so the kit can move next. Imports stay on
react-router-dom; switching toreact-routeris 4.0.0.Summary
drizzle-cube 0.8.3 → 0.12.2 only adds optional fields to the types the plugin imports, and reads stored
analytics_pagesconfigs unchanged. Three of its behaviour changes needed code:The
analytics*skills, README and dashboard docs now name 0.12.2 and its query rules (no server gap fill, unparseable dates and ungrouped measure filters are 400s).docs/upgrades/unreleased.mdhas the porting note;breaking: false.Evidence
All in scratch kit worktrees on kit
main(2b2558c, 0.24.0), plugin installed from this branch.Before (earlier kit session, same day): on React 19.3.1 / Router 7.18.5 with analytics 3.4.2 the kit's typecheck failed (
TS2322atQueryBuilderPage.tsx:77, and thefutureprop onMemoryRouter).After:
pnpm gatefutureprops removedpnpm plugin upgradeBrowser on each: both seeded dashboards render; Explore runs a query; Save to dashboard adds the portlet; the grid editor opens; no console errors. On React 19 the lockfile resolves one
react-router(7.18.5) and onereact-dom(19.3.1).Before: the date-control test with a saved
dateRangefailed —expected "dateRange": "last 7 days", received "last 30 days".After: passes; 26/26 analytics UI tests.
Before: drizzle-cube's filter bar showed greyed out, "This filter is controlled by the host application", beside the page control.
After: clicking 3M in the bar sets
?range=rel&rel=last+3+monthsand moves every mapped chart; clicking "Last 30 days" on the page selects 30D in the bar.Before: with the old
[TIME_FILTER]mapping restored,all-templatesfails:recent-members needs timeDimensions or a member for time-filter.After: passes; at "Last 7 days" Recent Members lists the 2 members who joined in that window.
Upgrade path:
plugin upgradereplaces the alias line in place (one'@nivo/heatmap': path.resolve(line, no__dirname) and leaves stored dashboard configs byte-identical. It does not run Biome on the replaced line, so the note adds a format step. A pre-upgrade page shows the "does not narrow" warning on Recent Members until it is reset (template pages) or remapped in the editor (copies); both were checked.Not in this PR:
(!) Some chunks are larger than 500 kB: present with 0.8.3 too (exceljs, 907 KB); a follow-up PR./api/analytics/facts/statusreadsmax()across all tenants whenTENANT_SCOPE_MODEisoff; a follow-up PR.plugin upgradedoes not Biome-format core edits;plugin addrunspnpm installwithoutminimum-release-age.Merge Danger
Door: two-way
Nothing is released until
node scripts/release.mjs 3.8.0. After release, an installed copy rolls back withpnpm plugin upgrade analytics --to 3.7.0; no schema change.Blast Radius: dashboards
Every host with analytics gets drizzle-cube 0.12.2 on upgrade. Raw
/cubejs-api/v1/loadand MCPloadcallers no longer get zero-filled time buckets unless they setfillMissingDates: true; dashboards and Explore look the same. Pre-existing Organisation Overview pages show a warning on Recent Members until reset or remapped.🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com