Repository navigation
feat(studio): open Studio's dashboards and reports in the app's edit state; × returns to the list - #37226
feat(studio): open Studio's dashboards and reports in the app's edit state; × returns to the list#37226objectstack-fleet[bot] wants to merge 12 commits into
Conversation
…it state A Studio list's dashboard or report opens its app's page with the edit state (or the report builder) on arrival, in the app decision 6 picks; the address carries ?studio= so the page's x returns to the list. The report list's New opens /apps/APP/reports/new. No app: the generic detail, as before. The dashboard edit is not offered below sm. Claude-Session: https://claude.ai/code/session_01QSeKYmSqW1KzbiTWCnSN1K Co-authored-by: Claude <noreply@anthropic.com>
…ne gate; changeset and docs Claude-Session: https://claude.ai/code/session_01QSeKYmSqW1KzbiTWCnSN1K Co-authored-by: Claude <noreply@anthropic.com>
…cross-package leg itself Claude-Session: https://claude.ai/code/session_01QSeKYmSqW1KzbiTWCnSN1K Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYmSqW1KzbiTWCnSN1K Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYmSqW1KzbiTWCnSN1K Co-authored-by: Claude <noreply@anthropic.com>
…shboard-report-app-edit
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 席位核对 — REWORK · L1 · head
|
…age; a draft-only item keeps Studio's page The new-report page opened from Studio's report list saves into the app's package (its pair on a read-only base), as a new view made in an app is. A dashboard or report with no published version keeps the generic item page; a create in a package's area replaces its own history entry. The report builder's x and the new-report page's x ask over unsaved edits outside Studio too. Claude-Session: https://claude.ai/code/session_01QSeKYokyE3hgberJHmAFME Co-authored-by: Claude <noreply@anthropic.com>
…e read-only base and the x asks Claude-Session: https://claude.ai/code/session_01QSeKYokyE3hgberJHmAFME Co-authored-by: Claude <noreply@anthropic.com>
…name the draft-only and save-placement rules Claude-Session: https://claude.ai/code/session_01QSeKYokyE3hgberJHmAFME Co-authored-by: Claude <noreply@anthropic.com>
…shboard-report-app-edit Claude-Session: https://claude.ai/code/session_01QSeKYokyE3hgberJHmAFME Co-authored-by: Claude <noreply@anthropic.com>
…ge test Claude-Session: https://claude.ai/code/session_01QSeKYokyE3hgberJHmAFME Co-authored-by: Claude <noreply@anthropic.com>
…shboard-report-app-edit Claude-Session: https://claude.ai/code/session_01QSeKYokyE3hgberJHmAFME Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 席位核对 — REWORK · L1 · head
|
Fixes #36906
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
Epic #36890, decisions 3, 6, 13 and 15.
studioBackTarget), so the two cannot disagree. It lives in a new pure module,studioAppEdit.ts, and the area's step isStudioAreaAppOpen.tsx.?studio=with the Studio list it came from, filters and sort included. It is built and read only throughstudioAddress.ts(withStudioReturn,readStudioReturn) and registered as a reserved console param. The value is read as untrusted: only a Studio address on this origin is followed. While the param is present, the dashboard page and the report page draw a × that returns to that list, after a reload too. The report builder's own × does the same. Leaving unsaved edits asks first./apps/APP/reports/newin the app picked the same way. Its × goes back to the list, and the saved report's page keeps the way back. With no app, the area creates as before. Dashboard New is Studio 重构(3-4b):仪表盘列表的「新建」跳到应用的设计模式并直接打开「添加菜单项 → 仪表盘」(设计模式加一个到达入口) #36907's, untouched.resolveRuntimeCreatePackage): the package when it is writable, else its.custompair through the ensure door; when neither can be had, naming no package, as views fall back. The draft, the publish and the discard of a refused publish all name that package (saveAndPublishInPackage), so the report is in the list × returns to. On a read-only base whose pair door is closed (walled, or a kernel package), report New no longer opens the app page: it goes back to the list, as every create there does.StudioAreaAppOpenreads the item once, as the app reads it (published, no draft preview,?package=the open package). No published version (a draft only: an AI draft, a create whose publish was refused), or a failed read, keeps Studio's generic item page, which is the page that opens the draft. Only then are the package's apps read.studioCreateLandsInApp, read byResourceEditPage), so Back from the app lands on the list. Every other type, and Setup, land as before.dirtyfor the Studio leg; the ask now runs before either leg.useDashboardEditOfferednow also requires a window at leastsm(640 px) wide, the width from which the edit state's side panel is drawn. Before, only the button's CSS hid it. A landing that asks for the edit state on a narrower window is cleared and opens nothing, so neither Studio nor the design mode can put a phone into the edit state.studioReturnstrings in every bundled locale. zh-Hant is regenerated from zh-Hans by its generator.Why
The maintainer asked that dashboards and reports listed in Studio open straight into the front end's design page (epic #36890). The epic's decisions fix which app, the fallback, the report New target and the address-borne way back.
Tests
studioAppEdit.test.ts: decision 6, rule by rule; the new-report variant; agreement with the back link; the app addresses.studioAddress.test.ts, new top-level describe: the?studio=builder and reader, the refusals both ways (another origin, protocol-relative,/studiox, a backslash,javascript:), and the reserved-param registry.StudioAreaAppOpen-36906.test.tsx, through the realStudioMetadataArearoutes: the app picked, the arrival carried, the return address (list context kept, item-only params dropped), the replace, and every open that keeps the item page (a tab, the review, no app, the cross-package leg, other types). Also report New, and its fallback.DashboardView.inPageEdit-36372.test.tsx, new describe: landing from Studio, × target, × after a reload, the dirty prompt, the phone landing (cleared, no edit, no Edit button), and an off-Studio value drawing no ×.ReportView.designModeExclusion-36692.test.tsx, new describe: landing in the builder, the builder × to Studio, its dirty prompt, the page × beside Edit, and the card's check: reached with the design mode already on, no builder and no Edit, while × still goes back.ReportNewPage-36692.test.tsx, new describe: × to Studio, and Save keeping?studio=. This round: Save from Studio namespackageId: Pon the draft and the publish; on a read-only base it names the pair (P.custom, asked of the ensure door); CONTROL: a refusing ensure door falls back to the package-less save. × over an edit asks; declining stays with nothing sent; agreeing goes back to the Studio list (and the clean × asks nothing). Outside Studio: Save names no package and asks no package door, and × over an edit asks.StudioAreaAppOpen-36906.test.tsx, this round: a draft-only dashboard row keeps the item page and reads no app; so does a draft-only report and a failed read; the area's dashboard create → Save lands on the app's dashboard and Back lands on the list;studioCreateLandsInApprule by rule. A read-only base (readOnly,customizationhanded in): its dashboard row opens in the base's app; a pair-row address (/studio/BASE.custom/metadata/dashboard/X?package=BASE.custom) keeps the generic page (the starting point of Studio:以 .custom 配对包打开时,仪表盘和报表经基础包的应用打开(而不是留在通用条目页) #37237); report New opens the base app's new-report page; with the pair door walled, or no customization, report New goes back to the list.ReportView.designModeExclusion-36692.test.tsx, this round: outside Studio, a clean builder × closes without asking; over an edit it asks, declining keeps the builder, agreeing closes it.useDashboardEditOffered, the phone pin fails 1/1. Restored, its blob equals HEAD's andgit diff HEADis empty.scripts/ablation-replace.mjs(anchor 1 to 0, restore proven blob == HEAD andgit diff HEADempty), are listed under Verification.Acceptance notes
ReportNewPage.tsx(where a report made from Studio is written: the package, its pair, or none), the published-version read at the top ofStudioAreaAppOpen.tsx's effect, and thereplaceon the create landing inResourceEditPage.tsx(shared by every type; it readsstudioCreateLandsInApp, true only for a dashboard or report in a package's area).StudioAreaAppOpen.tsx(async app pick and replace; the fallback), theuseDashboardEditOfferedand arrival hunks inDashboardInPageEditor.tsxandDashboardView.tsx(the phone gate now also governs the design mode's landing), and the?studio=reader instudioAddress.ts(an address-bar value followed by a navigate).StudioMetadataArea.tsxis kept narrow: one import, the item open wrapped inStudioAreaAppGate, and the create split. Open PRs feat(studio): a permission set opens full-screen at its metadata address; the sharing overview gets its own route #37089, feat(studio): the object designer opens full-screen on its metadata address, tabs in #36513's order #37168 and feat(studio): the flow designer opens full-screen on its metadata address; no flow rail (#36903) #37169 edit the same file in other hunks.overlap-checkmerges cleanly with all three at this head. Whichever lands later merges main.runtime-metadata-persistence.tsis not changed. The new-report page now also calls two of its existing exports:resolveRuntimeCreatePackage(other callers:createRuntimeMetadataandsaveAndPublishRuntimeMetadatathemselves, for views only) andsaveAndPublishInPackage(other callers:saveInPlace, the in-page dashboard and report Save, andsetup/publicForms.ts).saveAndPublishRuntimeMetadata's other callers (objectViewViewSharing.ts,objectViewViewCrud.tsx,setup/publicForms.ts) andcreateRuntimeMetadata's (objectViewViewCrud.tsx,ObjectDataPage.tsx) are untouched.authoredBuffer); the builder's Save is then refused with 「This report has unpublished changes. Publish or discard them above, then save.」, and nothing is written over the draft (the first-write pin). Either way the draft stays Studio's to publish or discard. Read from the code at this head, not walked..custom) is pinned at unit level by the existing case "an installed package saves into its customization pair". It is NOT MEASURED live on HotCRM: no HotCRM checkout is in this session. That leg carries to Studio 重构(4-2):新形态的端到端测试、总走查,更新平台测试清单、文档和技能里的 Studio 地址与说法 #36910..custompair's dashboards and reports keep the generic item page (decision 6, rule 3); Studio:以 .custom 配对包打开时,仪表盘和报表经基础包的应用打开(而不是留在通用条目页) #37237 resolves them through the base package's apps.Verification
Two-minute check: open Studio for a writable package with a published app, go to Reports, press New, pick a data source and a measure, name it, and Save. Expected: the report's page in the app, with a 「Back to Studio」 ×; click it, and the new report is in the Studio list.
This round's readings are at head
08107d2f(this branch withorigin/maind7f299c0merged in) unless a line names727300e5, a head with the same tree as427168aabefore that merge.Live walk-through, this round (per-agent stack; CRM example plus one writable package)
The stack is a fresh
examples/app-crmbackend (pnpm dev:crm -- --fresh) with the Console served by Vite from this branch'sui/source, driven by Playwright as the seeded admin, at727300e5. In this stack the CRM package is a read-only code package, so it walks the read-only base leg. A second package, created writable throughPOST /api/v1/packageswith one published app, walks the writable leg.Writable package (11 PASS, 0 FAIL):
PUT ?mode=draft), opened at its Studio row address, stays on Studio's generic item page./apps/PKG/dashboard/NAMEwith the way back to the dashboard list. The app page shows the just-published dashboard in its edit state (no 「not found」). Browser Back from there lands on the dashboard list, not on the create page.GET /api/v1/meta/report/NAME?package=PKGanswers 200 withpackageId: PKG. × returns to the report list, and the new report is in it.Read-only CRM package:
com.example.crm.custom(a read at?package=com.example.crmanswers 409 naming that pair as the holder). × returns to the CRM report list, and the new report is in it.HotCRM: NOT MEASURED, carried to #36910.
Tests
08107d2f, the seven touched test files (ReportNewPage-36692,ReportView.designModeExclusion-36692,StudioAreaAppOpen-36906,studioAppEdit,studioAddress,DashboardView.inPageEdit-36372,urlParams): lock VERDICT command-exit 0, 7 files, 99 tests passed.727300e5, the wider set: everyDashboardView*andReport*test, everyResourceEditPage*test, everyruntime-metadata-persistence*test,views/studio-design/,views/studio-detail/,src/__tests__/,src/preview/,urlParams.test.tsandpackages/i18n/. Lock VERDICT command-exit 0, 585 of 585 files, 5,662 passed, 13 skipped.pnpm --filter @object-ui/app-shell run type-check, both programs, at08107d2f: exit 0, 0error TS.scripts/ablation-replace.mjsunder the lock (anchor 1 to 0; restore proven by blob == HEAD andgit diff HEADempty). ui tests resolvesrcdirectly, so nodistleg applies:dirty &&dropped (asks on a clean x): the two clean-x pins fail (2 of 13).null: the package pin, the pair pin and the refusing-door CONTROL fail (3 of 13). The CONTROL fails because no door is asked at all.StudioAreaAppOpen, the no-published-version fallback disabled: the two draft-only pins fail (2 of 16).studioCreateLandsInAppforced tofalse: the create-then-Back pin and the rule pin fail (2 of 16).Local gates (`dispatch-gates.mjs --commands`, 73 families)
08107d2f: all 73 derived families exit 0, each recorded ascmd :: exit Nand reconciled with--ran: "73 derived famil(ies) accounted for — 73 run, 0 NOT-MEASURED". Two needed a second run:check:skill-examplesfirst exited 3 (it refused, measuring nothing, becausepackages/client's source was newer than its build after a local history rebuild), then 0 after rebuildingclient; the uiscripts/family ran under the lock with--maxWorkers=1: 172 files passed, 2 skipped.check:test-source-aliasfirst exited 1 at727300e5: the new-report page now imports the draft bar's package rule, which reaches@objectstack/lint. The test file pays that load at collection (import '@objectstack/lint', the gate's prescription); exit 0 since, and at08107d2f.08107d2f:overlap-checkVERDICT clean (main, fix(app-shell)!: Home no longer offers Build with AI or Build an app #37249, feat(ai): get_record_context joins the service-ai platform tool group, with its chat label (ADR-0160 row 9) #37210, feat(studio): the flow designer opens full-screen on its metadata address; no flow rail (#36903) #37169, feat(studio): the object designer opens full-screen on its metadata address, tabs in #36513's order #37168, feat(studio): remove the Studio home; /studio opens the last package or Setup > Packages #37166),@objectstack/spec check:generatedexit 0 after the merge, andcheck-platform-checklist --changed-from origin/mainexit 0 (no anchored file changed).Human Minimum
packages/specholds no runtime logic.pnpm lintpasses. (eslint on the changed files locally; the repo-wide run is CI's.)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (Not touched.)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code