Repository navigation
feat(console): build a new report from the design mode's Add menu item - #36657
Conversation
…item 「Reports」 in the picker starts with 「New report…」: the place stays held and the report builder opens; its Save creates the report in the menu's package and saves the entry with every other staged design change, its Close (or leaving it) drops the place and writes nothing. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbXq2Dxb31zZNmSqCtz
The console addresses an app by its route segment, which need not be its name, so the builder page finds the place it fills by its own address. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbXq2Dxb31zZNmSqCtz
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbXq2Dxb31zZNmSqCtz
|
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj Contract reviewServed-tier: ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
No must-fix. No should-fix. Notes only. Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj 维护者速读在运行界面的设计模式里,「添加菜单项 → 报表」现在可以「新建报表…」。系统先在菜单里占好位置,再打开报表搭建页;选好数据和指标、点保存后,报表和菜单项一起生效。点关闭或离开,什么都不留下。 席位核对 — ACCEPT (L1) · repo:objectstack#1 · head
|
Requested by Warren · project thread
Fixes #36364
Clause-②: yes (widening) — three new
@object-ui/i18nkeys (designMode.menu.newReport,designMode.menu.newReportLeft,report.builder.addsToMenu) in all 11 locales; no spec, schema or public export changeMetadata-protocol: none
repo:objectstack#1 · os-warren · session_01JQwxbXq2Dxb31zZNmSqCtz
维护者速读
What changes
The report half of #36364, on top of the report builder (#36644), per the seat's ruling (option A, comment 7090058961): a report needs
datasetandvalues, so 「New report…」 opens the builder, and the report and its menu entry are written only when the builder saves.DesignModeMenu.tsx): the Reports list starts with 「New report…」. It holds the place (the dashed row now reads 「New report…」), offers a slot, and navigates to the app'sreports/new. Nothing is written.designModeReportSlot.ts, new): the menu lives in the sidebar and the builder in the page, with no shared tree, so a module-level store holds one slot{ path, save, cancel }. It is keyed by the builder's address, not the app's name, because the console addresses an app by its route segment (the showcase app is/apps/com.example.showcase, its nameshowcase_app). This was found on the live run, and a page test pins it. The menu withdraws the slot when the place is dropped and when it unmounts (the design mode ended). Without a slot the builder is the plain new-report page, as before.ReportNewPage.tsx): when a slot waits on its address, it says 「Saving creates this report and adds it to the menu where you placed it, with your other design changes.」. Its Save hands(name, label, body)to the slot and writes nothing itself. A refused save keeps the builder open. Its Close cancels the place and goes back.designModeMenuCreate.ts):NewMenuItemgains areportarm carrying the builder's body.saveAppMenuWithNewItemruns the dashboard half's order unchanged: every menu-save check first, then the report saved and published in the menu's own package (saveAndPublishInPackage, the package-bound doorsaveDashboardInPlacenow shares), then the menu written with the entry in the held place and every other staged edit (saveWith). On a refused menu the report is removed again.labelshows its machine name (only object, view and dashboard entries inherit their target's label, per the cloud#2021 ruling), so the new entry carries the report's label. The live run first showedhui_kuan_fenxiin the menu, and this fixes it.Tests
pnpm --dir ui exec vitest run packages/app-shell/src/layout packages/app-shell/src/views/ReportNewPageatf3021225:Test Files 157 passed (157),Tests 1284 passed (1284).DesignModeMenu-36363.test.tsxwas rerun at headecbe0f66after the label change:38 passed. Earlier atf7737e36,packages/i18ngave1978 passed, with the de quote-pairing count raised 128 → 129 fornewReportLeft's „{{name}}“.designModeMenuCreate-36364.test.ts: 4 report cases. They cover the body, the package write order (ensure → save/publish report → save/publish app), a refused menu resetting the report, and an unlisted package creating nothing.DesignModeMenu-36363.test.tsx: 5 report cases. They cover the picker row holding the place and writing nothing; the builder's Save writing the report, then the menu with the labelled entry and the other staged edit, then leaving the mode; a refused menu; the builder's Close; and leaving the builder.ReportNewPage.menuSlot-36364.test.tsx: 5 cases. They cover Save going through the slot; a refused save staying open; Close cancelling and going back; a route segment other than the app's name; and another app's slot not being used.tsc --noEmit(app-shell) exit 0. ESLint on the changed files: 0 errors.check-i18n-call-site-keysexit 0.Screenshots
Taken on the live showcase example (fresh backend, console dev server, zh-CN, deviceScaleFactor 2). They are stored with the seat's project files (
issue-36364/):Checked through the API after the run:
report/hui_kuan_fenxiis stored incom.example.showcase.custom, the menu's package (the same item Studio lists), with_diagnostics.valid: true.{ id: nav_item_1, type: report, reportName: hui_kuan_fenxi, label: 回款分析 }undergrp_analytics.hui_kuan*report, so the cancelled build left nothing.Overlap
overlap-check: merges cleanly with main, #36655 and #36525. With #36629 it conflicts only inde-quote-pairing-3876.test.ts, because both PRs raise the same German quote count. Whichever lands second re-adds 1 to the count.Generated by Claude Code