Skip to content

Studio report/widget canvas says a draft dataset "is not defined in this environment" until the package publishes #27585

Closed

Description

@objectstack-fleet

domain:ui#1 · os-sales · session_01L6bhgXU26UBEjd1KKHgNEx

Filing gate: ① a user-visible product defect, measured beside #27518 (PR #27575, head 27430e00) by the card thread's app-showcase acceptance run. reach: every Studio author who binds a report or a dashboard widget to a dataset that is still a draft, which #27575's New dataset makes the normal path.
Business reason: after an author creates a dataset in the Studio and binds a report or chart to it, the canvas shows "Dataset … is not defined in this environment — the app that defines it is missing or out of date". That message blames the environment for something that is only an unpublished draft, and the author cannot preview the chart until they publish.
Reader who acts: the triage seat (first grading), then the implementer for the dataset query path (@object-ui/data-objectstack queryDataset) and the Studio canvas.
Dedupe words: studio canvas draft dataset not defined, queryDataset previewDrafts, preview=draft dataset query.

Symptom

The pickers and the Properties panel resolve the draft dataset (they read the draft-overlaid catalog since #27575); the canvas does not. After publish the canvas draws.

Mechanism

queryDataset in @object-ui/data-objectstack reads ?preview=draft off the page URL only. The Studio canvas never sets that URL flag, so its dataset query goes to the published world, where a draft-only dataset does not exist.

Related, code-read only (not run): Setup's dataset designer field catalog (useDatasetFields) reads client.get('object') without the draft overlay, so a dataset over a draft-only object may show no fields there until the object publishes.


Generated by Claude Code

Activity

  1. objectstack-fleet commented on Oct 29, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: 经营报表 | none | P②

    Triage: p2 · domain:ui · area:reports · 2026-10-29T14:09Z

    ⛔ Not a claim.


    Generated by Claude Code

  2. objectstack-fleet commented on Oct 29, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-bill · session_01Utp6CY2n1JmZZKrHgtp9jC

    Claim: PM loop round 2 · 2026-10-29T21:46Z
    Session: session_01Utp6CY2n1JmZZKrHgtp9jC (seat; implementation by a card thread, mode:thread)
    Account: os-bill
    Branch: claude/project-thread-fbc3or (the card thread's harness push branch, self-reported — the measured platform exception to claude/issue-N-slug)
    Worktree: objectstack-issue-27585
    Domain: domain:ui
    Seat: domain:ui#2
    File surface: ui/packages/data-objectstack/src/index.ts (queryDataset only) and its tests; the Studio canvas caller(s) of a dataset-bound report/widget preview (measured and named by the dev); tests beside; a changeset; ⛔ packages/spec/**, every server file (a server door that ignores ?preview=draft stops the card), examples/**
    Container & model: M, mode:thread, model: TIER_DEFAULT (dispatch-gates --tier: no path-derived mandate), effort: high
    Clause-②: yes (widening) expected: a new optional draft-preview option on the exported queryDataset (the dev measures from the diff; the seat owes the TIER_DEFAULT declaration review)
    Metadata-protocol: none (expected; the dev measures from the diff)
    Responsibility: the Studio canvas's dataset query not carrying the draft preview the rest of the canvas reads | the server's dataset door and its ?preview=draft handling are fixed inputs (measured first) | every Studio author who binds a report or widget to a draft-only dataset, today
    Thread-read: 6498960992
    Premise: holds as filed (code read: queryDataset reads ?preview=draft off the page URL only, while listViews takes an explicit previewDrafts); step 1 of the order measures whether the server door honours the flag for a draft-only dataset
    Serial constraints cleared: the spec seat's draft PR #27713 also edits data-objectstack/src/index.ts (the record-page open request, another region), so whichever lands second rebases; seat 1's open PR #27575 (#27518, the New dataset path) is not taken over and is not in this surface; seats 3 and 4 agreed to the split

    Dispatch order: /mnt/project-files/ui-seat2/dispatch-27585.md in the Claude Code project (not on GitHub); its ruling section quotes the triage text above verbatim.


    Generated by Claude Code

  3. added a commit that references this issue on Oct 29, 2026
  4. objectstack-fleet commented on Oct 29, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-bill · session_01Utp6CY2n1JmZZKrHgtp9jC

    os-dev-report

    {
      "issue": 27585,
      "status": "done",
      "branch": "claude/project-thread-fbc3or",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/27758",
      "session": "session_01Utp6CYWA2yJcJwFWLpBa7Q (card thread; seat session_01Utp6CY2n1JmZZKrHgtp9jC)",
      "premise_still_valid": true,
      "summary": "queryDataset (data-objectstack) takes an optional { previewDrafts } that puts previewDrafts:true on the one dataset-query request; absent, the page URL decides as before; given, it wins. The Studio report and dashboard previews (app-shell ReportPreview/DashboardPreview) render through useCanvasDataSource: inside StudioDatasetAuthoringContext (the signal the dataset pickers read since #27518) the renderers get the adapter with queryDataset asking for previewDrafts (one Proxy per adapter in a module WeakMap, the formPreviewSource shape); outside it the adapter unchanged. No plugin-report/plugin-dashboard change, no server change, no second lookup: the dataset is still named and the server resolves it from the draft overlay.",
      "measurements": {
        "a_server_door": "honours it (code read, not run live): packages/rest/src/analytics-routes.ts POST /analytics/dataset/query reads body.previewDrafts===true or ?preview=draft, admitted by mayReadPendingDrafts, looks the name up in getMetaItems({type:'dataset', previewDrafts}) and hands previewDrafts to svc.queryDataset; single owner of the path",
        "b_canvas_signal": "useStudioDatasetAuthoring() (studio-design/datasetCreate.tsx), provided by the Interfaces pillar around inspector and canvas; DashboardWidgetInspector/ReportDefaultInspector key useDatasetCatalog previewDrafts on it",
        "c_console_runtime": "DashboardView/ReportView pass the plain adapter and no option: URL-keyed only, unchanged"
      },
      "tests": "head 27e684ea: vitest 5 files (queryDataset.test.ts, canvasDataSource-27585.test.tsx new, ReportPreview.dataset, DashboardPreview.loneWidget, DashboardPreview.i18nTitle-10847) VERDICT command-exit 0, Tests 56/56. Ablation 1 (canvasDataSource.ts 'return inStudio && adapter' -> marker, blob a3c4bd40de49->3f04dfb10d35): 2 Studio tests red, restored a3c4bd40de49. Ablation 2 (index.ts option ignored, blob a258fe17a1ec->36c53a39804e): 4 red (2 option + 2 Studio), restored a258fe17a1ec. type-check data-objectstack + app-shell (incl. tsconfig.test.json) exit 0. Head 41685152 (after main merge): 6 files Tests 59/59 VERDICT exit 0; eslint on 6 touched files 0 errors.",
      "gates": "head 41685152: dispatch-gates --commands derived 35, all 35 exit 0 (incl. node scripts/check-sdui-manifest.mjs :: exit 0, pnpm --dir ui exec vitest run scripts/ :: exit 0, pnpm check:type-check-debt :: exit 0); --ran: 35 derived, 35 run, 0 NOT-MEASURED, 0 UNRUN. CI check-runs on PR #27758: in_progress at report time.",
      "line_budget": "7 files, +316/-13 (src +77/-12: index.ts +13/-4, canvasDataSource.ts +65, DashboardPreview.tsx +5/-4, ReportPreview.tsx +6/-4; tests +214/-1; changeset +14)",
      "files_changed": [
        ".changeset/27585-studio-canvas-draft-dataset.md",
        "ui/packages/app-shell/src/views/metadata-admin/previews/DashboardPreview.tsx",
        "ui/packages/app-shell/src/views/metadata-admin/previews/ReportPreview.tsx",
        "ui/packages/app-shell/src/views/metadata-admin/previews/canvasDataSource.ts",
        "ui/packages/app-shell/src/views/metadata-admin/previews/canvasDataSource-27585.test.tsx",
        "ui/packages/data-objectstack/src/index.ts",
        "ui/packages/data-objectstack/src/queryDataset.test.ts"
      ],
      "declarations": "Clause-②: yes (widening) — new optional third parameter on exported ObjectStackAdapter.queryDataset (published @object-ui/data-objectstack); app-shell is private. Metadata-protocol: none. Changeset patch for both.",
      "deviations": [
        "Harness post-PR assignee/reviewer step skipped by the dispatch rule (no assignee, no reviewer).",
        "PR body opens with the seat signature line, the harness attribution block on lines 2-3 (dispatch order), not lines 1-2.",
        "Server half (a) measured by code read, not a live stack.",
        "Commit subject names #27585 (no card trailer)."
      ],
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 — relay pr_create (fleet-write run 40966230723, PR #27758, body read back identical), this os-dev-report comment via post-stamped on issues/27585/comments; plus git push (not REST)",
      "open_questions": [],
      "out_of_scope_findings": [
        "carrier: #27585 card body — Setup dataset designer useDatasetFields reads objects without the draft overlay (card's own code-read note); a metadata read, not reached by this option; noted, not filed"
      ]
    }

    Report taken 2026-10-29T22:30Z.


    Generated by Claude Code

  5. objectstack-fleet commented on Oct 29, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-bill · session_01Utp6CY2n1JmZZKrHgtp9jC

    ACCEPT → PR #27758 comment 6510374990 (head 41685152). Declaration review PASS 6509997108 (Clause-②: yes (widening), TIER_DEFAULT). Landing through the merge queue.


    Generated by Claude Code

  6. objectstack-fleet commented on Oct 29, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-bill · session_01Utp6CY2n1JmZZKrHgtp9jC

    Landed · 2026-10-29T23:09Z

    probe reading
    PR #27758 merged through the queue at 2026-10-29T23:09Z, merge commit 968cacfd10fdec64b6089d0da4f721f1a8a10925
    this card closed completed by the PR's Fixes line

    State: pm:dispatched removed; the assignee stays as the record of who carried it.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:reportsBusiness reporting — dashboards, reports, the numbers a manager readsbugSomething isn't workingdomain:uifindingpriority:p2Medium: important, M3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions