Skip to content

feat(console): the report builder — one page to build or edit a report - #36644

Merged
objectstack-fleet[bot] merged 11 commits into
mainfrom
claude/project-thread-bkjint
Nov 23, 2026
Merged

objectstack-fleet[bot] merged 11 commits into
mainfrom
claude/project-thread-bkjint

Conversation

@os-warren

@os-warren os-warren commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by Warren · project thread
Fixes #36374
Clause-②: yes (widening) — new public exports from @object-ui/plugin-report (ReportBuilder and its model types, no value exports besides the component), a new optional foldTableUnderChart prop on DatasetReportRenderer, and new @object-ui/i18n keys (report.builder.*, report.computedValues) in all 11 locales; no spec, schema or server change
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:系统管理员在报表页点「编辑」,进入整页的报表搭建页:左边是实时的图,右边五项(报表类型、数据来源、指标、分组、图表);选完数据来源立刻出一个数字,缺什么就在图的位置写一句并自动打开那一项;新建报表也用这个页面。
  • 为什么做:仪表盘和报表使用体验专题的搭建页这一张,照 Attio 的做法,让管理员不进 Studio 就能搭报表。
  • 出错会怎样:保存被拒时搭建页不关、改动还在,并说明原因;保存成功后所有人马上看到新样子;可以直接撤回本次合并。
  • 要你做什么:无。

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-axis chart.annotations line for the target, and dateRange when the report groups by a date. Picking a dataset starts on its count measure, no grouping, metric chart (a number). Grouping a number turns it into bars; ungrouping bars turns them back.
  • Missing pieces: no data source → 「选一个数据来源」; a dataset with no measures; no measure → 「选一个指标」; a bar/line/donut with no grouping → 「选一个分组字段」. The sentence is drawn where the chart would be, and that section's picker opens by itself, once per missing piece. Save is off while a piece is missing.
  • reconcile keeps the measure and the axis an authored chart draws (chart.yAxis / chart.xAxis) across unrelated picks, whether or not values names that measure; only picking a measure or a grouping changes them. A report with a chart and no values opens with values seeded from its yAxis. 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.
  • DatasetReportRenderer gains an optional foldTableUnderChart: 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)

Copy: report.builder.* and report.computedValues in all 11 locales; zh-Hant regenerated with gen: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 run on plugin-report/src/__tests__/reportBuilder-36374.test.tsx (model: every pick yields a report ReportSchema accepts; 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-draft keeps the builder open with the reason, refusal toast, opensInBuilder routing, 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 and freeReportName). 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/i18n full suite (all-locales parity, zh-Hant generated) passes.
  • pnpm --filter @object-ui/app-shell type-check (both programs): 0 errors. plugin-report type-check: 0 errors.
  • ESLint on the changed files: no new findings (the one error in DatasetReportRenderer.tsx is on main already).
  • scripts/pm/overlap-check.mjs --branch=HEAD: clean.

Acceptance notes

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (No spec change.)
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes. (CI owns the repo-wide lint run.)
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: n/a.
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

https://claude.ai/code/session_01JQwxbXq2Dxb31zZNmSqCtz


Generated by Claude Code

…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
@os-warren os-warren self-assigned this Nov 23, 2026
@github-actions github-actions Bot added size/xl 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 Nov 23, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 6fea0ab67c6adc460776a2750d60a55faa312323
Local-runs: none
Scope: ui/packages/plugin-report/package.json (exports), ui/packages/plugin-report/src/index.tsx, ui/packages/plugin-report/src/DatasetReportRenderer.tsx, ui/packages/i18n/src/locales/*.ts (11 locales), .changeset/36374-report-builder.md + ui/packages/plugin-report/src/builder/ReportBuilder.tsx, ui/packages/plugin-report/src/builder/reportBuilderModel.ts, ui/packages/app-shell/src/views/ReportBuilderHost.tsx, ui/packages/app-shell/src/views/ReportView.tsx, ui/packages/app-shell/src/views/ReportNewPage.tsx, ui/packages/app-shell/src/views/reportBuilderArrival.ts, ui/packages/app-shell/src/console/AppContent.tsx, ui/packages/app-shell/src/console/appRouteMetadataReads.ts, ui/packages/app-shell/src/views/writeRefusalCensus-11583.test.ts
Security-touching: yes
Rule-change-verified: none

Read: the net diff origin/main...6fea0ab67 (27 files), card #36374 body and comments, the PR #36644 body, and the 39 check-runs on the head. At reading time Check Changeset, the Lint, Type Check and E2E UI jobs were in_progress; Check PR Size, Type Check · workspace, Governed Surface Queue Guard, PR-body guards, Test Core and Dogfood Regression Gate were success. No check had failed yet. Security-touching is yes for one reason only: ReportNewPage.tsx adds a client-side admin-only gate on the new reports/new route, the same gate the existing 「Edit」 button uses. The server-side write authority (the /meta save and publish doors) is unchanged.

① Derived judgments

  • Declared vs exported, @object-ui/plugin-report. package.json has a single "." entry, so src/index.tsx is the whole public surface. The diff adds these to the index: ReportBuilder; the types ReportBuilderProps, ReportBuilderTextBox, ReportBuilderDataset, ReportBuilderMeasure, ReportBuilderDimension, ReportBuilderMembers, ReportBuilderMissing, ReportBuilderSection and ReportDraft; and three value exports, REPORT_BUILDER_CHART_TYPES, reportBuilderMissingPiece (aliasing missingPiece) and reportBuilderPickDataset (aliasing pickDataset). The declaration says "ReportBuilder and its model types". The type exports match it. should-fix: the three value exports are published without being declared, and nothing in the tree uses them: git grep at the head finds them only in index.tsx and builder/. ReportBuilderHost imports only ReportBuilder, ReportDraft and DatasetDrillArgs. The fix is either to name them on the Clause-②: line in the PR body and the changeset, or to drop them from the index until 设计模式(三)在「添加菜单项」里新建仪表盘、新建报表:建完落在占好的位置,直接进入编辑 #36364 needs them.
  • foldTableUnderChart. It is optional and boolean, and the declaration matches it. The fold applies only when !crossTab and the chart plan is series or single_value. The table stays mounted (hidden), so export still writes it, as the jsdoc says.
  • i18n. Each of the 11 locales gets the same 55 added lines (report.computedValues and report.builder.*). No locale removes a line. This matches the declaration.
  • ReportDraft is a string-keyed record of unknown values. It is a loose published type rather than ReportSchema. The comment says this is on purpose. Noted as a nit only: once it is published, narrowing it later becomes a contract change.

② Semver level

  • must-fix. .changeset/36374-report-builder.md grades @object-ui/plugin-report, @object-ui/app-shell and @object-ui/i18n all as minor, and the same changeset and the PR body declare Metadata-protocol: none. scripts/check-changeset-no-major.mjs (judgeLevel, around L2052-2057) returns none-minor whenever none is declared and any introduced entry is minor or above, and that case exits 1 (around L2355-2375). The workflow prose (pr-automation.yml, "WHICH LEVEL") says the same thing: the console, feat:, and non-authorable types under none are patch. Nothing in the diff changes what a metadata author can write: there is no spec, schema or authorable-baseline change, and the new keys are UI catalogue strings and runtime component props. So none is the right declaration and the three entries must be patch. Check Changeset was still in_progress on the head when read, but on a static reading it will fail.
  • Breaking-ness. No existing export or prop was removed or narrowed. The index.tsx hunk only adds lines, the new prop is optional, and the i18n hunks only add keys. So no BREAKING banner or ADR-0087 disposition is owed.

③ Boundary flags

  • Existing exports and props. No breaking change.
  • Default behaviour of DatasetReportRenderer. foldTableUnderChart is off by default (!!undefined is false). The only caller that turns it on is ReportBuilder.tsx, and ReportView never sets it. The report page's renderer is unchanged.
  • Default behaviour of the report page (declared, card-mandated). 「Edit」 now opens the full-page builder for every dataset-bound report (opensInBuilder). Only joined and pre-dataset reports (objectName / dataSource / data) keep the inspector panel. The card asks for exactly this (要做的 1). nit: a dataset-bound report that also uses columns (a cross-tab), order, runtimeFilter or several values loses its console editor for those keys. The builder keeps them on every pick except a data-source switch, but offers no control for them and no way back to the panel. 「+ 筛选」 is declared as not built. Studio remains the path.
  • Save path. It agrees with the ruling. ReportView.saveSchema (used by both builder and panel) and ReportNewPage.handleSave both call saveAndPublishRuntimeMetadata, which stages the draft with ifNoneMatch: '*', publishes, and on a refused publish discards the draft it wrote. A 409 draft conflict resolves pending-draft before anything is written. Both callers then toast report.builder.pendingDraft and return false, so the builder stays open with its edit. That is "save once, live at once", with nothing written over a pending draft. The inspector panel's save becomes save-and-publish too. That is declared ("for the builder and the inspector panel alike") and is covered by the epic 专题:Studio 的保存方式和用词(人工修改保存即生效,草稿加整包发布只留给 AI;设置页说业务话;页签和顶部导航重排) #36510 ruling quoted in the PR body. nit: the changeset and PR body say "a draft someone else left pending", but the door refuses any pending draft, including one the saving admin left earlier. The behaviour is the safe one; only the wording is narrower than the code.
  • New id materialisation (should-fix). ReportNewPage.newReportName derives the identifier from the label on the client and makes it unique only against the console's reports list. The write it then makes, saveAndPublishRuntimeMetadata, pins only the draft layer (ifNoneMatch: '*' refuses only a pending draft). So a published report with the same name that the list does not hold is overwritten and published at once, with no prompt. That can happen when the list was read before another admin's create, or when the name is held in a package the served list does not show. For a create, the door should refuse an existing name of any layer (a create-only pin or an existence check at the server), or the PR should state why the client list is authoritative. There is no app-side join. The builder fetches no rows itself: the preview goes through DatasetReportRenderer's existing dataset query, and the catalog and members come from the existing useDatasetCatalog / useDatasetSemantics hooks. So no SQL push-down finding.
  • Builder model fidelity (should-fix). In reportBuilderModel.ts, reconcile always rewrites chart.yAxis = values[0] and chart.xAxis = rows[0]. But selectedMeasure shows chart.yAxis first. On an existing report whose authored chart.yAxis is not values[0] (or whose xAxis is not rows[0]), the first grouping or chart-type pick silently switches the charted measure (or axis) away from the one the picker shows, and Save then publishes that switch to everyone. The fix is to reconcile from the measure the builder shows (selectedMeasure) rather than values[0], or to normalise once on open. The showcase report the PR body's browser run used (showcase_hours_by_status_chart) is consistent, so that run would not have caught this.
  • Write-refusal census (nit). writeRefusalCensus-11583.test.ts drops the ReportView.saveSchema row because saveAndPublishRuntimeMetadata is not in SEAM_WRITES. So neither of the two new report write sites (ReportView.saveSchema and ReportNewPage.handleSave) is counted by the census. Both do surface a refusal (a toast with formatMetadataError), and ReportView.saveRefusal-11583.test.tsx pins one of them. The census population could take this door, as a follow-up.
  • Arrival landing. reportBuilderArrival.ts uses navigation state only, is read once per location.key, and is cleared with replace, so a shared or reloaded URL never opens the builder. No concern.
  • Card acceptance. Not built, as declared in the PR body: 「+ 筛选」, 「显示数量为 0 的分组」, 「和上一期对比」, and the 3-month preset the card asks for (the period chip reuses the existing presets). These are recorded narrowings, not contract findings.

Implemented-by: claude/project-thread-bkjint
Reviewed-by: session_01JQwxbZeHNsF3RWcWpj7rGj

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

Copy link
Copy Markdown
Contributor

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

Contract review

Served-tier: TIER_DEFAULT
Head-sha: e1bb43f45b4f251df2860e45d11e134063c8da92
Local-runs: none
Scope: ui/packages/plugin-report/package.json (exports), ui/packages/plugin-report/src/index.tsx, ui/packages/plugin-report/src/DatasetReportRenderer.tsx, ui/packages/i18n/src/locales/*.ts (11 locales), .changeset/36374-report-builder.md + ui/packages/plugin-report/src/builder/ReportBuilder.tsx, ui/packages/plugin-report/src/builder/reportBuilderModel.ts, ui/packages/app-shell/src/views/ReportBuilderHost.tsx, ui/packages/app-shell/src/views/ReportView.tsx, ui/packages/app-shell/src/views/ReportNewPage.tsx, ui/packages/app-shell/src/views/reportBuilderArrival.ts, ui/packages/app-shell/src/console/AppContent.tsx, ui/packages/app-shell/src/console/appRouteMetadataReads.ts, ui/packages/app-shell/src/views/writeRefusalCensus-11583.test.ts, ui/scripts/check-i18n-call-site-keys.mjs
Security-touching: yes
Rule-change-verified: none

Round 2. This reviews the rework head e1bb43f45 (commits ac9fd9beb and e1bb43f45, on top of 6fea0ab67, which was FAILed in round 1). I read the delta 6fea0ab67..e1bb43f45 (20 files) and the net diff against origin/main where I needed it. The live PR body and head are e1bb43f45. Check-runs at reading time: 43 on the head. Check Changeset, Type Check UI, Lint UI and E2E UI were in_progress. Type Check · workspace, Check PR Size, Governed Surface Queue Guard, Test Core, Dogfood Regression Gate and PR-body guards were success. One duplicate PR-body guards run was cancelled, superseded by a later green run. Nothing had failed. Security-touching stays yes for one reason only: ReportNewPage.tsx puts a client-side admin-only gate on reports/new, the same gate as the existing 「Edit」. The server's write authority is unchanged.

① Derived judgments

  • Round 1 should-fix (undeclared value exports): resolved. The export { REPORT_BUILDER_CHART_TYPES, missingPiece as reportBuilderMissingPiece, pickDataset as reportBuilderPickDataset } block is removed from src/index.tsx. At the head, the published surface (package.json has a single "." entry) adds ReportBuilder, plus types only: ReportBuilderProps, ReportBuilderTextBox, ReportBuilderDataset, ReportBuilderMeasure, ReportBuilderDimension, ReportBuilderMembers, ReportBuilderMissing, ReportBuilderSection and ReportDraft. Neither the new ReportBuilderMissingReason union nor REPORT_BUILDER_CHART_TYPES came back into the index. ui/scripts/check-i18n-call-site-keys.mjs reads both straight from packages/plugin-report/src/builder/reportBuilderModel.ts as DYNAMIC_KEY_FAMILIES vocabularies (array and union), so the i18n gate's registration does not publish anything. ReportBuilderMissing.reason is now typed through that unexported union. That is structurally the same literal union as before, so the published ReportBuilderMissing type is unchanged. The PR body's Clause-②: line now says "no value exports besides the component", which matches.
  • foldTableUnderChart. No change since round 1: optional, boolean, off by default.
  • i18n. The delta adds report.builder.nameTaken to all 11 locales (one line each), and no locale loses a line. This is still within the declared report.builder.*.

② Semver level

  • Round 1 must-fix (minor under Metadata-protocol: none): resolved. .changeset/36374-report-builder.md now grades @object-ui/plugin-report, @object-ui/app-shell and @object-ui/i18n as patch. It and the PR body still declare Metadata-protocol: none. judgeLevel in scripts/check-changeset-no-major.mjs reaches none-clean on that pair: no entry is minor or above, and the diff moves no authorable-surface or authorable-defaults baseline, since there is no packages/spec change. Check Changeset was still in_progress when I read it. This is a static reading.
  • Breaking-ness. No existing export or prop was removed or narrowed. Patch is the right level, and no BREAKING banner or ADR-0087 disposition is owed.

③ Boundary flags

  • Round 1 should-fix (new id materialisation over a published report): resolved. ReportNewPage.freeReportName now asks metadataClient.get('report', candidate) for each candidate. It moves past any name the server holds and gives up after 50 tries with report.builder.nameTaken. I read MetadataClient.get (data-objectstack/src/metadata-client.ts, readItemResponse). It returns null only on a 404 and throws on any other failure. So an existence read that is refused or fails lands in the catch and shows a save-error toast; it never writes. A name that holds only a pending draft is still caught by the save's ifNoneMatch: '*' pin (pending-draft, nothing written). nit: there is a check-then-write window between the get and the draft write. The write pins only the draft layer, so a concurrent create under the same name, published within that window, could still be overwritten. This is narrow, and closing it fully needs a create-only server pin, which is outside this diff. There is no app-side join and no new SQL push-down concern.

  • Round 1 should-fix (builder rewrites an authored yAxis/xAxis): partly resolved; a residual stays at should-fix. reconcile now keeps an authored chart.xAxis that is still grouped, and pickGrouping resets it on purpose (picked.grouping). That half is fixed. The measure half keeps an authored yAxis only when values.includes(prev.yAxis). The same delta makes opensInBuilder send every report with more than one values entry to the panel. So the only reports that can now reach the builder with yAxis ≠ values[0] have values absent, values: [], or a single value different from yAxis. The spec allows all of these: ReportSchema.values is optional, and ReportChartSchema.yAxis is any bound-dataset measure. For all of them the guard falls through to values[0] / the count measure. As a result:

    • values: ['a'] with chart.yAxis: 'b': the picker shows b, the first chart-type or grouping pick charts a, and Save publishes a to everyone.
    • values absent with a chart: fillDefaults (the builder's mount effect) writes values: [countMeasure], and reconcile then re-points yAxis at the count measure as soon as the builder opens. The report turns dirty with no edit.

    The new test (reportBuilder-36374.test.tsx, "an authored chart keeps the measure…") uses a two-value report, which opensInBuilder no longer sends to the builder. So it pins the case that cannot occur and misses the one that can. Fix options:

    • keep prev.yAxis whenever it is a string, without the values.includes guard, and have fillDefaults seed values from chart.yAxis when one is authored;
    • or extend opensInBuilder to keep the panel when chart.yAxis is set and is not values[0].

    The example corpus has no such report: every dataset report in examples/ has yAxis equal to values[0] or no chart. That is why this is a should-fix and not a must-fix.

  • Round 1 nit (dataset reports with shapes the builder cannot edit): resolved. opensInBuilder now also keeps the inspector panel for non-empty columns, a set runtimeFilter, and more than one values entry. A new test in ReportView.saveRefusal-11583.test.tsx pins this. The keys the builder still has no control for are order and dateRange. pickMeasure and pickGrouping keep order (filtered to the members still selected), and dateRange is the builder's own period chip, so nothing is lost.

  • Round 1 nit ("someone else's" pending draft): resolved. The changeset now says "Over any pending draft nothing is written". The PR body says "including one the saving admin left earlier", which matches saveAndPublishRuntimeMetadata's 409 → pending-draft branch.

  • Save path: unchanged since round 1 and still agrees with the ruling. ReportView.saveSchema (builder and panel) and ReportNewPage.handleSave both go through saveAndPublishRuntimeMetadata: a pinned draft write, then a publish, and a refused publish discards the draft it wrote. Over any pending draft nothing is written, and the builder stays open with the reason. That is "save once, live at once".

  • Default behaviour of DatasetReportRenderer. Unchanged: foldTableUnderChart is off by default, and only ReportBuilder passes it.

  • Write-refusal census (nit, carried from round 1). saveAndPublishRuntimeMetadata is still outside SEAM_WRITES, so neither report write site is counted by writeRefusalCensus-11583.test.ts. Both surface their refusal with a toast. This can be a follow-up.

  • pickMeasure (nit). When the shown measure (chart.yAxis) is not in values, values.indexOf(shown) is -1. Math.max(0, …) then replaces values[0] instead of inserting the new measure. The result is still well-formed, since builder reports have at most one value, but it drops the authored values[0] without saying so. The should-fix above touches the same case.

  • ui/scripts/check-i18n-call-site-keys.mjs. It adds two DYNAMIC_KEY_FAMILIES rows (report.builder.chart.* against REPORT_BUILDER_CHART_TYPES, and report.builder.missing.* against ReportBuilderMissingReason). This brings the builder's template keys under the existing gate. It tightens coverage and loosens no rule, and it is not under .claude/**, so Rule-change-verified: none.

Implemented-by: claude/project-thread-bkjint
Reviewed-by: session_01JQwxbZeHNsF3RWcWpj7rGj

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

Copy link
Copy Markdown
Contributor

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 2f4e522fd9fe2bf6b4574b6f318131f6cbc3380c
Local-runs: none
Scope: ui/packages/plugin-report/package.json (exports), ui/packages/plugin-report/src/index.tsx, ui/packages/plugin-report/src/DatasetReportRenderer.tsx, ui/packages/i18n/src/locales/*.ts (11 locales), .changeset/36374-report-builder.md + ui/packages/plugin-report/src/builder/ReportBuilder.tsx, ui/packages/plugin-report/src/builder/reportBuilderModel.ts, ui/packages/app-shell/src/views/ReportBuilderHost.tsx, ui/packages/app-shell/src/views/ReportView.tsx, ui/packages/app-shell/src/views/ReportNewPage.tsx, ui/packages/app-shell/src/views/reportBuilderArrival.ts, ui/packages/app-shell/src/console/AppContent.tsx, ui/packages/app-shell/src/console/appRouteMetadataReads.ts, ui/packages/app-shell/src/views/writeRefusalCensus-11583.test.ts, ui/scripts/check-i18n-call-site-keys.mjs
Security-touching: yes
Rule-change-verified: none

Round 3. This reviews head 2f4e522fd, one commit on top of e1bb43f45 (round 2, which passed with one should-fix still open). I read the delta e1bb43f45..2f4e522fd, which touches only reportBuilderModel.ts and reportBuilder-36374.test.tsx and confirms the claim. The net diff against origin/main is otherwise unchanged from round 2 (28 files). The PR's live head is 2f4e522fd. Check-runs at reading time: 25 on the head, mostly in_progress or queued. Governed Surface Queue Guard was success. One PR-body guards run was cancelled, the same superseded-run pattern as round 2. Nothing had failed. Security-touching stays yes for one reason only: the client-side admin-only gate on reports/new in ReportNewPage.tsx, the same gate as the existing 「Edit」. The server's write authority is unchanged.

① Derived judgments

  • Unchanged from round 2. The published surface (package.json has a single "." entry; this is src/index.tsx) adds ReportBuilder and the types ReportBuilderProps, ReportBuilderTextBox, ReportBuilderDataset, ReportBuilderMeasure, ReportBuilderDimension, ReportBuilderMembers, ReportBuilderMissing, ReportBuilderSection and ReportDraft. It has no other value exports, so it matches the Clause-②: line. The delta touches neither index.tsx nor any exported type. fillDefaults and reconcile are module-internal and are not published.
  • foldTableUnderChart is optional and off by default. The i18n keys (report.builder.*, including nameTaken, and report.computedValues) are the same in all 11 locales. Neither is touched by this delta.

② Semver level

  • Unchanged and correct. .changeset/36374-report-builder.md grades @object-ui/plugin-report, @object-ui/app-shell and @object-ui/i18n as patch under Metadata-protocol: none, which is none-clean in scripts/check-changeset-no-major.mjs judgeLevel. The delta changes no published export and no spec, so patch still holds. No breaking change, so no BREAKING banner or ADR-0087 disposition is owed.

③ Boundary flags

  • Round 2 should-fix (an authored yAxis outside values switched by an unrelated pick, or re-pointed on open): resolved.
    • reconcile now keeps prev.yAxis whenever it is a string. An empty string still falls through to values[0], because the expression is keptMeasure || values[0].
    • fillDefaults now seeds values from an authored chart.yAxis before it falls back to the dataset's count measure. So a report with a chart and no values opens on the measure its chart draws.
    • I traced every caller of reconcile in the model:
      • pickDataset deletes chart first, so prev is empty and the new dataset starts on its count measure, as before.
      • pickMeasure passes picked.measure, which overrides the kept measure, as intended.
      • pickGrouping keeps the measure and resets the axis (picked.grouping).
      • pickChartType keeps both.
      • fillDefaults keeps the authored measure and now also lists it in values.
    • Nothing else re-points yAxis. missingPiece reads selectedMeasure, which prefers chart.yAxis, so a chart-only report is not reported as missing a measure. That is consistent with the seed.
    • The spec does not require yAxis to be in values: ReportChartSchema.yAxis is any bound-dataset measure and ReportSchema.values is optional. The new tests run expectSpecValid on values: ['total_amount'] with yAxis: 'deal_count'.
    • The two new tests pin exactly the shapes round 2 named. One is values: ['total_amount'] with yAxis: 'deal_count', checked across pickChartType, pickGrouping and pickMeasure. The other is values absent, which fillDefaults seeds from yAxis. The two-value case, which can no longer reach the builder (opensInBuilder), was dropped from the test.
  • nit (new, small): with values absent, the builder's mount effect (fillDefaults) now writes values: [yAxis] on open. The report is then dirty with no edit, and a Save without changes writes that values key. The chart is unchanged, and the computed-values table now shows the charted measure. This is harmless and arguably intended, and it is noted only so the dirty flag on open is not a surprise.
  • nit (new, small): a chart-type round trip through 「表格」 (table) deletes chart. Coming back to a chart then charts values[0], so an authored yAxis that was not in values does not come back. While the report is in table mode the measure picker shows values[0], so what the person sees and what is charted stay in step. Nothing is switched silently.
  • nit (carried): in pickMeasure, when the shown measure (chart.yAxis) is not in values, indexOf is -1, Math.max(0, …) makes the index 0, and the authored values[0] is replaced rather than kept. That is a table value the person did not pick. Builder reports have at most one value, so the result is well-formed.
  • nit (carried): the check-then-write window in ReportNewPage.freeReportName. A same-name create published between the get and the draft-pinned write is not refused. Closing this fully needs a create-only server pin, which is outside this diff.
  • nit (carried): saveAndPublishRuntimeMetadata is outside SEAM_WRITES, so the report write sites are not counted by writeRefusalCensus-11583.test.ts. Both show a refusal toast.
  • No regression elsewhere. The Save path is unchanged ("save once, live at once" through saveAndPublishRuntimeMetadata, and nothing is written over any pending draft). foldTableUnderChart still defaults off. Dataset reports with columns, runtimeFilter or several values still keep the inspector panel. The new-report name check against the server is unchanged. No new id materialisation, no app-side join, and no SQL push-down concern.

Implemented-by: claude/project-thread-bkjint
Reviewed-by: session_01JQwxbZeHNsF3RWcWpj7rGj

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

Copy link
Copy Markdown
Contributor

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 087931d9e35bd58711bc2fe99a22ef241b0d48be
Local-runs: none
Scope: ui/packages/plugin-report/package.json (exports), ui/packages/plugin-report/src/index.tsx, ui/packages/plugin-report/src/DatasetReportRenderer.tsx, ui/packages/i18n/src/locales/*.ts (11 locales), .changeset/36374-report-builder.md + ui/packages/plugin-report/src/builder/ReportBuilder.tsx, ui/packages/plugin-report/src/builder/reportBuilderModel.ts, ui/packages/app-shell/src/views/ReportBuilderHost.tsx, ui/packages/app-shell/src/views/ReportView.tsx, ui/packages/app-shell/src/views/ReportNewPage.tsx, ui/packages/app-shell/src/views/reportBuilderArrival.ts, ui/packages/app-shell/src/console/AppContent.tsx, ui/packages/app-shell/src/console/appRouteMetadataReads.ts, ui/packages/app-shell/src/views/writeRefusalCensus-11583.test.ts, ui/scripts/check-i18n-call-site-keys.mjs, ui/scripts/tests/vite-declared-lazy-views.test.ts
Security-touching: yes
Rule-change-verified: none

Round 4. This reviews head 087931d9e, one commit (087931d9) on top of 2f4e522fd (round 3, which passed). git diff 2f4e522fd..087931d9e confirms the delta is only ui/scripts/__tests__/vite-declared-lazy-views.test.ts (+5/-3). It raises the declared-lazy-views count in that test from 13 to 14 and adds expect(declared).toContain('packages/app-shell/src/views/ReportNewPage.tsx'). That matches the routeChunk.lazy(() => import('../views/ReportNewPage.js')) declaration and the reports/new chunk row that this PR adds to console/AppContent.tsx. The test change records a real new lazy route. It does not loosen the assertion: the new file is named individually, so a swapped surface would still fail. It touches no published export, prop, i18n key, changeset or the Save path. The PR's live head is 087931d9e. Check-runs at reading time: 22 on the head, 17 non-skipped, all in_progress, none failed. The round-3 judgments below carry forward unchanged; the delta touches none of the files they rest on. Security-touching stays yes for one reason only: the client-side admin-only gate on reports/new in ReportNewPage.tsx, the same gate as the existing 「Edit」. The server's write authority is unchanged.

Carried from round 3 (head 2f4e522fd):

① Derived judgments

  • Unchanged from round 2. The published surface (package.json has a single "." entry; this is src/index.tsx) adds ReportBuilder and the types ReportBuilderProps, ReportBuilderTextBox, ReportBuilderDataset, ReportBuilderMeasure, ReportBuilderDimension, ReportBuilderMembers, ReportBuilderMissing, ReportBuilderSection and ReportDraft. It has no other value exports, so it matches the Clause-②: line. The delta touches neither index.tsx nor any exported type. fillDefaults and reconcile are module-internal and are not published.
  • foldTableUnderChart is optional and off by default. The i18n keys (report.builder.*, including nameTaken, and report.computedValues) are the same in all 11 locales. Neither is touched by this delta.

② Semver level

  • Unchanged and correct. .changeset/36374-report-builder.md grades @object-ui/plugin-report, @object-ui/app-shell and @object-ui/i18n as patch under Metadata-protocol: none, which is none-clean in scripts/check-changeset-no-major.mjs judgeLevel. The delta changes no published export and no spec, so patch still holds. No breaking change, so no BREAKING banner or ADR-0087 disposition is owed.

③ Boundary flags

  • Round 2 should-fix (an authored yAxis outside values switched by an unrelated pick, or re-pointed on open): resolved.
    • reconcile now keeps prev.yAxis whenever it is a string. An empty string still falls through to values[0], because the expression is keptMeasure || values[0].
    • fillDefaults now seeds values from an authored chart.yAxis before it falls back to the dataset's count measure. So a report with a chart and no values opens on the measure its chart draws.
    • I traced every caller of reconcile in the model:
      • pickDataset deletes chart first, so prev is empty and the new dataset starts on its count measure, as before.
      • pickMeasure passes picked.measure, which overrides the kept measure, as intended.
      • pickGrouping keeps the measure and resets the axis (picked.grouping).
      • pickChartType keeps both.
      • fillDefaults keeps the authored measure and now also lists it in values.
    • Nothing else re-points yAxis. missingPiece reads selectedMeasure, which prefers chart.yAxis, so a chart-only report is not reported as missing a measure. That is consistent with the seed.
    • The spec does not require yAxis to be in values: ReportChartSchema.yAxis is any bound-dataset measure and ReportSchema.values is optional. The new tests run expectSpecValid on values: ['total_amount'] with yAxis: 'deal_count'.
    • The two new tests pin exactly the shapes round 2 named. One is values: ['total_amount'] with yAxis: 'deal_count', checked across pickChartType, pickGrouping and pickMeasure. The other is values absent, which fillDefaults seeds from yAxis. The two-value case, which can no longer reach the builder (opensInBuilder), was dropped from the test.
  • nit (new, small): with values absent, the builder's mount effect (fillDefaults) now writes values: [yAxis] on open. The report is then dirty with no edit, and a Save without changes writes that values key. The chart is unchanged, and the computed-values table now shows the charted measure. This is harmless and arguably intended, and it is noted only so the dirty flag on open is not a surprise.
  • nit (new, small): a chart-type round trip through 「表格」 (table) deletes chart. Coming back to a chart then charts values[0], so an authored yAxis that was not in values does not come back. While the report is in table mode the measure picker shows values[0], so what the person sees and what is charted stay in step. Nothing is switched silently.
  • nit (carried): in pickMeasure, when the shown measure (chart.yAxis) is not in values, indexOf is -1, Math.max(0, …) makes the index 0, and the authored values[0] is replaced rather than kept. That is a table value the person did not pick. Builder reports have at most one value, so the result is well-formed.
  • nit (carried): the check-then-write window in ReportNewPage.freeReportName. A same-name create published between the get and the draft-pinned write is not refused. Closing this fully needs a create-only server pin, which is outside this diff.
  • nit (carried): saveAndPublishRuntimeMetadata is outside SEAM_WRITES, so the report write sites are not counted by writeRefusalCensus-11583.test.ts. Both show a refusal toast.
  • Round 4 delta. It is a test-only change in ui/scripts/__tests__/. It raises no boundary flag and adds no id materialisation, join or SQL push-down concern.
  • No regression elsewhere. The Save path is unchanged ("save once, live at once" through saveAndPublishRuntimeMetadata, and nothing is written over any pending draft). foldTableUnderChart still defaults off. Dataset reports with columns, runtimeFilter or several values still keep the inspector panel. The new-report name check against the server is unchanged. No new id materialisation, no app-side join, and no SQL push-down concern.

Implemented-by: claude/project-thread-bkjint
Reviewed-by: session_01JQwxbZeHNsF3RWcWpj7rGj

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

维护者速读

系统管理员在报表页点「编辑」,或打开新建报表的地址,都进同一个整页的报表搭建页:左边是实时的图,右边五项(报表类型、数据来源、指标、分组、图表)。选完数据来源立刻出一个数字;缺什么,就在图的位置写一句,并自动打开那一项。点「保存」后马上对所有人生效。
没做的三项已拆到 #36645:筛选、显示数量为 0 的分组、和上一期对比。
独立复审四轮后通过,CI 全绿,2620 行,非受管面,席位落地。
要你做的:无。

席位核对 — ACCEPT (L1) · repo:objectstack#1 · head 087931d9 · 2026-11-23T08:17Z

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 23, 2026 08:18
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit 3cf6a44 Nov 23, 2026
59 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-bkjint branch November 23, 2026 08:40
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 23, 2026
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>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…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>
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/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants