Repository navigation
feat(console): the report builder — one page to build or edit a report - #36644
Conversation
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbXq2Dxb31zZNmSqCtz
…ts/new 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
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
…-bkjint Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbXq2Dxb31zZNmSqCtz
…sure picker The missing-piece check now reads the report as it stands once the dataset's default measure lands, so the one render before the count measure is filled does not count as a missing measure. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbXq2Dxb31zZNmSqCtz
…ol change 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: Read: the net diff ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: FAIL |
… never create over a served report - reconcile keeps an authored chart's yAxis / xAxis across unrelated picks; picking a measure replaces the one the picker shows, in its place - a new report asks the server for each candidate identifier and moves past one any served layer holds (freeReportName), with report.builder.nameTaken when every candidate is taken - a dataset report with a cross-tab, a saved filter or several values keeps the inspector panel - the builder's two template key families are declared for the call-site key check; the unused value exports leave the package index - the changeset is graded patch: no metadata protocol change 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: Round 2. This reviews the rework head ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
…mong the values An authored chart.yAxis is kept across unrelated picks whether or not values names it, and a report with a chart and no values opens with values seeded from that yAxis instead of the count measure. 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: Round 3. This reviews head ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
The reports/new route adds ReportNewPage as a lazy route view, the fourteenth file AppContent declares; the measurement names it. 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: Round 4. This reviews head Carried from round 3 (head ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj 维护者速读系统管理员在报表页点「编辑」,或打开新建报表的地址,都进同一个整页的报表搭建页:左边是实时的图,右边五项(报表类型、数据来源、指标、分组、图表)。选完数据来源立刻出一个数字;缺什么,就在图的位置写一句,并自动打开那一项。点「保存」后马上对所有人生效。 席位核对 — ACCEPT (L1) · repo:objectstack#1 · head
|
objectstack-ai#36657) <!-- claude-projects-attribution: {"github_login":"os-warren"} --> _Requested by **Warren** · [project thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ89Betg8QPoUPD5NhDenSfS2)_ Fixes objectstack-ai#36364 Clause-②: yes (widening) — three new `@object-ui/i18n` keys (`designMode.menu.newReport`, `designMode.menu.newReportLeft`, `report.builder.addsToMenu`) in all 11 locales; no spec, schema or public export change Metadata-protocol: none repo:objectstack#1 · os-warren · session_01JQwxbXq2Dxb31zZNmSqCtz ## 维护者速读 - 用户能看到什么变化:管理员在设计模式里「添加菜单项 → 报表」,第一行是「新建报表…」,点了会占好菜单位置并打开报表搭建页;选好数据来源和指标、保存后,新报表出现在占好的位置,设计模式里的其他改动一起保存。 - 为什么做:设计模式专题卡的报表这一半,按席位定的方案:报表必须先有数据来源和指标,所以从搭建页新建,而不是只填名字。 - 出错会怎样:菜单保存失败时,刚建的报表会被删掉,设计模式和搭建页都保持打开;中途关闭搭建页或离开它,什么都不写、占位消失;可以直接撤回本次合并。 - 要你做什么:不用做什么。 ## What changes The report half of objectstack-ai#36364, on top of the report builder (objectstack-ai#36644), per the seat's ruling (option A, comment 7090058961): a report needs `dataset` and `values`, so 「New report…」 opens the builder, and the report and its menu entry are written only when the builder saves. - **Picker** (`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's `reports/new`. Nothing is written. - **The slot** (`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 name `showcase_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. - **The builder page** (`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. - **The save** (`designModeMenuCreate.ts`): `NewMenuItem` gains a `report` arm carrying the builder's body. `saveAppMenuWithNewItem` runs 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 door `saveDashboardInPlace` now 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. - **Leaving the builder another way** (a menu link, Back) drops the held place too, so no row waits for a builder that is gone. - **The entry's label**: a report entry with no `label` shows 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 showed `hui_kuan_fenxi` in the menu, and this fixes it. ## Tests - `pnpm --dir ui exec vitest run packages/app-shell/src/layout packages/app-shell/src/views/ReportNewPage` at `f3021225`: `Test Files 157 passed (157)`, `Tests 1284 passed (1284)`. `DesignModeMenu-36363.test.tsx` was rerun at head `ecbe0f66` after the label change: `38 passed`. Earlier at `f7737e36`, `packages/i18n` gave `1978 passed`, with the de quote-pairing count raised 128 → 129 for `newReportLeft`'s „{{name}}“. - New pins: - `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. - Ablations (one-shot, not kept): without the page change, the page file went 3 failed | 1 passed. Without the menu change, all 5 menu report cases were red. - `tsc --noEmit` (app-shell) exit 0. ESLint on the changed files: 0 errors. `check-i18n-call-site-keys` exit 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/`): 1. 「添加菜单项 → 报表」, with 「新建报表…」 first. 2. The builder, with the held 「新建报表…」 row under 数据分析 and the 「adds to the menu」 line. 3. The builder filled: Invoice Metrics, grouped by status, named 回款分析. 4. After Save: the design mode is left, and 「回款分析」 sits in the held place, open. 5. Cancel path: a second 「新建报表…」, closed from the builder. The page goes back, no held row is left, and the mode stays on. Checked through the API after the run: - `report/hui_kuan_fenxi` is stored in `com.example.showcase.custom`, the menu's package (the same item Studio lists), with `_diagnostics.valid: true`. - The app's menu holds `{ id: nav_item_1, type: report, reportName: hui_kuan_fenxi, label: 回款分析 }` under `grp_analytics`. - It is the only `hui_kuan*` report, so the cancelled build left nothing. ## Overlap `overlap-check`: merges cleanly with main, objectstack-ai#36655 and objectstack-ai#36525. With objectstack-ai#36629 it conflicts only in `de-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](https://claude.ai/code)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
…of 2026-11-21) (objectstack-ai#37045) <!-- claude-projects-attribution: {"github_login":"huangyiirene"} --> _Requested by **Irene** · [project thread](https://claude.ai/code/project/chan_01TJXtQ1tVD26ecLDZxFS67x?thread=cmsg_01TJXtQ1tVD26ecLDZxFS67x8Be2AAcUBhodBsvnWLd3Xs)_ Fixes objectstack-ai#36086 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:用户无感;十二份内部设计记录在与现行代码不一致的地方各加一条注明日期的补注,原决定文字不动,只有访客模型里一句已被裁决撤回的接口说明照裁决改掉。 - 为什么做:这是本周的设计记录修订合集;AI 席位改代码前会读这些记录,这十五处已与上线代码不一致,会把 AI 带偏。 - 出错会怎样:只改说明文字,不动代码和功能;补注若写错,读记录的 AI 和人会拿到错误说明,整个合并可以直接撤回。 - 要你做什么:审阅后批准一次(设计记录必须由你亲手批)。 ## What changes Seventeen append-only dated notes, for the 15 rows of this week's card whose code is on `main`, in twelve records. Each note sits directly under the passage it amends, says what `main` does now, and links its card and its landing PR. One clause is rewritten, in ADR-0138, as its row and the ruling on it ask. No other decision text is rewritten, struck or reordered. Six records whose header indexes their amendments gain a pointer entry there (ADR-0050, 0066, 0090, 0138, 0151, 0158). | # | ADR · section | What it said | What `main` does | Landing PR | Note location | |:--|:--|:--|:--|:--|:--| | 1 | ADR-0158 · Open item 12 | Which aggregates count as "raw" is left to the aggregate card | `sum`, `avg`, `min` and `max` over a `record`-mode quantity are refused unless the query groups by the quantity's own `unitField`: ObjectQL aggregate `INVALID_FIELD` / 400, `summary` field `INVALID_METADATA` / 422, cube measure `INVALID_FIELD` / 400 on each query. `count`, `count_distinct`, a `fixed`-mode quantity and a plain number are not judged. No error code is added | objectstack-ai#36060 | under Open item 12; status entry | | 2 | ADR-0066 · D2 ⑧ | View All and Modify All are the bits that vote on every field of an object | A set may carry `viewAllFields`: a read vote, never an edit vote, on every field of the object. The set's own `readable: false` row beats it. It grants no object access, no record and no admin posture | objectstack-ai#36085 | under D2 ⑧, after the 2026-11-15 note; status entry | | 3 | ADR-0090 · D5 | The high-privilege list refused on an `everyone` binding | The list gains `viewAllFields` on any object entry | objectstack-ai#36085 | under D5; status entry | | 4 | ADR-0090 · D12, condition (a) | No `viewAllRecords` or `modifyAllRecords` on `'*'` | Condition (a) also refuses `viewAllFields` on `'*'`; the bit on a named object stays inside the boundary | objectstack-ai#36085 | under D12's 2026-10-17 amendment | | 5 | ADR-0151 · D3 | The bits the agent ceiling removes | The clamp also clears `viewAllFields` on every object entry; assigning a set that carries it to an account is refused by name | objectstack-ai#36085 | under D3; header entry | | 6 | ADR-0050 · Decision 2, the 2026-10-20 note | "a per-list open mode, if ever wanted, is the list's existing `navigation.mode`" | On an object's list `navigation.mode` is deprecated and no longer picks how a record opens: the name opens the full page, the hover icon the side panel. `none` still means the rows open nothing. A page block still honours every value | objectstack-ai#35910 | under Decision 2, after the 2026-10-20 note; status entry | | 7 | ADR-0050 · the same note | The create form is chosen by convention from the object's form views | The console's record create and edit forms are the object's own, laid out by `fieldGroups`, less a `showOnCreate: false` field on a create. An internal form view steers nothing there. A public form and a named form an action opens keep their own definition | objectstack-ai#36543 | second note under Decision 2 | | 8 | ADR-0052 · section 5b, tier 1 | "Opt-in (like Feed Tracking) keeps the stream from becoming change-noise" | Old and new values show by default. Off per object with `enable.fieldHistory: false`, per field with `fieldHistory: false`. An entry serves a field's values only to a reader who is served that field | objectstack-ai#36399, objectstack-ai#36580, objectstack-ai#36613, objectstack-ai#36641, objectstack-ai#36661 | under tier 1 | | 9 | ADR-0146 · D1 | Studio is where metadata is edited | A workspace administrator also edits in the running app: the menu and the pinned header actions in design mode, a dashboard on its page, a report on its builder page, a view's settings on the view. Each save is one item's draft and publish, and writes nothing over a pending draft | objectstack-ai#36397, objectstack-ai#36437, objectstack-ai#36629, objectstack-ai#36405, objectstack-ai#36644, objectstack-ai#36411, objectstack-ai#36848 | end of D1, after the 2026-11-24 amendment's table | | 10 | ADR-0146 · D5 (two card rows) | The bridge draws on the app switcher row and the app bar entry | From 768 px up the entries are two rows of the app-name menu. "Design layout" turns on design mode. "Edit app" opens Studio, and reads "View in Studio" for a read-only package. The page header draws neither | objectstack-ai#36437, objectstack-ai#36621, objectstack-ai#36789 | under D5 | | 11 | ADR-0146 · D10, the 2026-11-22 note | An extension places only what it brings; the base's arrangement stays the base's | The App's paired `.custom` package may declare whole `fieldGroups` and `relatedLists`. Each key it writes replaces the folded result whole. Any other package is refused and prescribed `place` | objectstack-ai#36517 | under D10, after the 2026-11-22 note | | 12 | ADR-0146 · D10, the same note | (the same) | `actionLayout` is the third such key. Only the paired `.custom` package writes it on an extension. Each arm it writes replaces the served arm whole. The server refuses the shape; the reference is refused by design mode's Save and by the CLI rule only | objectstack-ai#36629 | second note under D10 | | 13 | ADR-0138 · D2, the 2026-11-20 amendment | The restriction profile is served on the unscoped route "and its environment-scoped twin" | Only the unscoped route is mounted. A request to the twin gets the host's ordinary not-found answer. A server that mounts the scoped base alone serves no profile | objectstack-ai#36531 | the clause is rewritten in place; a dated amendment under it; status entry | | 14 | ADR-0149 · D3, rules 4 and 5 | Both rules apply to an unknown word beside a grouping word; the record did not say which governs | Rule 4 governs the unknown word: the labelled fallback, nothing asked. Rule 5 is the rule for a question that names no number. Beside a fallback the note ends with one conditional sentence | objectstack-ai#36509 | under D3, after the 2026-11-19 note | | 15 | ADR-0027 · roadmap row M2 | "explicit, batched publish" | In Studio's designers a person's Save writes the draft and publishes that one item at once. Drafts and the package's batch publish remain for an AI's changes | objectstack-ai#36597, objectstack-ai#36634, objectstack-ai#36652 | under the roadmap table | | 16 | ADR-0037 · the product-boundaries amendment | "Publish remains the single commit gate shared by every surface" | The publish is the item's own, issued by the Save itself. The top bar's Publish is drawn only while a draft is pending | objectstack-ai#36597, objectstack-ai#36634, objectstack-ai#36652 | under that sentence | | 17 | ADR-0085 · section 2 | `relatedLists` is "the one place" where the re-arrange rejection yields | `actionLayout` is the second: a ruled exception (the maintainer's ruling on objectstack-ai#36635), on the object, with a `list` arm and a `record` arm | objectstack-ai#36629, objectstack-ai#36815 | under section 2, after the 2026-11-22 note; dated 2026-11-23 | The 15 card rows are the 17 lines above: the `viewAllFields` row is lines 2 to 5, and the two ADR-0146 D5 rows are line 10. **Rows not carried** - ADR-0085, the `fieldGroups[].collapse` row: already on `main` through objectstack-ai#36817. The record carries "Addendum (2026-11-22): on the synthesized record page the reader folds every titled group", which says what the row asks for. Nothing is added. No `scripts/adr-anchors/**` entry moves. No `**Status**:` line changes in the part the index projects, so `docs/adr/README.md` stays current. ## Why AI seats read the ADRs before they change code in governed territory (AGENTS.md Prime Directive objectstack-ai#13). These passages say something `main` no longer does, so a seat that trusts them is steered wrong. This is the week's rolling ADR revisions card: its rows land together as one governed `docs/adr/**` PR and one approval, on the maintainer's word of 2026-11-20 (「adr接受你的建议」). ## Tests Docs-only diff: no package, test or build input is touched, so no package test or typecheck applies, and nothing a test pins changes. ## Acceptance notes - Every row was read against the code on `main` at `a73edb3cd`, not against PR state. Each landing commit is an ancestor of the branch, and each note names the file or symbol that makes it true. `main` has moved once since (`9c57bd283`); that commit touches no `docs/adr/**` file and no file a note names. - Where a row's claim is not what `main` does, the note states what `main` does: - **ADR-0052.** The row gives the per-field switch as `trackHistory: false`. On `main` it is `fieldHistory: false`; `trackHistory: false` reads as unset. - **ADR-0146 D1.** Three sentences of the row are not written. "The fate of Studio's Interfaces pillar is still open": the 2026-11-24 amendment of D1, already on `main`, retires the pillars. "Studio is not changed by this batch": the same amendment changes it. "Each of these writes the same paired package": a report's save and a change to an existing view's settings name no package, and the menu, the action arrangement and a dashboard go to the item's own package when it is writable. The note says where each save lands. It does not repeat what that amendment already says about dashboards and reports opening in the app. - **ADR-0146 D5.** Both card rows describe a state objectstack-ai#36789 has since replaced: the row of objectstack-ai#36437 has the page header's button enter design mode, and the row of objectstack-ai#36621 has the app-name menu's "Edit app" enter it. On `main` the entry into design mode is "Design layout", and "Edit app" opens Studio. The two rows are written as one note that states the end of that sequence. - **ADR-0027.** The row says later PRs will move the other Studio editors. They have landed (objectstack-ai#36634, objectstack-ai#36652) and the note cites them. It quotes the maintainer's own sentence on the epic, not the epic's summary line. - **ADR-0037.** The row says a pending draft now means an AI's draft. Studio's generic item page still saves a person's drafts (its move is declared by D1's amendment and not built), and the note says so. - **ADR-0085.** The row says the row menu is queued and not built. objectstack-ai#36815 built it, and it follows the `record` arm; the note says so. The `list` arm still has one reader. - Header entries: added where a record's header indexes its amendments (ADR-0050, 0066, 0090, 0138, 0151, 0158). Not added to ADR-0146: its status block lists only the maintainer's in-place amendments, its 2026-11-22 note under D10 has no entry there, and open PR objectstack-ai#36957 edits that block. Not added to ADR-0027, 0037, 0052, 0085 and 0149, whose headers hold no such list. - Dates: every note is dated 2026-11-24, except ADR-0085's, dated 2026-11-23 as its row sets (that record dates its notes by ruling). ADR-0138's amendment is dated 2026-11-24 and names the ruling's date, 2026-11-22. - ADR-0151 is `Proposed`; its note follows the form of the dated notes it already carries. - The spec docblock sentence the ADR-0085 row mentions landed with objectstack-ai#36629, so nothing outside `docs/adr/**` is owed. - Noted, not filed (read-only observations, nothing was run to exercise them): - A report's save, and a change to an existing view's settings, from the running app name no package. For an item of an installed package whose stored rows are not bound to exactly one package, the server then addresses the package-unbound row, not the paired `.custom` package ADR-0146 D2 points customizations to. Whether a door refuses that write was not measured. - Two source comments still say design mode is entered from "Edit app" (the page-actions module header and the design-mode module's gate paragraph). Comments only. - Landing tier: Tier H (`docs/adr/**`, governed; the maintainer approves). The diff is +243 / -5 over 12 files. ## Verification Read first, by risk: 1. `docs/adr/0138-guest-model-anonymous-principal-doors-grants-and-organization.md`, the D2 hunk: the one place earlier text is rewritten. 2. `docs/adr/0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md`, the note at the end of D1: the widest claim, where each in-app save lands. 3. `docs/adr/0066-unified-authorization-model.md`, the note under D2 ⑧, with its ADR-0090 D12 twin: permission semantics. Two-minute check: `pnpm check:adr-symbol-anchors` prints a green line that starts `check-adr-symbol-anchors: 3904 anchors across 160 records`, and `git diff origin/main...HEAD --stat` shows 12 files, 243 insertions and 5 deletions. <details><summary>Gate readings on e5c60bf</summary> `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived the same 21 families on `8c705bc2c` and on `e5c60bff0`. The readings below are the second run, on `e5c60bff0`, each exit captured before any pipe: ```text node scripts/check-adr-links.mjs :: exit 0 node scripts/check-adr-links.mjs --self-test :: exit 0 node scripts/check-closing-keyword-parity.mjs :: exit 0 node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0 node scripts/check-comment-mask-corpus.mjs :: exit 0 node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0 pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0 pnpm check:adr-anchors :: exit 0 pnpm check:adr-index :: exit 0 pnpm check:adr-symbol-anchors :: exit 0 pnpm check:ci-filter-parity :: exit 0 pnpm check:closed-ceremony-text :: exit 0 pnpm check:cross-package-test-inputs :: exit 0 pnpm check:doc-authoring :: exit 0 pnpm check:driver-memory-census :: exit 0 pnpm check:gitlink-declared :: exit 0 pnpm check:nul-bytes :: exit 0 pnpm check:pm-governed-merges :: exit 0 pnpm check:pm-prior-rulings :: exit 0 pnpm check:refd-timer-probe :: exit 0 pnpm check:watch-hint-literal :: exit 0 ``` On the first run `check:doc-formula-expressions` answered 3, prerequisite not met, until `formula` and `lint` were built under `os-verify-lock` (VERDICT command-exit 0, 5 of 5 tasks). `--ran` reconciliation: 21 derived, 21 run, 0 NOT-MEASURED (a derived zero). `node scripts/adr-index.mjs --check`: exit 0, the README is current. `check-commit-card-trailers --range origin/main..HEAD`: exit 0, 2 commit messages. `overlap-check`: `origin/main` and objectstack-ai#36957 both merge cleanly, VERDICT clean exit 0. `check-governed-merges --branch`: GOVERNED, 12 of 12 paths on the register, Tier H. Control-byte scan of the twelve files: 0 hits. </details> ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (No schema touched.) - [x] 2. Every name I added uses the casing for its kind. (No name added.) - [ ] 3. No formatter ran; `pnpm lint` passes. (No formatter ran. `pnpm lint` was not run locally on this Markdown-only diff; CI judges it.) - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. (Publishes nothing: `skip-changeset`.) - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed. (Not touched.) - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. - [ ] The *Before Submitting* list in CONTRIBUTING.md is done. (Not walked item by item; the derived gates above are what ran.) 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01J8VVAoUbebHyRXKT4GxBTV --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Warren · project thread
Fixes #36374
Clause-②: yes (widening) — new public exports from
@object-ui/plugin-report(ReportBuilderand its model types, no value exports besides the component), a new optionalfoldTableUnderChartprop onDatasetReportRenderer, and new@object-ui/i18nkeys (report.builder.*,report.computedValues) in all 11 locales; no spec, schema or server changeMetadata-protocol: none
维护者速读
What changes
The builder (
ui/packages/plugin-report/src/builder/, exported from@object-ui/plugin-report)ReportBuilder.tsx: header (close ×, the name and the one-line description editable in place, Discard, Save), the report drawn live on the left, five settings on the right: report type (one entry, 「现状分析」, the dropdown kept for later types), data source (existing datasets by label), measure, grouping (+ 「再分一层」), chart (bar, line, donut, number, table, with Show values and a target line). There is no Generate button.reportBuilderModel.ts: what each pick writes into the report document, all in the spec's own vocabulary:dataset,values[0](a measure the bound dataset declares),rows(one or two dimensions),chart(type,xAxis= first grouping,yAxis= measure,seriesBy= second grouping on bar/line only, as the spec refuses it on a donut),chart.showDataLabels, a y-axischart.annotationsline for the target, anddateRangewhen the report groups by a date. Picking a dataset starts on its count measure, no grouping,metricchart (a number). Grouping a number turns it into bars; ungrouping bars turns them back.reconcilekeeps the measure and the axis an authored chart draws (chart.yAxis/chart.xAxis) across unrelated picks, whether or notvaluesnames that measure; only picking a measure or a grouping changes them. A report with a chart and novaluesopens withvaluesseeded from itsyAxis. The builder is network-free: the host hands in the dataset catalog and the bound dataset's members and owns Save / Discard / Close, so 设计模式(三)在「添加菜单项」里新建仪表盘、新建报表:建完落在占好的位置,直接进入编辑 #36364 can host it too.DatasetReportRenderergains an optionalfoldTableUnderChart: under a drawn chart (series or single number) the table folds behind a 「计算值」 toggle, kept mounted so Download still writes it. Off by default: the report page is unchanged.The doors (
ui/packages/app-shell)ReportBuilderHost.tsx: the console host. Reads the catalog and members throughuseDatasetCatalog/useDatasetSemantics(the Studio inspector's hooks), and drives the name and description boxes throughservedLabel.ts(shownLabel/writtenLabel/servedLabelNote), so the boxes read the session language and a save keeps the source text (reading first: Studio's edit-and-save round trip in a non-source locale may store the served translation as the source label for book, page, dashboard, report, app, dataset and mapping (the translated-echo restore covers object only) #35008, 仪表盘和报表的编辑面板换成业务用词:字段显示标签不显示内部名,「维度」「度量」改成「分组」「指标」,图表类型用中文,标题不变成英文 #36373, Report and dashboard name edits in the current language are not served when there is no packaged base or the override pair translates the slot #36481).ReportView.tsx: 「编辑」 opens the builder for a dataset-bound report (opensInBuilder); the builder replaces the page and the draft bar sits above its preview. Ajoinedreport, a pre-dataset report (objectName/dataSource/ inlinedata), and a dataset report with a cross-tab (columns), a savedruntimeFilteror severalvalueskeep the existing inspector panel, which edits every shape the spec allows. A one-time navigation-state landing (reportBuilderArrival.ts) opens the builder on arrival, for a door that has just created a report (设计模式(三)在「添加菜单项」里新建仪表盘、新建报表:建完落在占好的位置,直接进入编辑 #36364).ReportNewPage.tsxatreports/new(route, chunk and metadata-read rows added): the same builder on an empty report, admin only. Save derives the identifier from the name (Chinese romanised, as the Studio inspector does), suffixed until no known report holds it, then asks the server for each candidate by name (freeReportName;getreads every served layer, and the save's draft pin covers a pending draft) and moves past any it holds, so a create never overwrites a report the list did not show; then it lands on the report page.saveAndPublishRuntimeMetadata(the list view's shared-view save). This follows the maintainer's ruling on epic 专题:Studio 的保存方式和用词(人工修改保存即生效,草稿加整包发布只留给 AI;设置页说业务话;页签和顶部导航重排) #36510 (2026-11-22, verbatim: 「人改一项、点保存、立刻生效。草稿加整包发布只留给 AI 的批量改动」), relayed by the seat for this card. Relation to ADR-0034: the per-item draft/publish model is kept underneath (the body is written as the item's draft with the first-write pin, then published); only the separate manual Publish step is removed from the human edit path. Over any pending draft (including one the saving admin left earlier) nothing is written (pending-draft), the builder stays open and says so, and the draft bar above the preview publishes or discards that draft.writeRefusalCensus-11583.test.ts: theReportView.tsx › saveSchema › persistRuntimeMetadatarow is removed, because the call is nowsaveAndPublishRuntimeMetadata, which is outside the census population (its view callers are not counted either). The refusal toast it pinned is still pinned, by the new builder cases inReportView.saveRefusal-11583.test.tsx.Copy:
report.builder.*andreport.computedValuesin all 11 locales; zh-Hant regenerated withgen:zh-hant.Why
Card #36374 (epic #36255, board 49 figure 3): one page for new and existing reports, a picture at once, and the missing piece said where the chart would be.
Verification
Run on head after merging the latest
main:ui:vitest runonplugin-report/src/__tests__/reportBuilder-36374.test.tsx(model: every pick yields a reportReportSchemaaccepts; page: missing-piece sentence and auto-open, number on dataset pick, number→bars on grouping, second layer, chart switches; fold: table under a chart behind 「计算值」),app-shell/src/views/ReportView*(builder Save publishes,pending-draftkeeps the builder open with the reason, refusal toast,opensInBuilderrouting, joined / pre-dataset reports keep the panel),reportBuilderArrival-36374.test.ts(one-time landing, identifier from name),writeRefusalCensus-11583.test.ts: 11 files, 68 tests pass (one added after the browser run below caught the measure picker opening by itself on a just-picked data source; after the L2 review: the authored-chart fidelity case, the panel routing cases andfreeReportName). The two authored-chart cases (one value that is not the charted measure; a chart with no values) fail on the previous model (2 failed | 19 passed) and pass on this one.@object-ui/i18nfull suite (all-locales parity, zh-Hant generated) passes.pnpm --filter @object-ui/app-shell type-check(both programs): 0 errors.plugin-reporttype-check: 0 errors.DatasetReportRenderer.tsxis onmainalready).scripts/pm/overlap-check.mjs --branch=HEAD: clean.Acceptance notes
dateRange(builder default 「今年」); the chip on the drawn report carries the dashboard presets plus 「全部」, which is the card's preset list.ReportView.saveSchema,ReportNewPage) is in the census population now, assaveAndPublishRuntimeMetadatais outsideSEAM_WRITES; both surface a refusal toast and the builder's is pinned byReportView.saveRefusal-11583.test.tsx. Taking that door into the census is a follow-up.reports/newaddress, the one-time arrival landing that opens the builder on a just-created report, andReportBuilder/ReportBuilderHosttaking anyonSave.6fea0ab67): 「编辑」 on Hours by Status (Chart) opens the builder with its bars and settings filled in;reports/newsays 「选一个数据来源」 where the chart would be with that picker open; picking Invoice Metrics draws 12 at once; grouping by Issued draws monthly bars with the 「今年」 period chip; ungrouping and choosing a donut says 「选一个分组字段」 with the grouping picker open and Save off. The five screenshots went with the card report in the project thread.Human Minimum
packages/specholds no runtime logic. (No spec change.)pnpm lintpasses. (CI owns the repo-wide lint run.)main, one pull request.packages/spectouched: n/a.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.https://claude.ai/code/session_01JQwxbXq2Dxb31zZNmSqCtz
Generated by Claude Code