You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4034a6d
Browse filesBrowse the repository at this point in the historyBrowse files
fix(plugin-dashboard): a record opened from a drill counts and steps through the whole drill (#36658)
<!-- claude-projects-attribution: {"github_login":"os-warren"} -->
_Requested by **Warren** · [project
thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8Jx4cUmYNpTragccfoD4M4E)_Fixes#36554
Clause-②: yes (widening) — one additive member,
`ListViewProps.onFindParamsChange` (`@object-ui/plugin-list`); nothing
is removed or renamed
Metadata-protocol: none
The remainder of the drill-dialog card #36256 (after PR #36461): the one
open defect against its item 6, and the 「上季度」 acceptance line re-read on
data that has last-quarter values. Card #36256 stays open on this merge;
whether it ends once this lands is the seat's call (the re-check below
reads as passed).
## 维护者速读
- 从仪表盘或报表的明细弹窗点进一条记录后,记录页顶上的「第几条,共几条」和上下翻,现在按明细的全部记录算,不再只算弹窗里已经画出来的那一页。
- 属于「仪表盘和报表的使用体验」专题,补完「点记录进整页并能在明细里上下翻」这一点。
- 出错时最多回到以前的样子(只在已画出的行里翻);只多了一次只读取编号的查询,随时可以撤回。
- 无
## What changes
- **The count reaches the drill.** The `list-view` page block handed the
list its own tab-badge reporter as `onTotalChange` after spreading the
host's props, so a host's `onTotalChange` (the drill's) was never
called. The block now calls both: the host's and the tab badge's.
- **The list reports the query behind its rows.** `ListView` gains a
host prop, `onFindParamsChange(findParams)`, called with the params of
the read that drew the rows `onRowsChange` reports, each time that query
settles with a different answer, keyed on its content. It answers where
`onRowsChange` answers with rows (a paged grid that draws the rows it
fetched) and answers `null` for any other kind.
- **The drill hands the record page the whole drill.** `DrillRecordList`
keeps that query and, when a record name is clicked and the count
exceeds the rows drawn (or the rows drawn are a later page), re-issues
it for ids alone (`drillRecordOrigin`, new `drillRecordSteps.ts`): the
same filter, sort and search, `$select: ['id']`, window by window at the
list's own window or 100, whichever is wider, up to 1,000 ids. The
record page gets those ids as its step set and the drill's count, so 「N
of M」 says where the record sits in the whole drill and ↑ ↓ walk all of
it. No record page, history-state shape or `DrillRecordOrigin` change.
- **The read is stable and the open is live (review round 2).** The
windows are read side by side, so the read's `$orderby` is the list's
sort with `id` appended as the last tiebreaker (`id` alone when the list
sends no sort; a sort already ending on `id` is kept), and the ids are
deduplicated in order. The deferred open checks that the drill is still
open and mounted and that no later click has started another open;
otherwise it is dropped, so Esc or an outside click while the ids are
read navigates nowhere and does not close a drill opened since. A failed
read is logged once (`console.warn`) and keeps the rows drawn.
- **Unchanged when nothing more is owed.** A drill whose rows drawn are
its whole result opens the record at once, with no read and no promise
(the existing #36256 pins hold unedited). A failed read, a record past
the first 1,000, or a result that changed under the list keeps the rows
drawn as the step set, as before.
- Docs: `ui/packages/plugin-list/README.md` (the block's two count
listeners, the new host prop). Changeset:
`.changeset/36554-drill-record-steps-whole-result.md` (patch,
`@object-ui/plugin-dashboard` and `@object-ui/plugin-list`).
## Tests
Base `3cf6a44b`, head named in the hand-off; all runs under
`os-verify-lock`, from `ui/` with `vitest run --maxWorkers=2`.
- New pins:
- `drillDialogStandardList-36256.test.tsx` (the real `list-view` in the
real drill dialog), new describe for #36554: a drill whose read matches
40 and draws 2 opens a record with all 40 ids, in order, and `total:
40`; every id read carries the drill's condition and no write is made.
Control: a drill whose 3 rows are its whole result hands `{ siblings:
[d1, d2, d3], total: 3 }` and makes no id read.
- `ListView.harness.test.tsx`, new describe
`ListView.onFindParamsChange-36554`: a paged grid reports exactly the
params of the read that drew its rows; a calendar reports `null`.
- `drillRecordSteps-36554.test.ts`: the query kept and stripped, a later
page read from the start, the 1,000 cap walked in windows, the list's
wider window, no read (and no promise) when all is drawn, and the drawn
rows kept on no query, no count, a failed read or a moved result.
- Red leg: with the three source files restored from base (`git restore
--source=3cf6a44b`, tests committed), the two harness describes read
`Tests 4 failed | 133 skipped (137)` (`expected undefined to be 40`; the
control `expected { siblings: [ 'd1', 'd2', 'd3' ] }` without `total`;
`onFindParamsChange` never called). Restored with `git checkout HEAD
--`; `git diff HEAD` empty.
- Full runs: `packages/plugin-dashboard/ packages/plugin-list/
packages/plugin-report/` plus app-shell `drill*`, `pageBlockDrill*`,
`useOpenRecordList*`, `DashboardView*`, `ReportView*` and
`page-tabs-list-count-26613`: `Test Files 1 failed | 468 passed (469)`
on the first head. The failure was `DrillDownDialog-36256` "the record's
name opens its page with the shown rows", which asserts `openRecord`
synchronously; the drill now opens at once when no read is owed (no
assertion edited), and the file plus the four drill suites read `Test
Files 5 passed (5), Tests 24 passed (24)`.
- `type-check` (`tsc --noEmit` and `tsconfig.test.json`):
`@object-ui/plugin-list`, `@object-ui/plugin-dashboard`,
`@object-ui/app-shell`, each exit 0, after the
`@object-ui/app-shell^...` closure build.
- eslint on the changed files: 0 errors.
### Round 2 (contract review 7097462049)
- New pins, red at `dc1c6c89` (the three source files restored from it,
new tests kept: `Tests 8 failed | 9 passed (17)`), green at the new head
(`17 passed (17)`):
- `drillDialogStandardList-36256.test.tsx`: with the id reads held,
closing the drill (`open` → false) and then answering the reads opens no
record and closes nothing; the same after the drill unmounts; two clicks
while the read is held open only the second record, with the whole step
set.
- `drillRecordSteps-36554.test.ts`: 150 rows tied on the list's sort
across two 100-row windows, from a source that answers ties in a
different order per window unless `id` settles them: every window
carries `[amount desc, id asc]` and the step set is each id once, in
order; `id` alone when there is no sort, an `id` sort kept as written; a
boundary row two windows both answer is counted once; a failure is
warned once over two failed reads. The first test's exact-params
expectation now names the appended tiebreaker.
- Full run: `packages/plugin-dashboard/ packages/plugin-list/
packages/plugin-report/` plus the app-shell `DashboardView*`,
`ReportView*`, `drill*`, `pageBlockDrill*`, `useOpenRecordList*` tests:
`Test Files 468 passed (468)`, `Tests 4742 passed | 13 skipped (4755)`.
## Gates
- `dispatch-gates --commands` derived 38 families; all run, each `::
exit 0`; `--ran`: "38 derived famil(ies) accounted for — 38 run, 0
NOT-MEASURED (a DERIVED zero — all 38 recorded an exit code and none of
them is 3)". `vitest run scripts/`: `Test Files 172 passed | 2 skipped
(174)`.
- `check:new-line-citations`: 0 new. `check:nul-bytes`: OK.
`overlap-check`: `VERDICT clean exit 0` against `origin/main` 3cf6a44,
no open PR head shares a file.
## Verification
Browser, the showcase app (`objectstack dev --fresh` on a random port,
the Console vite server on another, both stopped after), 1440×900.
Screenshots are in the project thread's files (`issue-36554/`), not
inline: this branch is the only ref the session may push.
1. **「上季度」 re-check (the open acceptance line of #36256).** Revenue
Pulse, date range Last quarter (2026-07-01 to 2026-09-30 on 2026-11-23):
the Invoices tile reads 4. Clicking it opens the dialog with the chips
「Issued On: ≥ 2026-07-01」 and 「Issued On: ≤ 2026-09-30」, `4 records`,
and the read is
`filter=["and",["issued_on",">=","2026-07-01"],["issued_on","<=","2026-09-30"]]`.
No non-GET request was sent from opening the drill. The record name
opens the invoice page, which reads 「1 of 4 · Revenue Pulse」; Next gives
「2 of 4」.
2. **#36554.** With 48 extra invoices created in the throwaway database
(60 in all), All time, the Invoices drill draws 50 rows and says `60
records`. Opening the 50th drawn row: the page reads 「50 of 60」, one id
read went out (`top=100&select=id`), and Next steps to a record the
drill never drew, 「51 of 60」. On main the drill never hears the count
and hands only the drawn rows, which the red leg above measures in the
harness; main itself was not walked in the browser.
Two-minute check: run the `drillDialogStandardList-36256` file; the
#36554 describe expects 40 ids and `total: 40` from a drill that draws
2.
## Acceptance notes
- The id read asks for `max(list window, 100)` rows per request, and its
last window reaches `$skip` 900 for a 1,000-id read. Neither limit is
set by default (`packages/types/src/query-read-limits.ts`:
`OS_DATA_MAX_PAGE_SIZE` "no maximum", `OS_DATA_QUERY_ROW_BUDGET` "no
budget"); a deployment that sets the page size below 100 or the row
budget below the walk refuses the read, and the record page then keeps
the rows drawn (as before) with one console warning, not an error.
- A drill matching more than 1,000 records steps through the first
1,000; the count still says the full number, and a record opened past
the first 1,000 keeps the rows drawn.
- The object list page has the same shape (its record page steps only
through the rows it loaded); it is untouched here and noted, not filed.
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(No spec change.)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes (changed files: 0 errors).
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: n/a.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01JQwxbZkNEjKLHtTo4edMVH
---
_Generated by [Claude
Code](https://claude.ai/code/session_01JQwxbZkNEjKLHtTo4edMVH)_
<!-- signed: repo:objectstack#1 · os-warren ·
session_01JQwxbZkNEjKLHtTo4edMVH -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
fix(plugin-dashboard): a record opened from a drill counts and steps through the drill's whole result
7
+
8
+
Clause-②: yes (widening) — one additive member, `ListViewProps.onFindParamsChange` (`@object-ui/plugin-list`); nothing is removed or renamed
9
+
Metadata-protocol: none
10
+
11
+
A record opened from a dashboard or report drill showed 「1 of N」 and stepped ↑ ↓ only over the rows the drill's list had drawn on its page, so a drill that matched 40 records and drew 20 let the reader walk 20. The `list-view` page block handed its own `onTotalChange` (the tab badge's count) to the list after the host's, so the drill never heard the count; it now hands the count to both. The list now also reports the query behind the rows it draws (`onFindParamsChange`, a host prop answered where `onRowsChange` answers with rows), and the drill re-issues that query for record ids alone, with the same filter, sort and search, when the count exceeds the rows drawn or the rows drawn are a later page. The record page is handed every record the drill matched, in the drill list's order, up to 1,000, and the count it matched, so its counter says where the record sits in the whole drill and ↑ ↓ walk all of it. A read that fails, a record past the first 1,000, or a result that changed under the list keeps the rows drawn as the step set, as before.
0 commit comments