Repository navigation
feat(app-shell): Studio's report and widget dataset pickers offer New dataset, a draft dataset in the package - #27575
Merged
Conversation
…s (WIP) Studio's report dialog and dashboard widget inspector now read the draft-overlaid dataset catalog with the package's own datasets first, say when no dataset reads the package's objects, and offer a New dataset dialog that saves a dataset draft in the package and binds it. Claude-Session: https://claude.ai/code/session_01L6bhgVyybmRQMp8wgFRv8v Co-authored-by: Claude <noreply@anthropic.com>
…ocs and changeset (#27518) - datasetCreate.test.tsx: what the dialog writes (judged by DatasetSchema), the picker entry, the empty-state condition (no dataset reads one of the package's objects) and the post-create selection, for the New report dialog and the widget inspector; outside the Studio there is no entry. - The existing ReportCreateFields suites pass the authoring prop, and the Interfaces pillar doubles answer withPreviewDrafts. - analytics.mdx gains "Creating one in Studio"; the app-shell README names the context and the entry. Claude-Session: https://claude.ai/code/session_01L6bhgVyybmRQMp8wgFRv8v Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgVyybmRQMp8wgFRv8v Co-authored-by: Claude <noreply@anthropic.com>
The pull request body links them at the previous commit. Claude-Session: https://claude.ai/code/session_01L6bhgVyybmRQMp8wgFRv8v Co-authored-by: Claude <noreply@anthropic.com>
…7518) Claude-Session: https://claude.ai/code/session_01L6bhgVyybmRQMp8wgFRv8v Co-authored-by: Claude <noreply@anthropic.com>
This was referenced Oct 29, 2026
Contributor
Author
|
domain:ui#1 · os-sales · session_01L6bhgXU26UBEjd1KKHgNEx 席位核对 · ACCEPT · 2026-10-29T13:54ZHead-sha:
|
This was referenced Oct 29, 2026
This was referenced Oct 29, 2026
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.
Requested by Sales · project thread
维护者速读
dataset草稿存进当前包(走所有 Studio 条目共用的草稿门),选择器重新读目录并选中它。Studio 里这两个选择器改读叠加草稿的目录,本包的数据集排在最前;只要还没有数据集读本包的对象,就显示一行说明,指向这个按钮。sys_/showcase_的),Studio 里也没有新建数据集的入口。按 triage 方向:复用现有的dataset元数据类型和它的草稿/发布门,不另起报表数据源,不自动派生数据集(ADR-0084)。packages/spec未动。已知限制:数据集在发布前是草稿,Studio 画布按名查询草稿数据集会 404,发布后正常(见 Acceptance notes)。回滚 = revert 本 PR。ui/packages/app-shell/src/views/studio-design/datasetCreate.tsx(buildDatasetSkeleton、NewDatasetDialog、DatasetCreateEntry),然后是interfaceCreate.tsx的ReportCreateFields和DashboardWidgetInspector.tsx里接入的那几行。pnpm --dir ui exec vitest run packages/app-shell/src/views/studio-design/datasetCreate.test.tsx,应见 11 个用例全部通过(写出的内容过DatasetSchema、入口、空态条件、创建后选中,以及 Studio 外没有入口)。Fixes #27518
Clause-②: no
Metadata-protocol: none
Under the claim
6495604398. Studio's New report dialog and the dashboard widget inspector now offer New dataset beside their dataset pickers. It saves adatasetdraft in the current package through the draft door, and the picker selects it. While no dataset reads one of the package's objects, the picker says so and points at the button.Branch
claude/project-thread-csqe9s(the card thread's harness-pinned branch), cut fromorigin/mainataef631b80.What changes
The entry (
ui/packages/app-shell/src/views/studio-design/datasetCreate.tsx, new)StudioDatasetAuthoringContext: the Interfaces pillar provides{ packageId, onDraftSaved }. A dataset picker that finds it is in the Studio. Outside the Studio there is no context, so Setup's editors are unchanged.DatasetCreateEntry: the line and the button a picker renders.objectamong this package's non-system objects, whatever else the catalog holds (the card's empty-state condition). It reads the draft-overlaid object catalog (useObjectCatalog), so a draft-only object counts.reloadand then hands the name to the picker.NewDatasetDialog: the sharedCreateItemDialog(name and derived, editable identifier), anObjectPicker, and two checklists read from the draft-overlaid object (useObjectFields):sumeach.systemandhidden) are left out, as the Data rail leaves them out (isStudioHiddenSystemField).list('dataset')+listDrafts({ type: 'dataset' })), and the save sendsifNoneMatch: '*'for the race.client.save('dataset', name, body, { mode: 'draft', packageId, ifNoneMatch: '*', surface: 'studio' }), then the pillar'sonDraftSaved(the pending-changes count).buildDatasetSkeleton: the spec's dataset create seed (getMetadataCreateSeed('dataset'), its label-lesscountmeasure included), the author's name, label and object, one dimension per group-by field (type inferred as the dataset designer infers it,fieldTypeToDimensionType) and onesummeasure per total. A total whose name the seed already holds gets_sum, because measure names are unique. A field's label is written only when it differs from its name.datasetdocument, so Setup › Datasets edits it afterwards.The pickers
ReportCreateFields(interfaceCreate.tsx) takes the pillar'sauthoring. It reads the draft-overlaid catalog, lists the package's datasets first, and renders the entry under the picker. With an empty catalog it renders the entry alone, which replaces the old "There is no dataset to report on yet" line. A create binds{ dataset: name, measure: '' }.DashboardWidgetInspector: in the Studio, the draft-overlaid catalog, the package's datasets first, and the entry under the picker when the dashboard is writable. A create patches the widget'sdataset.ReportDefaultInspector: in the Studio it reads the draft-overlaid catalog too, so a report bound to a dataset that is still a draft offers its measures and dimensions in the Properties panel.useDatasetCatalog(override?, { previewDrafts })reads throughclient.withPreviewDrafts(true)when asked, and returnspreviewDraftsandreload.useDatasetSemanticshydrates a dataset through the same overlay. Entries carrypackageIdanddraftfrom_packageId/_draft.dataset-picker-options.tsgainspackageDatasetsFirstandreadsAnyObject.InterfacesPillar(StudioDesignSurface.tsx) provides the context around its whole surface and passes it toReportCreateFields.Copy, docs, changeset
studionamespace (en, zh):engine.studio.interfaces.newDataset.*added,engine.studio.interfaces.create.noDatasetsremoved (its only reader was the branch this replaces). The dialog reusescreate.idLabel,createDraft,creatingandloading.content/docs/data-modeling/analytics.mdxgains "Creating one in Studio". The app-shell README names the context and the entry..changeset/27518-studio-new-dataset.md:@object-ui/app-shelland@object-ui/i18npatch, withClause-②: noandMetadata-protocol: nonecopied from the claim.No
packages/specchange and no new authorable key.Tests
ui/packages/app-shell/src/views/studio-design/datasetCreate.test.tsx, 11 cases.DatasetSchema; the count-only body with nothing picked; and a CONTROL showing that the spec refuses a dataset with noobject, which is why the dialog asks for one.withPreviewDrafts(true)) and renders under the picker.sys_login_metricsoversys_user) exists; it is gone once a dataset reads the package's object, and that dataset is listed first; with no dataset at all, the entry stands in place of the picker.ifNoneMatch: '*'),onDraftSaved, the binding{"dataset":"work_orders","measure":""}, the picker's trigger text, the new dataset'scountmeasure offered at once, and the line gone.dataset; without it there is no entry and the catalog is the published one.interfaceCreate.test.tsx"says so when there is no dataset to report on" becomes "offers to create one when there is no dataset to report on": the line and the button in place of the picker.ReportCreateFieldssuites passauthoringand answerwithPreviewDrafts. Eight Interfaces pillar suites gainwithPreviewDraftson their metadata double (InterfacesPillar.heldWidget-11910,.componentListServedTitles-12688,.saveErrorClears-11950,.showMeFocus-26730,StudioDesignSurface.interfacesCreate-11823,.heldWidgetCreate-26845,.heldWidgetLeave-26705,.heldWidgetPublish-11910). No assertion in them changed.Acceptance notes
On a fresh
examples/app-showcaseboot (objectstack dev --seed-admin --fresh) with the console dev server from this branch, signed in as the seeded admin, all through the UI except the seven sample records (posted to/api/v1/data/fieldsvc_work_orderafter publish):com.example.fieldsvc, object Work Order with a Status picklist and an Estimated Hours number, app Field Service.sys_andshowcase_datasets; the line and New dataset sit under it.The screenshots are committed at
3d8ae9d5and removed by the next commit, so none of them is in this PR's diff.Scope calls, stated so they can be overruled:
queryDataset(@object-ui/data-objectstack) asks for draft definitions only when the page URL carries?preview=draft, which the Studio canvas does not. So until the package publishes, the canvas of a report or widget bound to a draft-only dataset shows the dataset-not-found error ("Dataset … is not defined in this environment"). That is already the case for any draft-only dataset, however it was created. The Properties panel and the pickers resolve the draft, and after Publish the canvas draws. Changing how the canvas previews drafts is a data-adapter question outside this card.Verification
Local readings, on a box other sessions share, so durations are left out. "HEAD" is
27430e00.pnpm --dir ui exec vitest runoverdatasetCreate.test.tsx, bothReportCreateFieldssuites andviews/metadata-admin/inspectors/: 207 files, 2840 passed, 1 skipped, exit 0.pnpm --dir ui exec vitest run packages/app-shell/src/views/studio-design packages/app-shell/src/views/metadata-adminplusCreateViewDialog.chartBinding-11576,ReportConfigPanel.saveOutcome-11583,ReportConfigPanel.panelTitle,ReportView.saveRefusal-11583,pageRouteLoadsNoStudioChunks-12187andpackages/i18n: 1004 files, 1003 passed, 1 failed. The failure wasInterfacesPillar.showMeFocus-26730(2 cases: its double had nowithPreviewDrafts), fixed in HEAD. Then that file and the three other suites outside those directories that render the Studio surface (AiChatPage.appliedCardDoors-12894,AppHeader.studioVariant-11863,DraftChangesPanel.entryNote-26730): 4 files, 17 passed, exit 0.vitest run packages/app-shellwas stopped at 30 minutes after it had reported seven of the eight pillar suites fixed above; CI's run is the reading for the rest.pnpm --filter @object-ui/app-shell run type-check(tsc --noEmitandtsc -p tsconfig.test.json) exit 0, and@object-ui/i18ntype-checkexit 0, both onc307d688. HEAD adds only the one-line double inshowMeFocus-26730, the same line the other seven suites typed with.eslintover the 20 changed.ts/.tsxfiles: 0 errors, 42 warnings (react-refresh/only-export-components,react-hooks/set-state-in-effect), the kinds these files already carry.pnpm build(114 of 114 tasks) on the first commit (add1bafd).node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 66 commands atc307d688. Each was run with its exit code recorded before any pipe, and all 66 exited 0. Re-derived at HEAD, the list is identical.--ran: "66 derived famil(ies) accounted for — 66 run, 0 NOT-MEASURED", 0 UNRUN. Per the tool, this is not a full account of CI: the artifact-roster and wide-population families, the Build Docs and Plan Test Core shards jobs, and the type-check lanes are outside it.node scripts/check-commit-card-trailers.mjs --range origin/main..HEAD: 5 commit messages, no card relation, no model identifier.origin/mainis 9 commits ahead at556f3230;git merge-treereports no conflict, somainis not merged in.🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgVyybmRQMp8wgFRv8v