Repository navigation
fix(plugin-dashboard): a record opened from a drill counts and steps through the whole drill - #36658
Conversation
… whole drill ListViewBlock no longer shadows a host's onTotalChange with the tab count; ListView reports the query behind its rows (onFindParamsChange); the drill reads its whole result's ids with that query for the record page's stepper. Claude-Session: https://claude.ai/code/session_01JQwxbZkNEjKLHtTo4edMVH Co-authored-by: Claude <noreply@anthropic.com>
…e drill Claude-Session: https://claude.ai/code/session_01JQwxbZkNEjKLHtTo4edMVH Co-authored-by: Claude <noreply@anthropic.com>
…e the whole drill Claude-Session: https://claude.ai/code/session_01JQwxbZkNEjKLHtTo4edMVH Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj Contract reviewServed-tier: ① Derived judgmentsThe published surface is exactly the one additive prop. No index file is in the diff. The prop is truly optional. It is declared The declarations are true. Nothing in the diff is under ② Semver levelCorrect. The changeset grades
③ Boundary flagsmust-fix — the deferred open has no live guard, so a cancelled drill still navigates. should-fix — the windowed replay has no unique tiebreak and no dedupe. note — the filter, sort and search are carried exactly. The replay copies note — row-level permissions are unchanged, no widened grant. The ids come from the same adapter, the same object and the same filter the list already ran, with note — the cap and the fallbacks. Over 1,000 matches the walk stops at the first 1,000; a record past the cap, a read that throws, or a result that moved under the list all return the drawn rows with the full total. The user then sees 「第 N 条,共 M 条」 with ↑ ↓ stopping before M. That is the platform's established shape, not a new one: note — cost, and a degradation nothing records. Up to ten parallel note — the click has no pending affordance. The row click now does nothing visible until the read settles, and a second click on another row in that window is dropped by Double
No test weakened. Both touched test files are additions only — a new top-level Server write authority and data authority are unchanged. No server, REST, driver, permission or spec code is in the diff. The only new behaviour on the wire is an id-only read of a query the viewer had already run. ④ Design judgmentAgainst card #36554 and item 6 of #36256 the fix lands. Item 1 is done where the card said the defect was, in Item 2 asked for the drill's total and its condition to reach the record page, "paging as needed". The PR does not do that: it pre-reads the ids in the drill and hands a flat sibling list, leaving One cross-surface effect is worth keeping in view: the drill's record page now steps further than the console object list page's does, which still walks only the rows it loaded. The PR notes it and does not file it. That is the right disposition for now. The shape of the work is good — narrow, additive, reversible, read-only, documented in the README and in the prop's own comment, with a red leg measured. What keeps it from passing is the async seam it introduces: an open that can fire after the user cancelled, and a windowed replay that is not ordered well enough to be the authoritative record sequence it is handed off as. Implemented-by: VERDICT: FAIL |
…oses; read its step set in a stable order Review round 2 on the drill's whole-result step set: - The deferred open checks that the drill is still open and mounted and that no later click started another open; otherwise it is dropped, so Esc or an outside click while the ids are read navigates nowhere. - The id read appends `id` as the last tiebreaker to the list's sort (`id` alone when there is none) and deduplicates the ids, so parallel windows over a sort with ties neither repeat nor skip a record. - A failed read is warned once. Claude-Session: https://claude.ai/code/session_01JQwxbZkNEjKLHtTo4edMVH Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj Contract reviewServed-tier: ① Derived judgmentsUnchanged from round 1, and still true. The delta touches only plugin-dashboard source and two test files. It adds ② Semver levelUnchanged. The changeset is byte-identical to round 1: both entries ③ Boundary flagsRound 1 must-fix (open after cancel): closed. Every path that navigates or calls Round 1 should-fix (unstable windows): closed. Descending id sort: handled. The check is on the last key's Id field named differently: no new exposure. The tiebreak always names Changed exact-param assertions: only this PR's own. The one edited expectation, note — within a tie, the step set's order can differ from the screen's. The list draws its page with no tiebreak, and the read-back sorts ties by note — the failure warning. Round 1's bare note — the page-size and row-budget limits. The module comment and the Round 2 acceptance notes now say what round 1 noted: note — the changeset body. It still says the read-back uses "the same filter, sort and search", without naming the appended Everything round 1 confirmed still holds at the new head. Filter, sort and search are carried; the read is the same query, ids only, so no grant widens; there is no render loop; and no server write or data authority changes. The PR body's Round 2 section matches the code. ④ Design judgmentRound 1's judgment stands. The fix meets #36554's "Done when" and #36256 item 6 by pre-reading ids, a declared, bounded divergence from the card's "paging as needed". The rework is narrow and correct. It replaces the drop-the-second-click guard with "the last click wins, and nothing opens once the drill is closed or gone", which is the better rule. It gives the windowed read a total order and an exact-once guarantee. And it says the failure once. No new surface, no new state shared beyond the component. Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj 维护者速读从仪表盘下钻的明细里点开一条记录,记录页上的「第几条 / 共几条」和上一条、下一条现在按整个下钻结果来算,不再只算第一页。 席位核对 — ACCEPT (L1) · repo:objectstack#1 · head
|
…o the row ceiling in steps instead of one 10,001-row read (objectstack-ai#36665) <!-- claude-projects-attribution: {"github_login":"os-warren"} --> _Requested by **Warren** · [project thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8B1qFgH3ztNJnUAjp2JLA6H)_ Fixes objectstack-ai#36663 Clause-②: no Metadata-protocol: none ## What changes - `ui/packages/plugin-gantt/src/ganttRowWalk.ts` (new, not exported from the package index): `fetchGanttRows` reads the gantt's filtered result set up to `GANTT_ROW_CEILING` + the probe row in steps of `GANTT_FETCH_STEP` = `nonGridRowCeilingQuery().$top` (2,001), the one read the calendar, map, tree and timesheet already send. The first read is the authored query with `$top` = the step; when it settles the set (short, or an adapter that ignored `$top`) it is returned as is, envelope included, so a set that fits is still one read with the authored `$orderby` untouched. A FULL first read means more rows exist: the set is then walked from the top under a unique order, the authored `$orderby` with `id` appended as the tie-breaker in the last key's direction (`withIdTieBreak`; `asc` when nothing was authored), and rows are kept once by `id`/`_id`. `$skip` moves by the rows that came back; the walk stops at the first short answer or one row past the ceiling and answers `{ data, total? }`. It stops asking once a newer reload owns the screen. - `ObjectGantt`'s reload calls it in place of the single `find` with `...nonGridRowCeilingQuery(GANTT_ROW_CEILING)`. Everything else in the query (`$filter`, `$orderby`, `$expand`, `$search`) and the cut (`applyNonGridRowCeiling(result, GANTT_ROW_CEILING)`, `NonGridRowCeilingNote`) are unchanged. - `@object-ui/core` `non-grid-row-ceiling.ts`: docblocks only. `GANTT_ROW_CEILING` now says it is a stop condition, not a request size; `nonGridRowCeilingQuery` no longer says the gantt passes its ceiling to it. - Tests: the harness adapter honours `$skip`, and can refuse a `$top` over a maximum page size the way the server does. New block "a host with a maximum page size of 5,000": an empty object draws (one read, no refusal), 6,234 rows all draw with every `$top` at or under 5,000, and past 10,000 the ceiling and its note still show. Existing `$top` pins move from 10,001 to the step; the truncation case now pins the walk (`$top` sums to 10,001, each `$skip` is the rows before it, each carries `$orderby: { id: 'asc' }`). New `ganttRowWalk.test.ts` (7 cases): one read answered as is with the authored order, no read over the step, the tie-break order, a row kept once when an unstable adapter repeats it across a step boundary, and the stop once a newer reload owns the screen. ## Why Live hosted customer (HotCRM PSA `crm_project_task`, gantt view `project_plan`): the view shows only "Query parameter 'top' asks for 10001 rows; this deployment's maximum page size is 5000. The query was not run." The hosted plane sets `OS_DATA_MAX_PAGE_SIZE=5000`, and `planQueryReadWindow` refuses any `limit` over it before the driver runs, so the refusal depends on the `$top` asked for, not on the rows held: the maintainer confirmed that tenant's plan has no tasks at all. Every hosted gantt was unusable. Deviation from the card's fix direction, stated: the card proposed one shared walk in `@object-ui/core` used by every non-grid view. Only the gantt asks one read for more than the others: calendar, map, tree and timesheet send 2,001, which the hosted cap accepts. So the walk is private to `plugin-gantt` and steps at that same 2,001. No new public export (Clause-② no), and the other four views are untouched. A deployment whose cap is below 2,001 still refuses all five views alike; that is a separate question for a follow-up, not this fix. Paging order: the platform's drivers already append the `id` tie-breaker to a paged read (`driver-query-in-memory.ts` "Sort and paging"), but an adapter that does not would let offset steps over tied sort keys (a stage, a date) repeat one row and skip another, the finding raised on the sibling PR objectstack-ai#36658. So the multi-step walk sends the unique order itself and dedupes by `id`. The first full read is re-read under that order rather than reused, which costs one extra read only for sets over 2,001 rows; it keeps every single-read case, and every existing `$orderby` pin, exactly as authored. ## Verification - `npx vitest run packages/plugin-gantt/ packages/core/src/utils` (under `ui/`): 220 files passed, 1 skipped; 3,018 tests passed, 114 skipped (at 14353fe). After the tie-break change, `packages/plugin-gantt/`: 97 files passed, 1 skipped; 809 tests passed, 114 skipped. - Reverse check: with the first step set back to 10,001, all three "maximum page size of 5,000" cases fail (the refusal is drawn instead of the chart); restored, they pass. With the dedupe removed, "keeps a row once when tied keys move it across a step boundary" fails; restored, it passes. - `pnpm type-check` in `ui/packages/plugin-gantt`: clean. `eslint` on the touched files: 0 errors (existing warnings only). - Delivery: the reporting tenant is hosted, so the fix reaches it only after a framework release and the cloud repo's framework pin moves and deploys. ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` passes. - [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: its generated artifacts are regenerated and committed. (not touched) - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. - [x] The *Before Submitting* list in CONTRIBUTING.md is done. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01JQwxbaTVGEEt267uyT6ufm <!-- signed: repo:objectstack#1 · os-warren · session_01JQwxbaTVGEEt267uyT6ufm --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Warren · project thread
Fixes #36554
Clause-②: yes (widening) — one additive member,
ListViewProps.onFindParamsChange(@object-ui/plugin-list); nothing is removed or renamedMetadata-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
list-viewpage block handed the list its own tab-badge reporter asonTotalChangeafter spreading the host's props, so a host'sonTotalChange(the drill's) was never called. The block now calls both: the host's and the tab badge's.ListViewgains a host prop,onFindParamsChange(findParams), called with the params of the read that drew the rowsonRowsChangereports, each time that query settles with a different answer, keyed on its content. It answers whereonRowsChangeanswers with rows (a paged grid that draws the rows it fetched) and answersnullfor any other kind.DrillRecordListkeeps 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, newdrillRecordSteps.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 orDrillRecordOriginchange.$orderbyis the list's sort withidappended as the last tiebreaker (idalone when the list sends no sort; a sort already ending onidis 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.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-dashboardand@object-ui/plugin-list).Tests
Base
3cf6a44b, head named in the hand-off; all runs underos-verify-lock, fromui/withvitest run --maxWorkers=2.drillDialogStandardList-36256.test.tsx(the reallist-viewin the real drill dialog), new describe for A record opened from a drill counts only the drawn rows: 「共 N 条」 and previous / next ignore the drill's total #36554: a drill whose read matches 40 and draws 2 opens a record with all 40 ids, in order, andtotal: 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 describeListView.onFindParamsChange-36554: a paged grid reports exactly the params of the read that drew its rows; a calendar reportsnull.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.git restore --source=3cf6a44b, tests committed), the two harness describes readTests 4 failed | 133 skipped (137)(expected undefined to be 40; the controlexpected { siblings: [ 'd1', 'd2', 'd3' ] }withouttotal;onFindParamsChangenever called). Restored withgit checkout HEAD --;git diff HEADempty.packages/plugin-dashboard/ packages/plugin-list/ packages/plugin-report/plus app-shelldrill*,pageBlockDrill*,useOpenRecordList*,DashboardView*,ReportView*andpage-tabs-list-count-26613:Test Files 1 failed | 468 passed (469)on the first head. The failure wasDrillDownDialog-36256"the record's name opens its page with the shown rows", which assertsopenRecordsynchronously; the drill now opens at once when no read is owed (no assertion edited), and the file plus the four drill suites readTest Files 5 passed (5), Tests 24 passed (24).type-check(tsc --noEmitandtsconfig.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.Round 2 (contract review 7097462049)
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 unlessidsettles them: every window carries[amount desc, id asc]and the step set is each id once, in order;idalone when there is no sort, anidsort 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.packages/plugin-dashboard/ packages/plugin-list/ packages/plugin-report/plus the app-shellDashboardView*,ReportView*,drill*,pageBlockDrill*,useOpenRecordList*tests:Test Files 468 passed (468),Tests 4742 passed | 13 skipped (4755).Gates
dispatch-gates --commandsderived 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 0againstorigin/main3cf6a44, no open PR head shares a file.Verification
Browser, the showcase app (
objectstack dev --freshon 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.4 records, and the read isfilter=["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」.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-36256file; the #36554 describe expects 40 ids andtotal: 40from a drill that draws 2.Acceptance notes
max(list window, 100)rows per request, and its last window reaches$skip900 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.Human Minimum
packages/specholds no runtime logic. (No spec change.)pnpm lintpasses (changed files: 0 errors).main, one pull request.packages/spectouched: n/a.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01JQwxbZkNEjKLHtTo4edMVH
Generated by Claude Code