Uh oh!
There was an error while loading. Please reload this page.
fix(plugin-report): drill by RAW stored value (correct for select/lookup dims) - #1842
Merged
Merged
Conversation
…kup dims) The report renderer's drill emitted a `groupKey` of DISPLAY labels (the server resolves dimension buckets to labels in `rows`). The host then had to re-fetch the dataset definition, reverse-map select labels, and SKIP lookup dims entirely (a lookup label is a record name, not the FK id) — so lookups drilled to a superset instead of filtering. Same bug class the dashboard already fixed. Now the renderer captures the server's `dimensionFields` + `drillRawRows` (it already returns them) and emits, alongside `groupKey`, the dataset's base `object` and an exact `objectFilter` (object FIELD → RAW stored value, ANDed with the scope filter) built via the shared `buildDatasetDrillFilter` (@object-ui/core, also now backing the dashboard's `buildDrillFilter`). ReportView gains a fast path: when `object` + `objectFilter` are present it navigates straight to the scoped list — correct for select/lookup dims, with no dataset-definition round-trip and no label reverse-mapping. Older servers without drill metadata fall back to the existing label-resolution path. Tests: plugin-report 44 passed (raw value, lookup FK, matrix cell, older-server fallback); plugin-dashboard DatasetWidget 33 passed (buildDrillFilter re-export); type-check green across core/plugin-report/plugin-dashboard/app-shell. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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 freeto 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.
The bug
The report renderer's drill emitted a
groupKeyof display labels (the analytics server resolves dimension buckets to labels inrows). The host (ReportView.handleDatasetDrill) then had to compensate: re-fetch the dataset definition, reverse-map select labels → option values, and skip lookup dims entirely (a lookup label is a record name, not the FK id) — so a lookup dimension drilled to a superset instead of filtering. This is the same class of bug the dashboard already fixed viadrillRawRows.The fix
The renderer already had
dimensionFields+drillRawRowsavailable fromqueryDatasetbut wasn't capturing them. Now it does, and alongsidegroupKeyit emits:object— the dataset's base object, andobjectFilter— an exact object FIELD → RAW stored value filter (ANDed with the render scope), built with the sharedbuildDatasetDrillFilter(@object-ui/core, which also now backs the dashboard'sbuildDrillFilter— single source of truth).ReportViewgains a fast path: whenobject+objectFilterare present it navigates straight to the scoped list — correct for select/lookup dims, with no dataset-definition round-trip and no label reverse-mapping. Older servers that don't return drill metadata fall back to the existing label-resolution path unchanged.Stacked on #1841 (now merged) for the shared
@object-ui/corehelpers.Behavior
Tests
plugin-report→ 44 passed: raw stored value (not display label), lookup FK id, matrix-cell over row+across dims, and the older-server fallback (noobjectFilter).plugin-dashboardDatasetWidget→ 33 passed (buildDrillFilterre-export).type-checkgreen across core / plugin-report / plugin-dashboard / app-shell.🤖 Generated with Claude Code