Repository navigation
Commit 6e643cc
feat(plugin-dashboard): a drill opens a centred dialog over the standard list, and a report's chart marks drill (#36461)
<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} -->
_Requested by **Steedos** · [project
thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbD5gxSWeWGswbZYVzNvtqNM)_
Part of #36256
Fixes #36550
This PR lands the drill dialog. One piece stays open on the card,
carried by #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 (#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 (#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 #36405 and
#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.
**#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 #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: #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: #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: #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>1 parent d7411fa commit 6e643cc
24 files changed
Lines changed: 1864 additions & 80 deletions
File tree
- .changeset
- ui/packages
- app-shell/src/views
- components/src
- renderers/layout
- plugin-dashboard/src
- __tests__
- plugin-report/src
- __tests__
- react/src/context
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
114 | | - | |
115 | 113 | | |
116 | 114 | | |
117 | 115 | | |
| |||
235 | 233 | | |
236 | 234 | | |
237 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
238 | 242 | | |
239 | 243 | | |
240 | 244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
110 | 112 | | |
111 | 113 | | |
112 | 114 | | |
| |||
152 | 154 | | |
153 | 155 | | |
154 | 156 | | |
155 | | - | |
| 157 | + | |
156 | 158 | | |
157 | 159 | | |
158 | 160 | | |
| |||
165 | 167 | | |
166 | 168 | | |
167 | 169 | | |
168 | | - | |
| 170 | + | |
169 | 171 | | |
170 | 172 | | |
171 | 173 | | |
| |||
602 | 604 | | |
603 | 605 | | |
604 | 606 | | |
605 | | - | |
606 | | - | |
607 | | - | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
608 | 610 | | |
609 | 611 | | |
610 | 612 | | |
611 | 613 | | |
612 | 614 | | |
613 | 615 | | |
| 616 | + | |
| 617 | + | |
614 | 618 | | |
615 | 619 | | |
616 | 620 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
0 commit comments