Repository navigation
feat(app-shell): report and widget panels speak business wording, and opening the report editor keeps the page in the session language - #36420
Conversation
…ne-entry precedence
Claude-Session: https://claude.ai/code/session_01QsR2jUP9hxdL4RzdzTs9eK Co-authored-by: Claude <noreply@anthropic.com>
… label box (#36373) Claude-Session: https://claude.ai/code/session_01QsR2jUP9hxdL4RzdzTs9eK Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUP9hxdL4RzdzTs9eK Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUP9hxdL4RzdzTs9eK Co-authored-by: Claude <noreply@anthropic.com>
#36373) Claude-Session: https://claude.ai/code/session_01QsR2jUP9hxdL4RzdzTs9eK Co-authored-by: Claude <noreply@anthropic.com>
…moved tests (#36373) Claude-Session: https://claude.ai/code/session_01QsR2jUP9hxdL4RzdzTs9eK Co-authored-by: Claude <noreply@anthropic.com>
…t it holds (#36373) Claude-Session: https://claude.ai/code/session_01QsR2jUP9hxdL4RzdzTs9eK Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUP9hxdL4RzdzTs9eK Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
What this run could not see
Coarse fallback — 174 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 0f75ee51299f3727a09898836880f92b1430e2c9 && git checkout 0f75ee51299f3727a09898836880f92b1430e2c9
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 59392ed1d86612b25464ad7ce163ad5890bfda1b 85e6baf9be81ba6ed84c1798218df56d2bfc3acf && git checkout -B drift-repro 59392ed1d86612b25464ad7ce163ad5890bfda1b && git merge --no-ff 85e6baf9be81ba6ed84c1798218df56d2bfc3acf
node scripts/docs-audit/affected-docs.mjs --json 59392ed1d86612b25464ad7ce163ad5890bfda1b
|
…r the filter label (#36373) The column-identity ratchet refuses a new name/field dual read; the filter names an object field, which is the dimension's columnIdentity(). Claude-Session: https://claude.ai/code/session_01QsR2jUP9hxdL4RzdzTs9eK Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jSpi3g1dQNTvN6zEuH 席位核对L1 (L1-e) on head Owed
Checklist (passes)
|
#36373) Claude-Session: https://claude.ai/code/session_01QsR2jUP9hxdL4RzdzTs9eK Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract reviewServed-tier: Inputs read: card #36373 body and its five comments (two claims, triage, notification, os-dev-report 7078791835), PR #36420 body and its one comment, the net diff against ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
M1 (must-fix) — the new rule lets an inline entry beat a translation the paired S1 (should-fix) —
S2 (should-fix) — the file's contract sentence says the server lets the map's entry for the requested language beat the bundle. The resolver does so only when a packaged base is supplied. With no base (a report or dashboard no code package ships, such as a new item in the pair that has its own translation row), Nits, no effect on correctness or the contract:
Design held where I tried to break it: a missing locale answers false and the chain keeps its Implemented-by: VERDICT: FAIL |
…on still answers first (#36373) A report label/description or widget title whose inline map entry for the requested locale differs from the packaged base's now reads the pair's own translations (catalogFor changed), keeping ranks 1-2 of ruling record 6631250894; only the base's translation is skipped. The entry for a locale is picked the way the panel's writer picks it: exact tag, then the locale's own script where the language splits by script, else base or sibling region. Pins: pairBundle on report and widget, zh-TW over { default, zh }, zh-TW over { default, zh, zh-HK }, a bare-zh session over a stored zh-CN entry. Claude-Session: https://claude.ai/code/session_01QsR2jUP9hxdL4RzdzTs9eK Co-authored-by: Claude <noreply@anthropic.com>
…e, as in Studio (#36373) #36405 hosts DashboardWidgetInspector on the dashboard page. Wrap its edit panel in ServedWidgetTextContext, pairing the page's served dashboard with the stored document the edit opened, so the title box shows the session's language and an edit lands in that language's entry. Pinned through the real DashboardView (ablation: provider value null, the case goes red). Claude-Session: https://claude.ai/code/session_01QsR2jUP9hxdL4RzdzTs9eK Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jSpi3g1dQNTvN6zEuH 席位核对L1 (L1-e) delta on head Landing condition. "Findings from the run" items 1–3 are shipped defects the run found and left untouched, and none has a card: I searched, and no card exists for the report page's 403
Before landing, each needs a card (the seat may file one card or several) and its line in the body needs "carried by #N". Item 4 stays out, per the seat. Owed item 1 (live run): closed.
Owed item 2 (two sentences): closed.
The delta's code.
Gates at this head: 62 success, 11 expected skip, mergeable |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract reviewServed-tier: Delta review of Earlier findings:
① Derived judgmentsCarried forward from 7078881267, unchanged by this range: the accept set is unchanged (no schema file in the diff), the public surface of Re-derived on this head:
② Semver level
③ Boundary flags
④ Design judgment
S3 (should-fix): on a changed map slot, a pair translation for a locale other than the requested one outranks the map's own entry for the requested locale. Held where I tried to break the fix:
Nit: the selection now exists twice,
Implemented-by: VERDICT: PASS |
… only (#36373) On a report label/description or widget title changed through its inline entry, a pair translation for a fallback locale or a sibling region no longer outranks the map's own entry for the requested locale: slotRead hands the lookup the pair's translation for that locale only, with no fallback chain. A re-authored plain string still reads the pair along the chain. Pins: fallbackChain en on a report and a widget, a zh-TW pair over a zh-CN entry, and the plain-string control. Claude-Session: https://claude.ai/code/session_01QsR2jUP9hxdL4RzdzTs9eK Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jSpi3g1dQNTvN6zEuH 席位核对L1 (L1-e) delta on head Landing condition: met. Each run finding now names its carrier, and all the carriers are open:
The L2's S2 (an edit not served with no packaged base, or when the pair translates the slot) is carried by #36481. The delta is one commit,
Gates at this head: 62 success, 11 expected skip, mergeable |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract reviewServed-tier: Delta review of Earlier findings:
① Derived judgmentsCarried forward from 7079950960, unchanged by this range: the accept set (no schema file in the diff), the public surface of Re-derived on this head:
② Semver level
③ Boundary flags
④ Design judgment
S4 (should-fix): on a slot changed through its map entry, Held where I tried to break the fix:
Nit: the gate trims the locale and Nit carried: the entry selection exists twice (
Implemented-by: VERDICT: PASS |
…y spelling (#36373) slotRead now picks the pair key by the same-language steps only: the same tag (case aside), then a key naming the same platform-table tag (a zh-CN request reads a row under zh-Hans; ja-JP one under ja). It stops before the base-language and variant steps, so a zh-TW row still never answers zh-CN. The locale is trimmed as the gate trims it. Pins: zh-CN over zh-Hans, the zh-Hans mirror, ja-JP over ja; the zh-TW pin stays the control. Claude-Session: https://claude.ai/code/session_01QsR2jUP9hxdL4RzdzTs9eK Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jSpi3g1dQNTvN6zEuH 席位核对L1 (L1-e) delta on head
|
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract reviewServed-tier: Delta review of Earlier findings:
① Derived judgmentsCarried forward from 7080413623 and 7079950960, unchanged by this range: the accept set (no schema file in the diff), the public surface of Re-derived on this head:
② Semver level
③ Boundary flags
④ Design judgmentNo must-fix, no should-fix.
Held where I tried to break the fix:
N1 (nit): a request tag the table does not name ( N2 (nit): at the table step Carried from 7079950960: the entry selection exists twice (
Implemented-by: VERDICT: PASS |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Landing (seat 7, 2026-11-22T14:55Z): head |
…on, package switcher and Open app removed (objectstack-ai#36519) <!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9JpRoUZGqtwqMU5k7b4C58D)_ Fixes objectstack-ai#36501 Clause-②: no Metadata-protocol: none ## 维护者速读 - Studio 的设计人员会看到:左上角从「首页图标 + 应用切换」变成「‹ 返回应用 · 应用名 · Studio」,右上角的「打开应用」没有了,点返回会回到进 Studio 之前那一页。 - 为什么做:外壳专题(去掉顶栏和平台首页)第 12 项,按设计板图 47 让 Studio 的出口只剩一个、回到原来的应用。 - 出错会怎样:设计人员点返回可能到错页面或回到默认首页;改动只在界面层,直接撤回这次合并即可恢复原样。 - 要你做什么:这次改动行数超过三千行(大部分是删掉随切换器一起退场的旧测试),按规则需要你本人批准后才能合并。 ## What changes - `StudioBackToApp` (new) draws the top bar's left end: 「‹ Back to app」, the app's name, and the "Studio" mark. Where it goes, first match wins: 1. **Came from an app** — `ConsoleLayout` records the app page in view on every app route (`utils/appReturnPage.ts`, module memory, never browser storage); the link names that app and returns to that exact page, query and hash kept. 2. **Opened directly** (a Studio URL in a new tab, a reload — module memory starts empty) — the package's first **published** app, on its first screen (`/apps/PACKAGE` for a one-app package, `/apps/APPNAME` for the first of several, the same addressing the removed Open app used). 3. **No published app** (none, or a draft-only app, which has no running front-end) and the organization-flows scope — 「‹ Back to app」 with **no name**, to the console's default landing (`useHomePath()`: the declared default app, else the single app, else the launcher — the same policy `/` resolves). Leaving asks first when a pillar holds unsaved work (`confirmLeavePillar`, the header's existing guard). - Removed from the top bar: the Studio-home button, the package switcher (`PackageSwitcher` component), and the top-right Open app (`StudioOpenApp.tsx`, deleted). `PackageSwitcher.tsx` keeps only the three helpers other code still imports (`PACKAGE_LIST_TOAST_ID`, `STUDIO_LANDING_PATH`, `fetchInstalledPackageRow`); `offeredPackages` and `STUDIO_PKG_READONLY_WORD` had no other reader and went with it. - i18n (studio catalogue, en + zh): `engine.studio.backToApp` (Back to app / 返回应用), `engine.studio.backToAppTitle`, `engine.studio.backToAppTitleNoApp`, `engine.studio.mark`; the three Open app keys are removed; `engine.studio.app.willOpenAfterPublish` names 「Back to app」 instead of Open app. - Untouched: the pillar switcher, the rails, the right slot / AI panel, Changes and Publish. The report/widget publish region (objectstack-ai#36420's) is not touched. ## Tests - New `StudioDesignSurface.backToApp-36501.test.tsx` (real surface + real metadata client over a fetch stub): came-from-app names that app and returns to its page with the query; an app other than the package's own is the one named; opened directly names the published app and lands on its home; several apps → the first, by name; no app → no name, to the landing; draft-only app counts as none; the home icon, the switcher and Open app are absent; narrow-bar classes (the name truncates, the link and the mark do not); `studioBackTarget` order unit cases. - `pillarNavGuard`: the Studio-home guard case became 「Back to app」 — dirty → confirm, cancel keeps the matrix edit, confirm leaves; clean → no prompt. - New `fetchInstalledPackageRow-7881.test.ts`: the objectui#7881 / objectui#7938 wire cases, asserted at the helper the Studio landing's Manage still reads. - Updated (each asserted on a removed control): `homeLoop-12513`, `narrowHeader-12509`, `desktopHint-11795`, `entryReadsOnce-11797`, `noAppPackageLabel-12718`, `notFound-26708`, `readOnlyPosture-12453`, `kernelReadOnly-29567`, `packageLessFlows-11553`, `oneSurface-28572`, `autosaveSwitch-11232`, `packageListErrorPosture`; e2e live `studio-customize-journey` (read-only chip line) and `studio-object-designer` (F1, the switcher's create-package refresh, removed). - Deleted (their subject code is deleted): `openApp-34593` (its kernel-row list CONTROL moved into the new file), `narrowChip-12611`, `packageDeletionInference`, `manageSnapshotRefresh` (the switcher's own `onManageChanged`), `packageLookupFailure`, `packageUserMessage` (their wire cases moved to `fetchInstalledPackageRow-7881`). - `homeRecoveryRedirectsFollowDeclaration-7373`: the Studio site now reads `StudioBackToApp.tsx` (where the header's no-app landing reads `useHomePath()`); its behavioural pointer moves from the deleted `packageDeletionInference` to the new back-link test. - Six edited surface tests gained the module-top `import '@objectstack/lint'` that `check:test-source-alias` asks of an edited file reaching the surface. <details><summary>Local gate readings (derived by <code>dispatch-gates.mjs --commands</code>, HEAD a07beaa)</summary> 37 derived `check:*` / self-test commands ran outside the lock: 35 at EXIT=0; `check:test-source-alias` was red (EXIT=1, the six files above) and is green after the fix (`check-test-source-alias OK — ... the source reach judged 36 test file(s) changed since 9abc732`); `check:type-check-debt` exited 3 (its closure build waits on the shared verification lock and did not get it): NOT MEASURED locally, CI runs it. `check:nul-bytes` OK (27026 files, no raw control bytes). </details> - **NOT MEASURED locally: the vitest run of `views/studio-design/`, the 7373 scan, `layout/`, and the app-shell `type-check`.** The shared verification lock was held by a full dogfood battery for over 75 minutes, then by a ten-deep build queue; every acquisition this round timed out. The readings land in the `os-dev-report` comment on objectstack-ai#36501 if a later acquisition succeeds; CI's Test UI and type-check runs are the verdict otherwise. ## Acceptance notes - **Size**: +/- lines exceed 3,000 (mostly deletions of the switcher and its pins), so this lands the Tier H way (an authorized approval). - **Lost from the Studio top bar with the switcher** (all still reachable on the Studio landing, which the app sidebar's "Build with AI" opens): New package, Package info and settings, the organization flows entry, and the chip's read-only lock (the item header's read-only mark stays in every pillar) and package-list failure marker (the failure still toasts on the shared id). - Opened directly, the old Open app landed on the surface in focus (`?surface=`, e.g. that object's list); 「Back to app」 lands on the app's first screen, as the card asks. The `app-shell` README paragraph on the way back is rewritten to match. - The package name is no longer printed in the top bar; for a package with no app nothing names it there. - Now-unreferenced switcher catalogue keys (`engine.studio.pkg.switchTitle`, `pkg.heading`, `pkg.none`, `pkg.new`, `pkg.withPair`, `org.hint`, `pkg.manage`) are left in place for a dead-key sweep; `packageApp`'s `icon` / `branding` (read only by the removed chip) are left as well. - **NOT MEASURED: browser before/after screenshots and the 1280 / 1440 no-wrap reading** the card asks for — no browser run in this container this round (the shared verification lock was held by a full dogfood run). The no-wrap contract is pinned by class in the new test. ## Verification Read first: `StudioBackToApp.tsx` (`studioBackTarget`, the three-way order), `ConsoleLayout.tsx` (the one recording effect), the header block in `StudioDesignSurface.tsx`. Two-minute check: open an object's list in an app, enter Studio from it, click 「‹ Back to app」 — you land on the same list; reload Studio and click again — you land on the package app's first screen. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY <!-- signed: repo:objectstack#2 · os-steve · session_01ADHkmRY38EZf38Yy3zthbY --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…ard list, and a report's chart marks drill (objectstack-ai#36461) <!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} --> _Requested by **Steedos** · [project thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbD5gxSWeWGswbZYVzNvtqNM)_ Part of objectstack-ai#36256 Fixes objectstack-ai#36550 This PR lands the drill dialog. One piece stays open on the card, carried by objectstack-ai#36507: a labelled chip for a relationship-path condition (plugin-list `readViewConditions` / `viewChipText`, nested-relation form). Clause-②: yes (widening) — additive members only, among them the new `PageRegionPostureReset` export of `@object-ui/components`; nothing is removed or renamed Metadata-protocol: none ## 维护者速读 - 用户在仪表盘或报表上点一个数字(柱子、扇区、折线点、指标卡、汇总行),原来从右侧滑出一个整高抽屉,现在在页面中央弹出一个约七成宽、六成半高的窗口,背后不变暗,里面就是对象列表页那张标准列表。 - 为什么做:这是仪表盘下钻体验改进的那张卡,维护者已批准的八点要求——条件变成可改可删的筛选标签、默认只显示名称和分组、度量字段、点名称进完整记录页并能上下翻、窗口里的操作都不保存。 - 出错会怎样:最坏是下钻窗口里列出的记录或默认列不对、或记录页的翻页顺序不对;什么都不写入,关掉窗口即复原,回退本合并即回到旧抽屉。 - 要你做什么:无。 ## What changes - **Centred dialog (items 1, 7).** On a desktop, a dashboard or dataset-report drill now opens a non-modal Radix dialog sized `w-[70vw] h-[65vh]`, using the shared dialog surface (objectstack-ai#35980). Because it is non-modal, Radix draws no overlay: nothing behind it is dimmed or blurred. The header keeps the title and 「Open in list」, which is unchanged. On a phone (`useIsMobile`) the side drawer stays, with the same list inside. - **The body is the standard list (item 5).** The new `DrillRecordList` mounts the registry's `list-view` (the block the object list page uses) through `SchemaRenderer`, bound with `dataSource: { object }`. It is read-only: `userActions` turns off inline edit, add record, row colour and grouping; `showViewSwitcher={false}`; and the dialog never receives a save-view, add, bulk, edit, delete, sort-change or filter-change callback. When `list-view` is not registered, the drill falls back to the dashboard's data table, and its rows no longer open a stacked record panel. - **Conditions as the list's own chips (item 3).** The new `drillConditions.ts` splits the composed drill filter (widget filter, global filters, clicked bucket, measure scope) into the list's `initialFilters` rows, which are ordinary chips that can be edited and removed. Anything a chip row cannot say (a relationship path, `$or`, an unknown operator) stays the list's base `filter`, ANDed. A filter that is not the object form is lowered first. Examples are a page block's authored rule array `[{ field, operator, value }]` and an AST node. The lowering goes through the drill's own composition, `composeDrillFilter` in `@object-ui/core` (`mergeFilterNodes`, then the spec's `parseFilterAST`), and is not a new normaliser. A shape that cannot be lowered stays the list's base `filter` exactly as it arrived: one the conversion refuses (`FilterOperatorError`), and a non-empty one it answers nothing for (an array that is neither rules nor AST, a rule with a blank or missing field, a valid rule beside such an element). A string or number filter, which no list can read, lists nothing: the drawer shows its existing 「can't be listed from here」 notice and sends no read. No condition is ever dropped, and no drill reads every record. A condition stated twice is drawn once. On date fields, `$lt` and `$gt` are written as the list's own `before` and `after`, which lower to the same less-than and greater-than comparisons. - **Default columns (item 4).** The defaults are the object's name field, then the grouped fields, then the range fields, then the measured fields. A relationship-path dimension or range field (`crm_account.industry`) shows its lookup field (`crm_account`) instead. The grid has no dotted-column support, so the lookup column (the account's name) stands in for the related value. This applies to the dashboard widget and the dataset report alike. The measured fields are read from the answer's `drillScopes` (`{field: {$null: false}}`). An authored `drillDown.columns` still wins. 「View settings → Add column」 adds any other field. Added columns and column calculations live only in the dialog's state. - **Record name opens its full page (item 6).** `DrillNavigationContext` gains an optional `openRecord(objectName, id, {siblings, total})`. The app-shell hook implements it by navigating to the record page with history state `from = {pathname, label, siblings, total}`, the same shape a list hands the page it opens. The record page's existing stepper then reads 「1 of 3 · Pipeline Dashboard」, walks the drill rows, and its way back is the dashboard or report. `RecordDetailView` is unchanged. - **Report chart marks drill (item 2).** `DatasetReportChart` passed no `onChartClick`. A bar now maps through `findChartSeriesRow` to the summary line it stands for, and both go through one builder (`emitBucketDrill`), so the bar and its line open the same records with the same default `fields`. `drilldown: false` still offers no click. - **A host with no record page (page blocks).** The `object-metric` and `object-pivot` page blocks mount the drill without a `DrillNavigationProvider`, so there is no `openRecord`. There, a drilled row opens its record in a dialog (`RecordDetailDrawer`, `target: 'dialog'`), from both the standard list and the data-table fallback. Dashboard and report hosts are unchanged and open the record page. - The data-table fallback behaves exactly as on `main`. - The standard list reads only the fields it lists (`$select`). So its record dialog draws those fields, each with its value. It uses the authored `drillDown.columns` when given, as `ObjectDataTable` does. It does not list every field of the object with the unread ones shown as empty. - Values stay masked while the field types are unknown, through the drawer's `objectTypesPending` guard, as in the data table. - **Inside a page, the standard list too (objectstack-ai#36550).** React context crosses the dialog's portal, so a page block's drill list used to take the posture of the region holding the block. On a region half the page or wider that is the capped list: no toolbar, no chips, no pager, and a 「View all N」 link. That link went to the object's default list with no drill condition (L1-e measured it on HotCRM's 销售主页: 「查看全部 8 条」 landed on 10 open deals). `DrillRecordList` now clears the posture for its subtree with the new `PageRegionPostureReset` (`@object-ui/components`, next to `PageRegionPostureProvider`). The drill therefore draws the standard list everywhere, with its chips, record count and pager, and no 「View all」 link. The page's own list blocks keep their posture. - **Nothing is written (item 8).** No view, no preference and no record write comes from the dialog. Measured in the browser and pinned in a test (see below). - **Two `measuredFieldsOf` copies, on purpose.** One lives in plugin-dashboard `drillConditions.ts`, the other in plugin-report `DatasetReportRenderer.tsx`, and no shared helper was added to `@object-ui/core`. Their predicates differ. The dashboard copy reads a measure scope that is already one record list, and takes a field only when its whole condition is `{$null: false}`. The report copy reads the answer's `drillScopes` per line, and takes every `$null: false` field it finds. A scope that adds other conditions on the same field gets a column in the report but not in the dashboard. This is a known edge. - **New optional members:** `DrillNavigationValue.openRecord`, the `DrillRecordOrigin` type (`@object-ui/react`), `DrillDownDrawerProps.defaultColumns` and `DatasetDrillArgs.fields`. **New export:** `PageRegionPostureReset` (`@object-ui/components`, a `patch` entry (Metadata-protocol: none)). ## Tests <details><summary>Unit and integration runs (head 0290ee5)</summary> All runs below are under `scripts/pm/os-verify-lock.sh`, on head `0290ee50d3`. - Drill suites, run from `ui/` with `pnpm exec vitest run --maxWorkers=2`, covering: - plugin-dashboard: drillConditions, DrillDownDialog, DrillDownDrawer*, DatasetWidget* - plugin-report: all tests - app-shell: useOpenRecordList*, drillDialogStandardList-36256, ReportView*, DashboardView* Result: `Test Files 103 passed (103)` · `Tests 919 passed | 7 skipped (926)` · vitest exit 0. - `pnpm --dir ui exec vitest run scripts/` (derived): `Test Files 172 passed | 2 skipped (174)` · `Tests 5127 passed | 2 skipped (5129)` · exit 0. - Reverse check on the rebuilt `.d.ts`: a probe passed `{ siblings: ['a'], bogus: 1 }` to `openRecord`. `tsc` turned red with `TS2353 ... 'bogus' does not exist in type 'DrillRecordOrigin'` (exit 2). The probe was then removed, and `git status` is clean. </details> <details><summary>Type-check (built closure)</summary> - Built `@objectstack/spec` first, then `pnpm --filter '@object-ui/app-shell^...' run build`. Both exit 0. - `type-check` (the script name was echoed) exits 0 for each of `@object-ui/react`, `@object-ui/plugin-dashboard`, `@object-ui/plugin-report` and `@object-ui/app-shell`. Each runs `tsc --noEmit` and then `tsc -p tsconfig.test.json`. - Derived gates: `dispatch-gates --ran` reads `38 derived famil(ies) accounted for — 38 run, 0 NOT-MEASURED (a DERIVED zero)`. - `check-platform-checklist --changed-from origin/main`: OK. - `overlap-check`: `VERDICT clean exit 0`. The check covers objectstack-ai#36405 and objectstack-ai#36420, and both merge cleanly. </details> <details><summary>CI fix round (head bd8af5c)</summary> Four reds on 0290ee5 and f8140a7, each reproduced locally and then shown green: - **Type Check UI** was failing `check:spec-symbols`: the drill's chip-split file declared a local type named like a spec export (`Scalar`, owned by `@objectstack/spec/data`). The fix inlines the union. The check exits 1 on the old tree and 0 on the fix, measured with `@objectstack/spec` built. The other steps of the same job (`check:action-forward-parity`, `check:designer-field-key-parity`, `check:icon-record-names`, `check:i18n-keys`, `check:i18n-drift`) exit 0, and `type-check` exits 0 for `@object-ui/plugin-dashboard` and `@object-ui/app-shell` on the merged head. - **Lint UI:** `react-hooks/globals` flagged the drill dialog test's stub, which wrote a module-level variable during render. The stub now reports its props through a `vi.fn` spy. `eslint` on the old file gives 1 error. `lint` exits 0 (0 errors) for `@object-ui/plugin-dashboard`, `@object-ui/plugin-report`, `@object-ui/react` and `@object-ui/app-shell`. - **Test UI (10/16)** was failing `components/src/__tests__/dialogViewportGutterCensus-12603.test.ts`. The dialog lifted the width cap (`sm:max-w-none`), which the census reads as a wide dialog with no viewport gutter. It now caps at `max-w-[70vw]`, so the size is unchanged (70vw by 65vh) and the dialog keeps its own margin. The census fails 2 tests on the old tree; on the fix, the census plus the drill dialog suites read 4 files and 22 tests passed. - **Test UI aggregate on 0290ee5:** its seven shards were cancelled mid-run, when the next push started the concurrency group's new run. None of them failed. - **Build and E2E UI** failed in `check:eager-closure` before any spec ran: a superseded `PER_CHUNK_GZIP_CEILINGS` (main moved it, and nothing had grown). Merging `origin/main` (37367f3) clears it, as the gate prescribes. Readings on the new head: - The sibling drill suites (all of plugin-dashboard, plugin-charts and plugin-report; app-shell drill*, ReportView*, DashboardView* and useOpenRecordList*; console drillDownReport*; types drill-down*): 382 files and 4043 tests passed. - After the merge: 28 files and 230 tests passed. - `vitest run scripts/`: 172 files passed. - `dispatch-gates --ran`: 38 derived, 38 run, 0 NOT-MEASURED. - `overlap-check`: clean. </details> <details><summary>Round 7 (no dropped filter, standard list inside a page)</summary> **M6, a non-empty filter the conversion answered nothing for.** `composeDrillFilter` answers `undefined` without throwing for an array that is neither rules nor AST, a rule with a blank or missing field, and a valid rule beside such an element. `drillListConditions` read that as no filter, so the drill listed every record. Now a non-empty input (anything but `undefined`, `null`, `[]` or `{}`) whose conversion comes back empty is kept as the list's base filter, the same as the throwing path. - Measured with the real plugin-list over `ValueDataSource`: each such array reaches the read as `$filter` (a server refuses it as malformed), and the open deal is never listed. - A string or a number cannot be kept that way. The list's own `toFilterNode` reads a non-object as no filter, so the read went out with no `$filter` and listed 3 of 3 rows. `DrillDownDrawer` now shows its existing `unavailable` notice for such a filter and mounts no list, so no read is sent. This adds no new copy. **objectstack-ai#36550, the page region's posture inside the drill.** `DrillRecordList` wraps its subtree in the new `PageRegionPostureReset`. As L1-e found, the capped list's 「View all N」 link inside the drill came from the host's `compactListDestination`: the object's default view, with no drill condition. That link is no longer drawn there. **Pins, red on 942e9c2's `drillConditions.ts`, `DrillDownDrawer.tsx` and `DrillRecordList.tsx`, then green.** Red: `12 failed | 15 passed (27)`. Green: `27 passed (27)`. Restored with `git checkout HEAD --`, then checked: `git diff HEAD` empty and the blob hashes match. - `drillConditions-36256.test.ts`: six inputs the conversion answers nothing for (an array of a bare object, a blank field, no field, a valid rule beside a malformed one, a string, a number) stay the base filter as they arrived. `undefined`, `null`, `[]` and `{}` are still no filter. N8: an `and` node lowers to chips; an `or` node, and a rule array's any-of group, go to the base filter as `$or`. The N8 cases are green on both sides, because they pin behaviour that already held. - `app-shell/.../pageBlockDrillFilter-36256.test.tsx`: the three arrays above, each with every read carrying `$filter` and the open deal not listed. The string and the number show the `unavailable` notice and send no read. - `app-shell/.../pageBlockDrillPosture-36550.test.tsx`: the real page renderer, `object-metric` and `list-view`, with the region widths stubbed. The drill in the `main` region (856 of 1200 px) shows the chip `filter-chip-stage`, 「2 records」, no capped table and no 「View all」 link. CONTROL: the page's own `list-view` block in the same region stays capped (3 capped rows and 「View all 3」). Red: no chip in the dialog. **Live re-check on HotCRM 销售主页.** Branch Console at de4dfdf456 over HotCRM `origin/main` (689166c). The same local-only `drillDown` was added to `kpi_revenue_won`; it was not committed and was reverted afterwards. - The tile reads 1,290,000. The drill dialog draws the standard list: the toolbar, the chip 「阶段:成交」, the columns 商机名称 / 所属客户 / 金额 / 预计成交日期, 8 rows and 「8 条记录」. - No 「查看全部」 link and no capped table inside the dialog. The page's own list blocks stay capped (3 capped tables on the page). - The 8 rows are exactly HotCRM's 8 `closed_won` opportunities out of 23. - The read: `/api/v1/data/crm_opportunity?populate=crm_account&top=25&select=id,name,crm_account,amount,close_date,stage&filter=["stage","=","closed_won"]`. - Shot: project files `repo-objectstack-7/card-36256/hotcrm-r7-sales-home-drill.png`. **Runs on de4dfdf456.** That tree was pushed as 8e8c3bf, which differs only in a reworded trailer. a9d781d then changes only the changeset's `@object-ui/components` grade from `minor` to `patch`, as the `Check Changeset` level axis requires under `Metadata-protocol: none` (run offline with this body as the event: exit 0). plugin-dashboard + plugin-report: 251 files, 2425 passed / 13 skipped. components: 505 files (1 skipped), 4914 passed / 24 skipped. app-shell drill and page-block suites plus plugin-list's three posture pins: 15 files, 168 passed. type-check exit 0 for components, plugin-dashboard, plugin-report and app-shell. lint 0 errors for components, plugin-dashboard and app-shell. `overlap-check`: `VERDICT clean exit 0`, with 0 open PR heads sharing a file, the components index included. </details> <details><summary>Round 6 (page-block drill filter)</summary> **The defect.** Found live by L1-e, on HotCRM's 销售主页 tile 总收入(全部期间). - The tile is an `object-metric` block whose `filter` is the spec's rule array, `[{ field: 'stage', operator: 'equals', value: 'closed_won' }]`. - The drill list split only an object-form filter, so it received neither chips nor a base filter. It listed all 23 opportunities where the tile counts 8. - **Main kept the filter.** On main the drill went to the data table, which handed the array to `$filter` as written. The adapter lowers it. - Measured on origin/main a3ee862 with the same object-metric fixture over an in-memory matcher. The read's `$filter` was `[{"field":"stage","operator":"equals","value":"closed_won"}]`, and the rows were the 2 won deals only. - So this PR introduced the regression, and round 6 fixes it. **Pins, each run red on b91ec49's `drillConditions.ts` and `DrillRecordList.tsx`, then green.** Red: `4 failed | 7 passed (11)`. Green: 11/11. - `plugin-dashboard/__tests__/pageBlockDrillFilter-36256.test.tsx`: - An `object-metric` block with the HotCRM rule array: the drill list gets the chip `stage equals closed_won`. Red: `expected { chips: [], base: undefined }`. - An `object-pivot` block with the same rule array: the drill list gets the block's condition and the clicked cell's. This one is green on both sides, because the pivot composes through `composeDrillFilter` before the drill. - `app-shell/src/views/pageBlockDrillFilter-36256.test.tsx`: the real `@object-ui/plugin-list` over `ValueDataSource`. The drill lists exactly the won records the tile sums, never the open one, and its read's `$filter` carries `closed_won`. Red: the open deal was listed. - `drillConditions-36256.test.ts`: - A rule array lowers to a chip, and so does an AST node. - A shape the spec refuses (`[['stage', 'in', 'won']]`) stays the base filter exactly as it arrived. **Live re-check on HotCRM.** Branch Console, HotCRM `origin/main` on 18.6.0. A local-only `drillDown` (`{ enabled: true, target: 'dialog', columns: ['name','crm_account','amount','close_date'] }`) was added to `kpi_revenue_won`; it was not committed and was reverted afterwards. - The tile reads 1,290,000, and the drill lists 8 rows. - Those rows are exactly HotCRM's 8 `closed_won` opportunities (out of 23), each with stage `closed_won`. - The read: `/api/v1/data/crm_opportunity?populate=crm_account&top=25&select=id,name,crm_account,amount,close_date,stage&filter=["stage","=","closed_won"]`. - Shot: project files `repo-objectstack-7/card-36256/hotcrm-r6-sales-home-drill.png`. </details> <details><summary>Round 5 (S3, S4, N4; head b91ec49)</summary> All runs are under `scripts/pm/os-verify-lock.sh`, from `ui/` with `pnpm exec vitest run --maxWorkers=2`. - **S3 pin** (`ObjectMetricWidget.drillOpensRecord-36256`, a new case). The list stub answers with the record projected to its listed columns, the way the list's `$select` read does. The object has 5 fields, and the drill lists 3. - Red: `DrillRecordList.tsx` at c59a3fc gives `1 failed | 2 passed (3)`, with `expected [ 'Name', 'Stage', 'Amount', …(2) ] to deeply equal [ 'Name', 'Stage', 'Amount' ]`. - Green: restored with `git checkout HEAD --` and `git diff HEAD` empty, giving 3/3. - **S4.** - The `openRecord` jsdoc now reads "Absent ⇒ the drill opens the record in a dialog." - DELIBERATE CORRECTION of `.changeset/36256-drill-dialog-standard-list.md`. Its last sentence now reads: "A renderer without `@object-ui/plugin-list` registered lists the drilled records in the dashboard's data table. A host that gives no `openRecord` (a page block's metric or pivot) opens the drilled record in a dialog, from either body." - **N4.** `range.field` takes its first segment in both `DatasetWidget` and `emitBucketDrill`. Other readings on b91ec49: - plugin-dashboard + plugin-report in full: `Test Files 250 passed (250)` · `Tests 2411 passed | 13 skipped (2424)` · exit 0. - `type-check` exits 0 for plugin-dashboard, plugin-report and react, after the closure build. `lint` gives 0 errors for all three. - `vitest run scripts/`: 172 files passed. - `dispatch-gates --ran`: 38 derived, 38 run, 0 NOT-MEASURED. - `overlap-check`: clean. </details> <details><summary>Round 4 (head 5af2f6e)</summary> All runs are under `scripts/pm/os-verify-lock.sh`, from `ui/` with `pnpm exec vitest run --maxWorkers=2`. - Red, then green, with the round-4 source reverted to the round-3 head (0a48051) and then restored (byte-compared with `cmp`, and the marker `grep -c` read 0 then 1): - The path-column pins: red 2 failed / 2 passed (4), green 4/4. Covers `DatasetWidget` and `DatasetReportRenderer.chartMarkDrill-36256`. - The S1, S2 and N2 pins: red 3 failed / 9 passed (12), green 12/12. - The red reasons: `expected [ 'amount' ] to deeply equal [ 'crm_account', 'amount' ]`, and `Unable to find [data-testid="record-detail-body"]` (twice). - The N2 phone pin, by mutation through `scripts/ablation-replace.mjs` (`&& !phone` removed): `1 failed | 6 passed (7)`. The restore was verified as blob equal to HEAD with an empty `git diff HEAD`. - The full plugin-dashboard + plugin-report run: `Test Files 250 passed (250)` · `Tests 2410 passed | 13 skipped (2423)` · exit 0. - The app-shell drill suites (9 files): 132/132. - `type-check` (the script name was echoed, and it chains `tsc -p tsconfig.test.json`) exits 0 for `@object-ui/plugin-dashboard` and `@object-ui/plugin-report`, after building the `^...` closure. - `lint` exits 0 for both, with 0 errors. </details> New card-named tests: - `plugin-dashboard/src/__tests__/drillConditions-36256.test.ts`: chip rows versus the base filter, de-duplication, date bound wording, and measured fields. - `plugin-dashboard/src/__tests__/DrillDownDialog-36256.test.tsx`: - The dialog is centred and sized, with no overlay. - The list schema is read-only. - The chips, the default columns, and that added columns and calculations stay in local state. - The record name calls `openRecord` with the shown rows and closes the drill. - Phone keeps the drawer: `useIsMobile` is mocked true, and a mutation of the phone branch turns it red. Without `list-view` registered, no panel is stacked. - `app-shell/src/views/drillDialogStandardList-36256.test.tsx`: the real `@object-ui/plugin-list`. The chips are removable, and a removal re-reads without the condition. There are zero `create/update/delete/bulk` calls, no non-GET fetch and no `localStorage.setItem`. Columns lead with Name, then the drilled fields. - `app-shell/src/views/useOpenRecordList.drillRecordPage-36256.test.tsx`: `openRecord` drives `useRecordPageReturn`, giving the stepper 2 of 3, next to 3 of 3, and back to the dashboard URL including its query. - `plugin-report/src/__tests__/DatasetReportRenderer.chartMarkDrill-36256.test.tsx`: a bar and its summary line emit the same `objectFilter` and `fields`. `drilldown: false` offers no click. A `crm_account.industry` line drills on the nested condition with fields `['crm_account', 'amount']`. - `plugin-dashboard/src/__tests__/DatasetWidget.drillDialog-36256.test.tsx`: `DatasetWidget` itself opens the dialog (`target="dialog"`, `open`), with these default columns: - A chart mark (`onSegmentClick`): the grouped field, then the range field, then `measuredFieldsOf(scope)`, which gives `['stage', 'close_date', 'amount']`. - A metric tile: `measuredFieldsOf(readMeasureDrillScope(...))`, which gives `['amount']`. - A `crm_account.industry` slice: `['crm_account', 'amount']`. - `plugin-dashboard/src/__tests__/ObjectMetricWidget.drillOpensRecord-36256.test.tsx`: an `object-metric` block with no provider opens the drilled record in a dialog, from the standard list and from the data-table fallback. Changed tests: - `DrillDownDrawer.chain.test.tsx` is split by host: with a record page, the fallback rows are inert; with no record page, they stay drill-to-record. - `summarySubtotals-27975` now expects `fields: ['owner_id']` on the subtotal drill. ## Acceptance notes **HotCRM walk (round 4).** Branch Console at 5af2f6e's source, against HotCRM booted from the published 18.6.0 packages. Desktop at 1440×1000, zh-CN. The executive dashboard (高管总览) and the 各阶段商机 report. - **行业收入分布, slice 科技.** The dialog opens with 3 records. The columns are 商机名称, 所属客户 and 金额, so the lookup column stands in for the industry. The industry condition is a locked chip reading 「所属客户:= [object Object]」. That is the remainder carried by objectstack-ai#36507. It does not read "View filter".  - **收入趋势, month 2026年8月.** 1 record. The chips are the 12-month window plus the bucket: 预计成交日期 ≥ 2026-08-01 and 早于 2026-09-01. The columns are 商机名称, 预计成交日期 and 金额. - **年度累计收入 tile (1,290,000).** 8 records. The chips are 阶段:成交, the date bounds and 金额. The columns are 商机名称 and 金额. - **各阶段商机 report.** The 谈判 bar and its summary cell 1,294,000 open the same 2 records, with identical names in the same order: Wayne Enterprise License and Vertex Enterprise Rollout. The chips and the columns (商机名称, 阶段, 金额) are the same for both. - **Global filter.** - Set to 上季度, the only date-bound widget (阶段管道分布) is empty in HotCRM's data. Its query asks for close_date 2026-07-01..2026-09-30 and returns `[]`, so there is no mark to drill.  - The count match therefore uses 今年 instead, the nearest range that has data. The 需求分析 bar reads 93,000 in the chart's answer. The dialog carries the date condition as chips (预计成交日期 ≥ 2026-01-01 and ≤ 2026-12-31) and lists 1 record, whose amount sums to 93,000.  - **Record name.** Clicking Wayne Enterprise License opens its record page, reading 「第 1 条,共 2 条 · 各阶段商机」.  - More shots: [month](https://raw.githubusercontent.com/objectstack-ai/objectstack/5290b53bed7b42c0dbbd1a3c1dc23b4a36d4c512/hotcrm-revenue-month.png) · [YTD tile](https://raw.githubusercontent.com/objectstack-ai/objectstack/5290b53bed7b42c0dbbd1a3c1dc23b4a36d4c512/hotcrm-ytd-tile.png) · [report bar](https://raw.githubusercontent.com/objectstack-ai/objectstack/5290b53bed7b42c0dbbd1a3c1dc23b4a36d4c512/hotcrm-stage-bar.png) · [report cell](https://raw.githubusercontent.com/objectstack-ai/objectstack/5290b53bed7b42c0dbbd1a3c1dc23b4a36d4c512/hotcrm-stage-cell.png). The images live on the `claude/issue-36256-shots` branch, which holds no code. - **Writes:** none from the dialog. The only non-GET requests were `PATCH sys_user_preference` (the dashboard's recent-visit entry) and the record page's own `POST .../page` read. Browser walk on `examples/app-crm` (Pipeline dashboard), desktop at 1440×900. The screenshots are in the project files under `repo-objectstack-7/card-36256/`: - `1-bar-dialog.png`: the bar 「Closed Won」. The dialog box measured 1008×585 px, which is exactly 70% × 65%. The overlay count is 0. Chips: Expected Close ≥ / ≤ (from the widget), Stage: Closed Won, Expected Close before 2027-01-01. Columns: Opportunity Name, Stage, Expected Close. 3 records. - `2-donut-dialog.png`: the donut slice 「Prospecting」. Chips: Stage is none of Closed Won, Closed Lost; Deal Value is_not_null; Stage: Prospecting. Columns: Name, Stage, Deal Value. - `3-line-dialog.png`: a line point 「2026-10」. Chips: the 12-month window plus the month bucket. - `4-kpi-dialog.png`: the tile 「Won This Quarter」. Columns: Name, Deal Value. - `5-chip-removed.png`: Stage: Closed Won removed. The list re-read and showed 6 records. Closing and reopening restores the original chips. - `6-added-column.png`: View settings → Add column → Deal Value is added as a 4th column. - `7-record-page-1-of-3.png` and `8-record-page-2-of-3.png`: clicking a record name opens its full page reading 「1 of 3 · Pipeline Dashboard」, with no dialog left open. Next goes to 「2 of 3」. 「Pipeline Dashboard」 returns to the dashboard URL. - `9-phone-drawer.png`: at 390 px wide the drawer keeps the phone list, with a filter badge of 5 and 3 records. - **Writes:** - During the open, sort, add-column, chip-removal and close/reopen phases, zero non-GET `/api/` requests were captured, apart from the dataset reads. - The single `PATCH sys_user_preference` seen was the dashboard's own recent-visit entry (`type: dashboard`), fired on page load. A second one came from the record page's recent-visit entry. Neither comes from the dialog. - **Known edges, each with its carrier:** - Raw operator ids on chips. HotCRM measured 「金额:is_not_null」 on every drill whose measure scope is `$null: false`, and 「阶段:not_equals 失败」 on the report drill (from `$ne`). The cause is plugin-list `quickOperatorLabel`, which has no words for `not_equals`, `greater_than`, `less_than`, `is_null` or `is_not_null` and prints the stored id. The drill does not swap in a near-synonym. Carrier: objectstack-ai#36462. - A string or number drill filter lists nothing, with the drawer's existing `unavailable` notice and no read (a deviation from the round-7 recipe, accepted by the seat): no list can carry such a filter, and the list's own `toFilterNode` would read it as no filter and list every record. - The relationship-path chip. A slice grouped by `crm_account.industry` lists the right records, but its locked chip reads 「所属客户:= [object Object]」 (see the industry shot above). Carrier: objectstack-ai#36507. - Other conditions a chip row cannot say also stay in the locked base filter, worded by the list. Measured with the real plugin-list: an `$or` reads 「View filter」, while an operator the rows have no id for (`$startsWith`) reads 「Owner: startswith A」. - A long chip row is cut at the dialog's right edge; the list's own chip bar decides this. - The line bucket title shows the raw key (「2026-10」), as before. - The drill's matched total does not reach the record page (found in round 7). Carrier: objectstack-ai#36554. `ListViewBlock` hands `ListView` its own `onTotalChange={reportTabCount}` after spreading the props, so the drill's `onTotalChange` is replaced (by `undefined` outside a `page:tabs` panel). Measured with the real list over a source answering `total: 40` for 2 rows: `openRecord` received `{ siblings: ['d1','d2'] }` and no `total`. So the stepper's M is the rows on screen, not the match count, once a drill holds more rows than one page. A fix needs a plugin-list edit, which is outside this PR. By the same code read, not measured: a drill opened from inside a `page:tabs` panel would report its count to that tab's badge. - **Dataset-report chart mark:** app-crm ships no dataset report, so it was not walked there. It is now walked on HotCRM's 各阶段商机 report (above), and it is also covered by the plugin-report test. - Desktop and phone viewports were measured. Tablet was not. - **Deviations:** - `ui/packages/react/src/context/DrillNavigationContext.tsx` (the optional `openRecord` member) is outside the declared file surface. - The claim was amended to `Clause-②: yes (widening)` on the built `.d.ts` closure reading (the four new optional members above); the declaration line above and the changeset follow it. - `pnpm dev:crm` refused on `check-dev-prereqs` (missing dists), so the walk ran `objectstack dev` directly in `examples/app-crm`. - The inline HotCRM shots are served from a separate code-free branch, `claude/issue-36256-shots`. It holds one orphan commit with 8 PNGs and went up in the same `git push` as this branch. GitHub has no other host for an agent-written body's images. ## Verification Read first: 1. `ui/packages/plugin-dashboard/src/drillConditions.ts`: the filter-to-chip split. If a condition is dropped or mis-worded, the list shows the wrong records. 2. `ui/packages/plugin-dashboard/src/DrillRecordList.tsx`: the read-only schema and the `openRecord` set. 3. `ui/packages/plugin-report/src/DatasetReportRenderer.tsx`: `emitBucketDrill`, now shared by the summary line and the chart mark. Two-minute check: run `pnpm dev:crm`, open Analytics → Pipeline and click the 「Closed Won」 bar. Expect a centred dialog with nothing dimmed behind it, the Stage: Closed Won chip, and 3 records. Click 「Initech — Pilot」 and expect the record page to read 「1 of 3 · Pipeline Dashboard」. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01QsR2jREBdDtYvSLn38xUCg <!-- signed: repo:objectstack#7 · zhuangjianguo · session_01QsR2jREBdDtYvSLn38xUCg --> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: objectstack-fleet[bot] <332303061+objectstack-fleet[bot]@users.noreply.github.com>
Requested by Steedos · project thread
repo:objectstack#7 · zhuangjianguo · session_01QsR2jUP9hxdL4RzdzTs9eK
Fixes #36373
Clause-②: yes (widening) — the report and widget panels accept an edit of a translated name or title in the session's language, stored as the inline locale map
{ default: SOURCE, LANG: EDIT }thatI18nLabelalready allows; for an item with a packaged base the server no longer lets the base's translation replace that entry on reportlabel/descriptionand widgettitle. Nothing is removed or renamed.Metadata-protocol: semantic —
translateReportandtranslateDashboardnow treat a reportlabel/descriptionor a widgettitleas changed when its inline locale-map entry for the requested locale (the entry the panel writes: exact tag, then the locale's own script, else base tag or a sibling region; neverdefault) differs from the packaged base's own, so the base's translation no longer replaces it; a translation the paired.custompackage ships still answers first (ruling record 6631250894), and with none the entry is served; dataset members (translateDataset, ADR-0149) are unchangedSkills-docs: none — no
skills/file names these panels, their wording or the report/widget label precedence (git grepoverskills/fortranslateReport,translateDashboard,inline locale map,ReportDefaultInspector,DashboardWidgetInspector: 0 hits).维护者速读
{ default: 原文, zh-CN: 新文字 });对已安装应用的报表/仪表盘,服务端不再用应用包的翻译盖掉这一条(定制包自己带的翻译仍然优先)。另修:打开编辑面板时页面标题和副标题不再变成英文。total_amount、bar、「维度」「度量」「受治理…RLS」,页面标题一开编辑就变英文。i18n-resolver.ts改了报表名称/描述和卡片标题的取值顺序(只在有打包基线、且内联条目与基线不同的时候才生效;三仓源码普查 0 个内联 map;部署里已存的定制行若带这种 map,该语言会改读定制自己的文字);数据集成员不变。回滚即 revert 本 PR。servedLabel.ts(显示与写回规则)、i18n-resolver.ts的slotRead/inlineEntryFor、ReportView.tsx的previewWithServedText,以及 PR 里的前后截图说明。What changes
Wording and names (both panels).
ReportDefaultInspector(runtime 「编辑」 and Studio) andDashboardWidgetInspector(Studio's widget property bar, which #36372 reuses at runtime):datasetLabelOptions); the machine name is the option'stitle. No(name), no description.title(nameOnHoveronFieldListRow,AddFieldPopoverandInspectorComboField). A measure readsLABEL · AGGREGATE, the aggregate in words from the newengine.inspector.report.aggregate.*keys (「金额 · 合计」, "Amount · Sum").studio/{en,zh}.ts): 数据来源 / Data source, 分组 / Group by, 指标 / Metrics, 列分组 / Group columns by, 横轴(分组)/ 纵轴(指标), 不显示图表(只看表格); the widget's section heading is 数据 / Data; the filter section is 跟着页面顶部的筛选变 / Follows the filters at the top of the page; the data-source hint is one plain sentence (no 受治理 or RLS), on the report panel too (report-dataset-hint).InspectorSelectFieldoptions take anicon).columnIdentity()) it filters; the empty field face reads 默认(LABEL) or 默认字段.metadata-form-zh-cn.ts, the zh-CN overlay this console renders the bundled report form with) use the same words; those leaves are marked ⟨36373⟩.Current-language name and title.
servedLabel.ts: the name box (report) and title box (widget) show the served translation while the buffer still equals the published value it was translated from; an edit writes the session language's entry only (writtenLabel). The report's served text reaches the panel through the newServedReportTextContext, provided byReportView(paired at editor open) andStudioDesignSurface; the widget's through the existingServedWidgetTextContext, now also wrapped around Studio's selection inspector and, after #36405, around the dashboard page's edit panel (DashboardEditPanelpairs the page's served dashboard with the stored document the edit opened;useDashboardInPageEditkeeps that opened document aspublished).Heading fix.
ReportViewdrew the authored edit buffer (objectstack#35008) as the page, so opening the editor turned 「各阶段商机」 into "Opportunities by Stage".previewWithServedTextnow draws the served value of every translated key (title,label,description,blocks) the edit has not changed.Server precedence (spec).
packages/spec/src/system/i18n-resolver.ts:valueOverridesPackagedBase(a re-authored string, as before) andinlineEntryOverridesPackagedBase(an inline map whose entry for the requested locale differs from the base's) decide whatslotReadhands the lookup.translateReport(label, description) andtranslateDashboard(widget title) read throughslotRead: a re-authored string reads the pair's translations along the locale chain, as before (catalogFor(catalogs, true)); a slot changed through its map entry reads the pair's translation for the requested language only (the same tag, case aside, or another spelling of the same platform-table tag: azh-CNrequest reads a row underzh-Hans,ja-JPone underja; no fallback chain, no base-language or regional-variant step), so rank 1 of ruling record 6631250894 (the paired.custompackage's translation) still answers first for that locale, the base's translation never, and with no pair answer for that locale the map is served and the reader picks its entry (L2 7079950960 S3 and 7080413623 S4, seat ruling: way 1, the requested language).inlineEntryForpicks the entry the panel's writer (localeWriteKey) replaces: exact tag, then, where the platform table splits the language by script, only an entry of the locale's own script (bare base, then sibling), else the bare base, then the first sibling. ⛔ neverdefault. The jsdoc oflabelCatalogs,translateReportandtranslateDashboardnames the rule;inlineEntryOverridesPackagedBasesays why it is a separate twin ofvalueOverridesPackagedBase(the exportedscalarOverridesPackagedBaseand the object fold stay string-only).Docs:
content/docs/protocol/kernel/i18n-standard.mdx(the precedence),content/docs/ui/reports.mdx(new "Editing a report beside it"),content/docs/ui/dashboards.mdx(filter bindings wording).Tests
packages/spec/src/system/i18n-report.test.tsdescribe (14 cases): zh entry served; the endefaultbyte-identical; ja still reads its bundle text (ステージ別商談); a base-tagzhentry answerszh-CN; control, a map equal to the base's map reads the bundle; control, no base reads the bundle (the panel gap below); the widget title follows the same rule; scope control, a dataset member's map still loses to the bundle (ADR-0149). L2 rework: withpairBundle, the pair's translation answers ahead of the zh entry on a report label and on a widget title, and a pair with no entry for the slot leaves the map (the base's translation never answers); azh-TWrequest over{ default, zh }reads its Traditional bundle text; azh-TWrequest over{ default, zh, zh-HK }gates on thezh-HKentryresolveI18nLabelshows; a bare-zhsession reads thezh-CNentry its own edit replaced. L2 S3: a pair translation forendown afallbackChaindoes not outrank thezh-CNentry (report and widget title), azh-TWpair does not answer azh-CNrequest over thezh-CNentry, and a re-authored plain string still reads the pair along the chain (control). L2 S4: azh-CNrequest reads a pair row stored underzh-Hans, thezh-Hansmirror overzh-CN, andja-JPoverja; thezh-TWpin stays the control. 19 cases in the describe.servedLabel.test.ts(11 cases): show/write rules, the{ default, zh-CN }write with the source byte-identical, a map keeps every other language, clears, a second edit.panelBusinessWording-36373.test.tsx(8 cases), on the HotCRMopportunity_metricsshape: the zh panel reads 数据来源 商机指标, 金额 · 合计, 平均赢单概率 · 平均, 分组 阶段, 柱状图 and the served 各阶段商机; a sweep of both panels' visible text finds none oftotal_amount,avg_probability,account_industry,opportunity_metrics,stage,bar,RLS, 维度, 度量, 受治理 (and on the widgetdateRange,owner_id,lead_source); machine names are present astitle; the chart-type options are Chinese names, each with ansvg; en reads English labels with no machine name; an edit of the served name sends{ default: SOURCE, 'zh-CN': EDIT }. The sweep caught the residual report form rows still saying 维度/度量, fixed here.ReportView.headingStaysServed-36373.test.tsx(3 cases) on the realReportViewandReportConfigPanel: heading and subtitle stay served with the editor open; an edited key shows the edit; the panel receives the served/authored pair.DashboardView.inPageEdit-36372.test.tsx: new case, through the realDashboardView: the card panel on the dashboard page reads the served title beside the stored one (Total (served) ← Total (stored)); ablation (provider valuenull) → that case red, 10 others green.ReportDefaultInspector.test.tsx,DashboardWidgetInspector.test.tsx,datasetPickers.authorText-11161.test.tsx(restated for 仪表盘和报表的编辑面板换成业务用词:字段显示标签不显示内部名,「维度」「度量」改成「分组」「指标」,图表类型用中文,标题不变成英文 #36373),InterfacesPillar.componentListServedTitles-12688.test.tsx(the Title box now reads the served title),InterfacesPillar.heldWidget-11910.test.tsx,InterfacesPillar.reportHeld-27785.test.tsx,StudioDesignSurface.heldWidgetPublish-11910.test.tsx.scripts/ablation-replace.mjs, restored blob == HEAD each time): precedence reverted (return false) → 3 of 24 spec cases red (zh entry, base tag, widget title);previewWithServedTextreplaced by the raw buffer → 2 of 3 heading cases red (the context case is a separate seam). L2 rework:i18n-resolver.tsswapped back toe2d307a1's → 4 of 30 red (pair on report, pair on widget, zh-TW over{ default, zh }, bare zh overzh-CN); restored, 30/30. S3:i18n-resolver.tsswapped back to0df531f9's → 3 of 34 red (fallback chain on report and widget,zh-TWvariant); restored, 34/34. S4:i18n-resolver.tsswapped back to8ad569b7's → the S4 case red; restored, 35/35.Acceptance notes
{ default: SOURCE, LANG: EDIT }. Pinned: after a zh edit the Englishdefaultis byte-identical; a third locale (ja) still reads its bundle translation; the precedence between bundle and inline map is named and pinned (below).label/descriptionand widgettitle, on an item with a packaged base whose inline entry for the requested locale differs from the base's: 1. a translation the paired.custompackage ships; 2. the entry; never the base's translation (ruling record 6631250894's order, kept). A map equal to the package's own map changes nothing (control pin); an item with no packaged base reads the bundle as before (control pin).{ default: SOURCE, LANG: EDIT }, the server still serves the bundle where it has an entry for that language, and the box shows that translation again after save, with no message. The same holds for an override once the pair carries a translation for that locale.servedLabel.tsnow states this. Carried by 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 (write the translation row, or say so in the panel).translateDatasetis untouched, and a pin shows a dataset member's inline map still loses to the bundle.check-prior-rulingsover the precedence terms: 0 hits;docs/adrhas no other ruling on report/widget label precedence.label/descriptionand widgettitle: objectstack67132dd7(2 report files, 6 dashboard files) 0; hotcrm689166c(5, 7) 0; gallery782d801(1, 1) 0. The only map in those files is a dashboardglobalFilterslabel in hotcrmactivity.dashboard.ts, not a covered prop. No packaged source changes reading; the census cannot see override rows stored in a deployment, where a row carrying such a map now reads its own entry in that locale (the change the semantic line names).LABEL (name)and objectui#12303's trailing machine name. Other dataset pickers (the spec-formref:datasetwidget, view and page pickers) are unchanged.descriptionfield (it stays in the form rows below and edits the authored text); Studio's dataset designer. The en form rows below the curated fields still read the spec's English (Dataset binding, "Values are the dataset’s measures…"): the console deliberately carries noenoverlay, and rewording the spec form ripples into ten generated locale bundles — a follow-up if wanted. The platform's own zh-CNmetadata-formsbundle (the generic server-rendered form) keeps 数据集/维度/度量 for the same reason.Live run (L1-e REWORK)
At head
c6ab9f25, a fresh local backend (objectstack dev --seed-admin, file DB, the worktree's CLI and freshly built@objectstack/spec) ran HotCRM689166c(a scratch copy withinitialStatesadded to its twelve state-machine validations, because the current author-time rules refuse the copy without them; no HotCRM file changed). The console ran from this branch's sources (ui/apps/consoleVite against it), driven by Playwright as the seeded admin in azh-CNand anen-USbrowser.total_amount,avg_probability,opportunity_metrics,stage(en: as a word),bar,RLS, 维度, 度量, 受治理. Machine names are ontitleonly:total_amount,avg_probability,stage./studio/app.objectstack.hotcrm/interfaces?surface=report:opportunities_by_stage: the same words, name box 各阶段商机, sweep clean (zh and en).sales_dashboard) → 阶段管道分布: 数据 · 数据来源 商机指标, 卡片从这里取数…, 分组 阶段, 指标 总金额 · 合计, 跟着页面顶部的筛选变 with 时间 「默认(预计成交日)」, 销售代表 「默认(负责人)」, 商机类型; title box 阶段管道分布. en: Data source "Opportunity Metrics", "Total Amount · Sum", "Follows the filters at the top of the page", Date / Sales Rep / Deal Type. Sweep clean (alsoowner_id,close_date,dateRange).my_deal_figures(label 我的成交数据, dimension 销售阶段(自建), measure 合同额) and a reportmy_deal_report(我的成交报表) created over REST inapp.objectstack.hotcrm.custom, no bundle entries. zh-CN panel: 数据来源 我的成交数据, 指标 合同额 · 合计, 分组 销售阶段(自建); en-US: the same author text with "· Sum". Machine namescontract_value,phaseontitleonly.PUT /api/v1/meta/report/opportunities_by_stage?mode=draft→ 403 NOT_OVERRIDABLE ("ships in 'app.objectstack.hotcrm': save it into 'app.objectstack.hotcrm.custom'"); the panel stays open and dirty, as objectui#11583 has it (finding below). So the round trip ran through Studio's 定制:POST /packages/app.objectstack.hotcrm/ensure-customization(201), thenPUT …/opportunities_by_stage?mode=draft&package=app.objectstack.hotcrm.customwith body"label":{"default":"Opportunities by Stage","zh-CN":"各阶段商机(本公司)"}and"overrides":{"package":"app.objectstack.hotcrm","basedOn":"6.5.0"}(200), then 发布 →POST /packages/app.objectstack.hotcrm.custom/publish-drafts(200, 1 published). After a reload: zh-CN heading 「各阶段商机(本公司)」, name box 各阶段商机(本公司); en-US heading and box "Opportunities by Stage";GET /meta/report/…?locale=zh-CNand?locale=enserve the stored map{"default":"Opportunities by Stage","zh-CN":"各阶段商机(本公司)"};?locale=ja-JPserves the bundle's 「ステージ別商談」.Findings from the run, not fixed here (for the seat):
ReportView's save names no package and declares no override. Not touched by this diff (the save path is unchanged); feat(console): edit a dashboard on its own page, and mark the page filters a card does not follow #36405 gives the dashboard page this route (ensure door +overrides), the report page has none. Carried by 报表搭建页:右边五项(报表类型、数据来源、指标、分组、图表),选完数据来源立刻出图,缺什么就在图的位置提示 #36374 (item 8, 保存后对所有人生效).selection.labelinStudioDesignSurface): outside the panels, same class. Carried by Studio canvas selection strip names the selected widget by its English source label in a zh-CN session #36480.Verification
Tests
Readings at the merged head
20c4ea00unless named. S4 at85e6baf9: specvitest run src/system src/ui/i18n-label-resolver.test.ts77 files, 2768 passed (i18n-report.test.ts35/35);tscandeslintexit 0;overlap-checkclean. S3 at8ad569b7: specvitest run src/system src/ui/i18n-label-resolver.test.ts77 files, 2767 passed (i18n-report.test.ts34/34);tsc --noEmit -p packages/specexit 0;eslinton the two spec files exit 0;overlap-checkclean against main and #36383. At0df531f9(main8a741abdwith #36405 merged in):@object-ui/app-shelltype-checkexit 0 (after rebuilding its dependencies, 68/68 turbo tasks); one lockedvitest runof 266 app-shell files (every Dashboard*/ReportView*/ReportConfigPanel* view test, every inspector test, the moved Studio tests, the runtime-metadata persistence test): 266 files, 3371 passed, 1 skipped;check:test-source-aliasOK; corecolumn-identity.ratchet7/7. L2 rework atc6ab9f25: specvitest run src/system src/ui/i18n-label-resolver.test.ts77 files, 2763 passed (i18n-report.test.ts30/30);tsc --noEmit -p packages/specexit 0;eslinton the two spec files exit 0.vitest runof 117 files (every app-shell, i18n and console test that names a changed module, the moved tests and the four new files): 117 files, 1141 passed, 7 skipped.vitest run src/system/: 76 files, 2642 passed (i18n-report.test.ts24/24).@object-ui/app-shelltype-check(tsc --noEmitandtsc -p tsconfig.test.json): exit 0.eslinton the touched ui files: 0 errors (warnings only inStudioDesignSurface.tsx, none on changed lines).pnpm build --concurrency=2after the merge: 120/120 tasks.Gates
dispatch-gates --commandsat the merged head20c4ea00: 112 families.dispatch-gates --ranwith recorded exit codes: 112 derived, 112 run, 0 NOT-MEASURED, every family exit 0.check:test-source-aliasasked the edited tests that reachimport('@objectstack/lint' | '@objectstack/formula')to pay that load at collection (module-top side-effect imports). Its other exit-3 rows were prerequisites (a shallow-clone fixture commit; built output), cleared by fetching the fixture and a fullpnpm build --concurrency=2(120/120 tasks), then green.overlap-check: VERDICT clean exit 0 againstorigin/main97b9d1e6and feat(spec): every step a flow drawing shows can be translated, under flows.FLOW.nodes.NODE_ID.label #36383 (sharesi18n-standard.mdx, merges cleanly). Atc6ab9f25: clean againstorigin/main6a35635aand feat(spec): every step a flow drawing shows can be translated, under flows.FLOW.nodes.NODE_ID.label #36383. At0df531f9: clean againstorigin/main7ae5e074, feat(plugin-dashboard): a drill opens a centred dialog over the standard list, and a report's chart marks drill #36461 (sharesDashboardView.tsx,ReportView.tsx) and feat(spec): every step a flow drawing shows can be translated, under flows.FLOW.nodes.NODE_ID.label #36383.e2d307a1: 70 check-runs, 61 success and 9 skipped, none failed. The first CI run, at20c4ea00, went red on Test UI 9/16. The corecolumn-identity.ratchetrefused a newname/fielddual read in the widget panel's filter-label lookup (dimensionLabelOf), which now reads the dimension's column throughcolumnIdentity(). Locally, the ratchet, the five affected ui files (62 tests) and the app-shell type-check pass, andoverlap-checkis clean.origin/main: under the 3000 threshold (30 files).Screenshots
Live shots (2× scale) from the run below, in the project's shared files under
repo-objectstack-7/card-36373/; they cannot be uploaded to GitHub from the cloud seat. They replace the harness shots, which are deleted.live-report-panel-zh-CN.png: runtime 「编辑」 on 各阶段商机 after the round trip: heading 「各阶段商机(本公司)」 and subtitle 「按阶段分组汇总商机」 with the panel open, 数据来源 商机指标, 指标 总金额 · 合计 / 平均赢单概率 · 平均, 分组 阶段, 柱状图.live-report-panel-en-US.png: the same report in English: "Opportunities by Stage", Data source "Opportunity Metrics", "Total Amount · Sum", Group by "Stage", "Bar Chart".live-report-charttypes-zh-CN.png: the chart-type list, Chinese names with icons.live-studio-report-zh-CN.png,live-studio-widget-zh-CN.png,live-studio-widget-en-US.png: Studio's report panel and the 销售业绩 dashboard's 阶段管道分布 widget panel.live-selfbuilt-report-panel-zh-CN.png: an untranslated report created over REST.live-roundtrip-publish-dialog.png: Studio's publish dialog for the customized name.🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jUP9hxdL4RzdzTs9eK