Skip to content

feat(app-shell): a dashboard card's New dataset in the design mode publishes and picks the dataset in one act - #39723

Merged
objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/issue-39630-wip
Dec 4, 2026
Merged

objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/issue-39630-wip

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Elon · project thread

Fixes #39630
Ruling-ref: 7408596103, 7416147251 (maintainer ruling option A: writable packages only)
Clause-②: no
Metadata-protocol: none

维护者速读

  • 管理员在应用的设计模式里改仪表板时,选中一张卡片,数据集选择框下面会出现「新建数据集」;建好后立即对所有人生效,并自动选给这张卡片(以前设计模式里没有这个入口)。
  • 属于「仪表板与数据集自助搭建」,按你裁定的「搭建页就地新建,建完即生效」把报表那一半的做法搬到仪表板上。
  • 只影响能设计该仪表板的管理员;发布被拒时不留任何数据集并显示服务器原因;已安装(只读)应用的仪表板和没有可保存位置的仪表板都不显示入口(你选的 A);可直接撤回本改动,已建的数据集照常保留。
  • 无

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"):

  • Where it writes (datasetPublishFor in DashboardInPageEditor.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.
  • One dialog: the entry opens the existing NewDatasetDialog in 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.
  • New context, not a widened one (datasetCreate.tsx): DatasetPublishAuthoringContext sits beside StudioDatasetAuthoringContext. 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. DatasetCreateEntry takes either write; the dialog gains a readBy prop so its description says "the chart" for a card instead of "the report".
  • Widget inspector (DashboardWidgetInspector.tsx): renders the entry for either context (Studio first); the package whose datasets lead the picker comes from whichever is present.
  • Strings (@object-ui/i18n studio namespace, en and zh, the namespace's two locales; every other language falls back to en by that namespace's ruling): newDataset.publishWidgetDescription and newDataset.noAppDatasets (the hint in the app's words: "this app", not "this package").
  • DashboardView.tsx: one prop line passing the hook's datasetPublish to the panel.

Tests

  • DashboardView.inPageEdit-36372.test.tsx (the in-page edit harness; new top-level describe, real DashboardView, 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 in crm before 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 reads repair_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: datasetPublishFor for a writable package, a pair-owned package, an installed base (null, listed pair or not), unbound and nothing open (null).
Run readings
  • At 6c682b8: DashboardInPageEditor.test.ts, datasetCreate.test.tsx, DashboardView.inPageEdit-36372.test.tsx, both DashboardWidgetInspector files, StudioMetadataArea.newDataset-39620, ReportBuilderHost.newDataset-39413: 7 files, 110 passed.
  • Neighbours (every DashboardView.* file, ReportBuilderHost.newDataset-39413, ReportNewPage.newDataset-39413, StudioMetadataArea.newDataset-39620, CreateItemDialog.oneLabel-11787, canvasDataSource-27585, both DashboardWidgetInspector files, i18n studio-namespace and studio-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, zero error TS.
Ablations (each through scripts/ablation-replace.mjs: anchor hit once, blob changed on disk, restored to HEAD with git diff HEAD empty)
  • A1 inspector ignores the publish context: 5 red.
  • A2 (round 1) no longer applies: the ensure-on-create path was removed.
  • A3 panel provides no context: 3 red.
  • A4 a dashboard with no package is offered the entry: 2 red.
  • A5 the dialog's description ignores readBy: 5 red.
  • A6 the hint keeps the Studio's package wording: 2 red.
  • A7 the publish context switches the catalog to drafts: 1 red.
  • A8 pair-owned objects ignore the base: red (hint-only leg A8c also red).
  • A9 installed base offered the entry: 2 red.

Acceptance notes

Verification

Read first: DashboardInPageEditor.tsx (datasetPublishFor, and the provider in DashboardEditPanel), DashboardWidgetInspector.tsx (the entry condition and previewDrafts kept 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.tsx prints all passed, the five objectstack#39630 cases among them.

🤖 Generated with Claude Code

https://claude.ai/code/session_016WV4cypQd6ZDPDmXL5MaWR

@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Dec 4, 2026
…objects from the base

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
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4czfEjskBjZM6jhKWFR

2026-12-04T16:02Z · L1-a verdict: ACCEPT at head 6c682b83c1 (zone dm-39368, Fixes #39630, Ruling-ref 7408596103 item 1 = A, and maintainer ruling 7416147251 = option A)

席位核对

Ruling 7416147251 (A), read at this head.

  • datasetPublishFor(target) (DashboardInPageEditor.tsx) returns a target only for target.kind === 'package'. That covers a writable app package, including a dashboard that an app's customization pair owns, since that dashboard's own package is the pair.
  • It returns null for an installed base's dashboard. That dashboard's Save writes an override into the pair, and the pair is outside the base's closure (ADR-0150 D3). It also returns null for a dashboard that names no package and when nothing is open.
  • The edit hook memoises the value from the save target and hands it through DashboardView to DashboardEditPanel, which provides DatasetPublishAuthoringContext. Without the context, the card panel offers no entry.
  • Options B and C are not built.

Ruling 7408596103 (A).

Acceptance, item by item.

  • The design mode offers New dataset on a writable package. Create publishes and picks it, and the bar's Save publishes a dashboard whose card reads it (DashboardView.inPageEdit-36372).
  • A refused publish leaves no dataset and shows the reason.
  • A read-only base with no customization target offers no entry. So does the installed-base override (ruling A).
  • The zh-CN browser check passed (7416525137).
  • Strings: the new keys are in the Studio namespace, which ships en and zh only, as every Studio key does.

Fixes #39630 is right.

Changeset. @object-ui/app-shell and @object-ui/i18n patch. The headline comes first, then Clause-②: no and Metadata-protocol: none, which are right. I read it sentence by sentence and each bullet matches a pin above. The "no entry" bullet states ruling A in user terms. The known residue (a dataset stays published after Cancel) is disclosed and ruled under 7408596103.

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, Clause-②: no, no spec path). It lands in its zone.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4cypQd6ZDPDmXL5MaWR

2026-12-04T16:02Z · Landing (zone dm-39368, card #39630) at head 6c682b83c1:

Reading Value
L1 ACCEPT 7416798356 at 6c682b83c1; nothing owed (no L2: not governed, Clause-② no)
Maintainer ruling 7416147251, option A (built)
Browser check zh-CN PASS 7416525137
check-governed-merges.mjs --pr 39723 NOT governed
Check runs 47 success, 17 expected skip, 0 failure

State: ready + auto-merge; on MERGED #39630 closes via Fixes.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review December 4, 2026 16:03
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Dec 4, 2026
Merged via the queue into main with commit fb26c1c Dec 4, 2026
65 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-39630-wip branch December 4, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Design mode: a dashboard widget's New dataset publishes and selects the dataset in the same act

2 participants