Repository navigation
feat(app-shell): a dashboard card's New dataset in the design mode publishes and picks the dataset in one act - #39723
Conversation
…ublished into the dashboard's save target Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cypQd6ZDPDmXL5MaWR
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cypQd6ZDPDmXL5MaWR
…ounter Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cypQd6ZDPDmXL5MaWR
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cypQd6ZDPDmXL5MaWR
… path Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cypQd6ZDPDmXL5MaWR
…objects from the base Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cypQd6ZDPDmXL5MaWR
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cypQd6ZDPDmXL5MaWR
… the design mode Its override is served and read as the installed package, whose closure does not reach the customization pair, so a pair-held dataset would be refused to the card. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cypQd6ZDPDmXL5MaWR
|
repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4czfEjskBjZM6jhKWFR 2026-12-04T16:02Z · L1-a verdict: ACCEPT at head 席位核对Ruling 7416147251 (A), read at this head.
Ruling 7408596103 (A).
Acceptance, item by item.
Changeset. Noted. The card dataset switch keeps the old dimensions and values, which is pre-existing on main. It is filed as #39732. Gates.
Ordinary PR, no L2 owed (not governed, |
|
repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4cypQd6ZDPDmXL5MaWR 2026-12-04T16:02Z · Landing (zone dm-39368, card #39630) at head
State: ready + auto-merge; on MERGED #39630 closes via |
Requested by Elon · project thread
Fixes #39630
Ruling-ref: 7408596103, 7416147251 (maintainer ruling option A: writable packages only)
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
In the app's design mode, the dashboard panel (
DashboardEditPanel) now hands Studio's widget inspector a dataset publish target, so a selected card's dataset picker offers New dataset there, as ruled in 7408596103 (option A, "#39620 remounts the dashboard half with the same dialog"):datasetPublishForinDashboardInPageEditor.tsx): the dashboard's own package, when it is writable (an app package, or a dashboard an app's customization pair owns, where the app's objects are read from the pair and its base). An installed (read-only) app's dashboard, a dashboard that names no package, and a dashboard the design mode refuses offer no entry.NewDatasetDialogin the publish-and-select mode feat(report-builder): New dataset on the app's objects in a new report's data source #39665 added (publishTo,saveAndPublishDataset): nothing is written until the author names the dataset and presses Create; the dataset is then saved as a draft under the first-write pin and published pinned to that draft, in the target package; a refused publish takes the draft back (pinned to its own version) and the dialog shows the server's reason. The new dataset is then picked for the card, so the bar's Save publishes a dashboard whose card reads a published dataset.datasetCreate.tsx):DatasetPublishAuthoringContextsits besideStudioDatasetAuthoringContext. The Studio context also switches pickers and the canvas into the draft world; the design-mode context deliberately does not (the dataset is published), so the card's catalog stays the published one.DatasetCreateEntrytakes either write; the dialog gains areadByprop so its description says "the chart" for a card instead of "the report".DashboardWidgetInspector.tsx): renders the entry for either context (Studio first); the package whose datasets lead the picker comes from whichever is present.@object-ui/i18nstudionamespace,enandzh, the namespace's two locales; every other language falls back toenby that namespace's ruling):newDataset.publishWidgetDescriptionandnewDataset.noAppDatasets(the hint in the app's words: "this app", not "this package").DashboardView.tsx: one prop line passing the hook'sdatasetPublishto the panel.Tests
DashboardView.inPageEdit-36372.test.tsx(the in-page edit harness; new top-level describe, realDashboardView, real design mode and bar, and for these cases the REAL card panel, entry and dialog through a hoisted switch on the existing stub): writable package: hint shows in the app's words, Create saves and publishes the dataset incrmbefore anything of the dashboard, the card's catalog is never read from the drafts, the card is picked, and the bar's Save saves and publishes the dashboard whose card readsrepair_orders; installed (read-only) app: the real card panel draws and its catalog is read, with no New dataset and no hint; the ensure door is not asked and nothing is written; refused publish: save, publish, reset (pinned to its own draft version) in that order, no dataset or draft left, server reason shown, nothing staged; a dashboard with no package: the real panel draws, no entry; a walled installed base: refused, no panel, no entry, nothing written.studio-design/datasetCreate.test.tsx(the entry's harness; new top-level describe, real inspector under the new context): Create publishes into the picked package and binds the widget; refused publish takes the draft back, shows the reason, binds nothing; read-only panel offers no entry; a dashboard owned by an app's customization pair reads the app's objects from its base (the hint clears once a dataset reads one).DashboardInPageEditor.test.ts:datasetPublishForfor a writable package, a pair-owned package, an installed base (null, listed pair or not), unbound and nothing open (null).Run readings
DashboardInPageEditor.test.ts,datasetCreate.test.tsx,DashboardView.inPageEdit-36372.test.tsx, bothDashboardWidgetInspectorfiles,StudioMetadataArea.newDataset-39620,ReportBuilderHost.newDataset-39413: 7 files, 110 passed.DashboardView.*file,ReportBuilderHost.newDataset-39413,ReportNewPage.newDataset-39413,StudioMetadataArea.newDataset-39620,CreateItemDialog.oneLabel-11787,canvasDataSource-27585, bothDashboardWidgetInspectorfiles, i18nstudio-namespaceandstudio-zh-label-word-36749): 20 files, 202 passed.pnpm --filter @object-ui/app-shell run type-check(both the source and the test program): exit 0, zeroerror TS.Ablations (each through scripts/ablation-replace.mjs: anchor hit once, blob changed on disk, restored to HEAD with git diff HEAD empty)
readBy: 5 red.Acceptance notes
DashboardView.tsxbeyond the claimed files, since that page is where the panel is drawn; no logic there (claim amendment on Design mode: a dashboard widget's New dataset publishes and selects the dataset in the same act #39630).patchWidgetmerges{ dataset }), so the card's query answers 400 until they are re-picked; same on main.Verification
Read first:
DashboardInPageEditor.tsx(datasetPublishFor, and the provider inDashboardEditPanel),DashboardWidgetInspector.tsx(the entry condition andpreviewDraftskept on the Studio context alone),datasetCreate.tsx(DatasetPublishAuthoringContext,DatasetCreateEntry).Two minutes:
pnpm --dir ui exec vitest run packages/app-shell/src/views/DashboardView.inPageEdit-36372.test.tsxprints all passed, the five objectstack#39630 cases among them.🤖 Generated with Claude Code
https://claude.ai/code/session_016WV4cypQd6ZDPDmXL5MaWR