feat(studio): online dataset authoring — create form, derived measures, joined-query fix#2248
Merged
Merged
Conversation
…s, joined-query fix Dogfooded online dataset (ADR-0021 semantic layer) authoring in Studio as a business user and fixed three issues found: - spec: add `dataset.form.ts` (sectioned create form + `object` picker) and register it in `METADATA_FORM_REGISTRY`. `dataset` was the only UI-authorable metadata type without a `defineForm` layout, so its create surface fell back to the flat auto-layout. - spec: make `DatasetMeasure.aggregate` optional so derived measures are authorable without a dummy aggregate (required for non-derived only, enforced in `superRefine`). Backward compatible. - service-analytics: qualify base-object columns in joined dataset queries to fix "ambiguous column name" 500s when base/joined tables share a column (e.g. `status`). Single-object cubes unchanged. Tests: spec 6624, service-analytics 151 (+4 regression), full build 76/76. Browser-verified: improved create form; joined+derived dataset query returns correct values (utilization = spent/budget = 70.0% / 97.8% / 40.0% / 96.0%). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 2 package(s): 93 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
The public API-surface snapshot check flagged `+ datasetForm (const)`; regenerate api-surface.json to include the new export. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
Dogfooded online dataset authoring (ADR-0021 analytics semantic layer) in the Studio app as a business user, found three issues, fixed them, and browser-verified each.
dataset.form.ts(sectioned create form +objectpicker) + register inMETADATA_FORM_REGISTRY@objectstack/specDatasetMeasure.aggregateoptional — derived measures no longer need a dummy aggregate (required for non-derived only)@objectstack/specambiguous column name500s@objectstack/service-analyticsWhy
datasetwas the only UI-authorable metadata type without adefineForm, so Studio's create surface fell back to the flat auto-layout (free-textobject, no grouping).derived: { op, of }) ignoresaggregateat compile time, but the schema still required it → saving a derived measure failed validation (422) unless you added a meaningless aggregate.include+relationship.field) emitted bare base-table columns while joined columns were alias-qualified; when both tables share a column name (e.g.status), the query 500'd withambiguous column name.Verification
@objectstack/spectests: 6624 pass (+2 derived-aggregate regression)@objectstack/service-analyticstests: 151 pass (+2 base-column-qualification regression innative-sql-rls.test.ts)aggregateoptional)utilization = spent/budget= Contoso 70.0%, Fabrikam 97.8%, Northwind 40.0% / 96.0%, withaccount.namejoin + basestatusgrouping +US$formatting.Notes / follow-ups (objectui, out of scope)
include/filterare intentionally curated out of the create form (the rich designer canvas owns them viaCREATE_MODE_CANVAS_TYPES/hiddenFieldsinResourceEditPage.tsx). The clean long-term fix is to add'dataset'to the canvas-create list (same move as the in-flight report-create-canvas work) so create == the rich designer. Tracked separately to avoid colliding with that change.filter(scope) editor — possible objectui follow-up.🤖 Generated with Claude Code