Skip to content

feat(plugin-list, plugin-audit): the audit log loads as it scrolls and stops counting the ledger - #39365

Draft
objectstack-fleet[bot] wants to merge 9 commits into
mainfrom
claude/project-thread-r6o0tq
Draft

objectstack-fleet[bot] wants to merge 9 commits into
mainfrom
claude/project-thread-r6o0tq

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread

Fixes #39270

Ruling-ref: 7381289655 (ruling C; analysis 7378111006) · Claim: 7381451680 · Thread session: session_01Utp6CZT8FUBCNmB1htsrbB

What changes

  • List view rule, every object (ui/packages/plugin-list/src/ListView.tsx): an ungrouped grid that loads as it scrolls (no declared pagination) and whose view declares showRecordCount: false sends the declined total ($count: false, wire count=false). It pages on hasMoreRows = "the last window came back full", which already existed for a missing total (objectstack#35554). On that path onTotalChange is called with null (its type is now (total: number | null) => void), so a host drops a count an earlier view gave it and never reads the loaded rows as one. Controls kept per the ruling's execution parameters: a view that hides its count but keeps a numbered pager still asks for the total; a grouped grid, the compact posture (its header prints the total) and the capped posture (excluded from scroll-loading) still ask.
  • No surface prints the loaded rows as a count (L2 7385481231 M1, M2):
    • Grid footer (ui/packages/plugin-grid/src/ObjectGrid.tsx, objectGridSummaries.ts): when the host loads window by window, says there is more, and hands no count larger than the rows loaded, the summary row prints no 「Count N」 lead, asks no whole-set aggregate (that query scans the set the list declined to count; per the zone's steer), and labels each declared figure as over the rows on screen (Sum (this page), the existing page label). Once the last window is in, the loaded rows are the set and the footer reads as before.
    • Record stepper (ui/packages/app-shell/src/views/objectViewRecordNavigation.ts, recordDrawerStack.tsx, ObjectDataPage.tsx): a null total marks the drawer's root level and the record page's from state totalUnknown; both then draw ↑ ↓ through the loaded rows with no 「N / M」 counter. A stale total from a counted view is cleared. ListViewBlock passes null to its host and gives the page tab's badge no number; the dashboard drill (DrillRecordList.tsx) treats null as no total.
  • Ledger views (packages/plugins/plugin-audit/src/objects/sys-audit-log.object.ts): all six sys_audit_log list views declare showRecordCount: false and drop pagination. all_events now loads in windows of the default page size instead of 100.
  • Standalone audit page (ui/apps/console/src/pages/system/AuditLogPage.tsx): it already paged on the row past its window and never read total; it now sends count=false.
  • Spec description (packages/spec/src/ui/view.zod.ts): showRecordCount says what false now does, and names the lists that still ask for the total (numbered pager, grouped grid, a page region's compact or capped form; L2 S1); reference docs regenerated (gen:docs). The view metadata form's hint (view.metadata-form.ts) is the same text, as its pin requires, with the en metadata-forms bundle regenerated (check-i18n-bundles --write).
  • Component reference: the plugin-list registry's showRecordCount input description (ui/packages/plugin-list/src/index.tsx) says the same; sdui.manifest.json, its record and content/docs/ui/components/plugins.mdx are regenerated from it.
  • No wire key, view key, ledger field, index or migration is added.

Why

Opening Setup → Audit log ran a count(*) over the whole filtered ledger beside every 50-row window: 3.5 s on the maintainer's 202k-row deployment, 1.7 s cold on 200k rows in the dev's measurement (report 7377789707), with every other request stalled on SQLite. The window itself is 2–4 ms. The ruling chose to stop asking for the total rather than make the count cheaper.

Premise check (ruling premises 4 and 8), at main 850d240

  • Scroll-loading without a total: hasMoreRows falls back to dataLimitReached when serverTotal is null; the adapter routes $count: false to the raw GET with count=false; the server door omits total and skips the count (protocol-data-crud.ts, pinned by protocol.count-opt-out.test.ts).
  • Cross-page select-all: the selection bar offers "all N matching" only when totalMatching > pageSize; on the scroll-loading arm with no total both are the rows in hand, so the offer is not drawn (no false "all N"). The ledger views declare no selection.
  • Compact embedding: the compact posture draws one window and prints the total in its header, so it keeps asking (declining there would print a window size or show a silent window).

Verification

  • New ui/packages/plugin-list/src/__tests__/ListView.declinedTotal-39270.test.tsx (6 cases): every window asks $count: false and no count runs; rows past the first window are reached (50 → 100 → 120, then hasMoreRows false); no count bar, no figure beside the view name, onTotalChange told only null; controls (numbered pager, shown count, compact) still ask.
  • ui/packages/plugin-grid/src/__tests__/footerSummaryScope-12081.test.tsx (+2 cases): two windows loaded with more to come print no count lead, label the sum (this page) and ask no aggregate; control: all rows in, the lead counts them and the sum is plain. Ablated (hostCountIsWindow off), the first fails.
  • New ui/packages/app-shell/src/views/__tests__/recordStepper.totalUnknown-39270.test.tsx (7 cases): listOriginOf marks totalUnknown (ungrouped only); the record page and the drawer root step with no counter; counted controls keep 「2 / 50」 and 「2 of 3」. Ablated, 2 fail.
  • New ui/apps/console/src/pages/system/AuditLogPage.declinedTotal-39270.test.tsx: every ledger read sends count=false, and Next reaches the 51st row.
  • New packages/plugins/plugin-audit/src/objects/sys-audit-log-views-uncounted.test.ts: every declared view is a grid with showRecordCount: false and no pagination.
  • Ablation: with the totalDeclined rule and the page's count=false reverted, 4 of the new UI cases fail; restored, all pass.
  • vitest run packages/plugin-list/ apps/console/src/pages/system/: 244 files, 2436 tests passed. plugin-audit: the new pin + sys-audit-log-default-view.integration.test.ts pass. @objectstack/spec check:generated after gen:docs: the one stale artifact regenerated.
  • Real-stack check (browser, showcase boot): screenshots in a comment below.

Clause-②: no
Metadata-protocol: semantic
Skills-docs: none — no skills/** or ui/skills/** text names showRecordCount (grep at 850d240); the component reference row is regenerated here.

Human Minimum

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

🤖 Generated with Claude Code

https://claude.ai/code/session_01Utp6CZT8FUBCNmB1htsrbB

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation protocol:ui tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 3 package(s): @objectstack/platform-objects, @objectstack/plugin-audit, @objectstack/spec, touching 4 documentable anchor(s). ⚠️ 1 changed file(s) yielded no anchor (packages/spec/docs/references/api/protocol.part-2.md), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

16 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json f00ab66dd58099dbebb697e30f04a47ab26e34f0.

⛔ 2 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/spec/docs/references/api/protocol.part-2.md) — pages documenting those are invisible to this run
  • 2 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 71 of 256 client-bound route-ledger rows — the other 185 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 185: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 60 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 125 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 188 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json f00ab66dd58099dbebb697e30f04a47ab26e34f0 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 008f4b8dca5c6a1e9369ab0c8ff8228df4f6a10d — the merge of head fe50f48c7ffe5226c4b16abdfc5111b767f372c6 into base f00ab66dd58099dbebb697e30f04a47ab26e34f0, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 008f4b8dca5c6a1e9369ab0c8ff8228df4f6a10d && git checkout 008f4b8dca5c6a1e9369ab0c8ff8228df4f6a10d
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin f00ab66dd58099dbebb697e30f04a47ab26e34f0 fe50f48c7ffe5226c4b16abdfc5111b767f372c6 && git checkout -B drift-repro f00ab66dd58099dbebb697e30f04a47ab26e34f0 && git merge --no-ff fe50f48c7ffe5226c4b16abdfc5111b767f372c6

node scripts/docs-audit/affected-docs.mjs --json f00ab66dd58099dbebb697e30f04a47ab26e34f0

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs f00ab66dd58099dbebb697e30f04a47ab26e34f0 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CZT8FUBCNmB1htsrbB

Real-stack check (head 78b21ff)

Showcase app booted from this branch's built packages (objectstack dev --seed-admin, SQLite file DB), Console served from this branch's ui/ source through the dev proxy, signed in as the seeded admin. 140 records created to grow the ledger to 174 rows.

Setup → Audit Logs object list, default view recent (/apps/com.objectstack.setup/sys_audit_log). The served object metadata lists all six views with showRecordCount: false and no pagination. Opening it and scrolling to the end, the list sent four reads and no other read of the ledger:

read count rows total in answer hasMore
top=50 false 50 absent true
top=50&skip=50 false 50 absent true
top=50&skip=100 false 50 absent true
top=50&skip=150 false 21 absent false

Every request also carried the view's three filter groups unchanged. The page showed no "N records" figure and no pager; scrolling reached the oldest rows (the boot's own writes), and the short last window ended the loading.

Standalone audit page (/system/audit-log): $top=51&$skip=0&count=false, answer with no total.

Server door, same stack: GET /api/v1/data/sys_audit_log?top=50&sort=-created_at answers total: 174; the same with count=false answers 50 rows, no total, hasMore: true.

Screenshots (open, and scrolled to the end) are in the project thread.


Generated by Claude Code

…try; manifest record regenerated

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CZT8FUBCNmB1htsrbB
…tion again; en bundle regenerated

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CZT8FUBCNmB1htsrbB
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CaJjkQx5fPE4Fbmoeq

Contract review

Served-tier: TIER_DEFAULT
Tier-note: CONTRACT_REVIEW_TIER exhausted (429, resets Dec 9 20:00 UTC); Opus review per maintainer 「fable 用完之后,可以用 opus 复审」 (2026-12-03T15:42Z)
Head-sha: 86dcfbab9f7b8643fa58fb45b6b5af4ec417f228
Local-runs: none
Scope: packages/spec/src/ui/view.zod.ts, packages/spec/src/ui/view.metadata-form.ts + ui/packages/plugin-list/src/ListView.tsx, ui/packages/plugin-list/src/index.tsx, packages/plugins/plugin-audit/src/objects/sys-audit-log.object.ts, ui/apps/console/src/pages/system/AuditLogPage.tsx
Security-touching: no
Rule-change-verified: none

Governing text: ruling 7381289655 (C, with its execution parameters) and its analysis 7378111006; claim 7381451680 and amendments 7381668903, 7382995488, 7384293442 (file surface); real-stack check 7382299913. Read at the head above; base 850d240b.

① Derived judgments

  • view.zod.ts:3984 showRecordCount: the accept set is unchanged (z.boolean().optional()); only the published .describe() text and the TSDoc change. The public meaning of false gains a fetch-level effect (the list declines the total on a scroll-loading grid). Named right as a semantic change, not a widening or narrowing.
  • view.metadata-form.ts:276-283: helpText copied from the describe, as view-form-composite-children.test.ts requires; the en metadata-forms bundle is regenerated to the same text. Right.
  • sys-audit-log.object.ts:173,187,208,237,277,286: six shipped list views change from a numbered pager to scroll-loading with the count hidden; all_events moves from windows of 100 to the default page size. A change to shipped metadata, not to the accept set; it is what the ruling orders. Right.
  • ListView.tsx:3223,4851: the list view sends the existing transport flag $count: false, which the adapter already routes to count=false (data-objectstack/src/index.ts:4161,5779) and the server door already honours. No wire key added. Right.
  • AuditLogPage.tsx:455: sends the existing count=false flag; the page never read total. Right.
  • plugin-list/src/index.tsx:265: the SDUI input description, regenerated into sdui.manifest.json and plugins.mdx. Prose only. Right.
  • No new key, value, field, index or migration: confirmed in the diff.

② Semver level

Metadata-protocol: semantic (a changed meaning of showRecordCount: false) takes at least minor on every package the diff moves (AGENTS.md Post-Task Checklist step 3). The changeset bumps @objectstack/spec, @objectstack/plugin-audit, @objectstack/platform-objects, @object-ui/plugin-list and @object-ui/console, all minor, all published (no private). Every package with a published change is listed. Clause-②: no holds: the accept set and the exported surface do not change; the new meaning is declared on the Metadata-protocol line, not as a widening. Both lines are line-initial in the PR body and in the changeset body. Right.

③ Boundary flags

  • Dev premise flag (ruling premises 4 and 8): scroll-loading without a total works. Re-read: hasMoreRows falls back to dataLimitReached when serverTotal is null (ListView.tsx:3241-3243); the re-read-all-windows path spreads findParams, so $count: false reaches every window (ListView.tsx:4890). Holds.
  • Cross-page select-all: SelectionBar.tsx:471-478 offers "all N" only when totalMatching > pageSize; on the declined path ListView hands rowCount = data.length and pageSize = max(data.length, window), so no offer is drawn. Holds. The ledger views declare no selection.
  • Compact embedding: excluded by !compact (ListView.tsx:3223); its header prints the total, so it keeps asking. Capped posture is excluded by infiniteScroll. Holds, and matches the ruling's execution parameters.
  • open_questions: none in the PR.
  • SQL push-down: the change removes a count(*); no id materialisation, no in-app join added. No finding.

④ Design judgment

hits files:

  • view.zod.ts:3984-3989 and view.metadata-form.ts:277-282 against the ruling and ListView. The ruling: "a view that declares showRecordCount: false and has no numbered pager sends the declined total"; execution parameter: "a view that hides its count and keeps a numbered pager keeps asking for the total". The describe's last sentence says exactly that. Its condition does not match its first consumer, though: ListView declines only when infiniteScroll && !compact (ListView.tsx:3215,3223), and infiniteScroll needs paginate, which is false for a grid that declares grouping (ListView.tsx:3170), and is false in a page region's capped posture. The describe promises "on a grid view with no declared pagination (which loads as it scrolls) ... no count query runs" for every such grid; a grouped grid with no pagination neither loads as it scrolls nor declines, so an author hiding the count on a grouped ledger view is told the count is gone while every open still runs it.
    • S1 (should-fix) — view.zod.ts:3985-3988 (and the same text at view.metadata-form.ts:279-282, plugin-list/src/index.tsx:265): the description over-states where the total is declined. Name the ungrouped grid, and say a page region's compact or capped list still asks; or make ListView match the sentence. A published .describe() that is false about its consumer is a defect.

Implementing files:

  • ListView.tsx:3223 totalDeclined = infiniteScroll && !compact && schema.showRecordCount === false: agrees with the ruling's execution parameters (numbered pager keeps asking, compact keeps asking). ListView.tsx:7242 takes settledTotal off the declined path, so onTotalChange and the capped "View all N" never get a window size. Correct as far as it goes.
  • The ruling's test obligation is "no surface prints a window size as a record count (the page-length fallbacks of premise 6 in 7378111006)". Premise 6 names four fallbacks; at this head three are off the declined path (recordCountFigure 7163 behind showRecordCount !== false, compactCount 7223 behind !compact, settledTotal 7242), but the fourth is not:
    • M1 (must-fix) — ListView.tsx:9015 still hands the grid rowCount: serverTotal ?? data.length on the declined path. In ObjectGrid that number becomes resolvedTotalMatching (objectGridSummaries.ts:98), which (a) leads the column-summary row, drawn without residentSummaryRow whenever a column declares a summary (ObjectGrid.tsx:3772-3777, "Count 50", then "Count 100" as the reader scrolls), and (b) makes footerRowsAreTheSet true (objectGridSummaries.ts:131-132), so a declared sum/avg is silently computed over the loaded window instead of the whole set (before this PR the real total kept it whole-set). So a scroll-loading view with showRecordCount: false and a declared column summary prints a window size as a record count, the exact case the ruling's test obligation excludes. The new test stubs object-grid and never asserts rowCount on the declined path, so it cannot see this. The changeset's line 18, "On the declined path no surface prints a window size as a record count", is false at this head.
    • M2 (must-fix) — on the ledger itself, the record drawer prints the window size as the list's count. The Console host reads the list's total through onTotalChange as "the M of 第 N 条,共 M 条" (app-shell/src/views/objectViewRecordNavigation.ts:521-528). On the declined path ListView never reports a total (by design, ListView.tsx:7242), so listTotal is absent and the drawer's stepper falls back to the rows loaded: position.total = Math.max(current.total ?? 0, current.siblings.length) (app-shell/src/views/recordDrawerStack.tsx:435), drawn as {current} / {total} (components/src/custom/record-top-bar.tsx:351). Opening an audit-log row now reads "3 / 50" where it read "3 / 174". And because ListView reports nothing rather than an explicit "no total", a listTotal left by a counted view earlier in the same ObjectView (objectViewRecordNavigation.ts:528,550, never reset) stays on screen as another list's count. The PR body ("so no host prints a window size as a record count") and the changeset line 18 claim otherwise. The ruling's analysis names this as the quiet failure C must not ship. The fix is in the host contract ListView offers (report "no total" when declined, and have the stepper print no "/ M" while the set is a window with more to load), which needs a claim amendment for app-shell/components, or a fork report if the dev judges it beyond the ruling.
  • sys-audit-log.object.ts: all six views are type: 'grid', declare showRecordCount: false and no pagination, with no grouping, so the ledger stays on the declining arm. Agrees with the ruling. The real-stack check 7382299913 shows four windows, all count=false, no total, ending on a short window.
  • AuditLogPage.tsx:455: sends count=false; pages on the row past its window (:450,477) and never reads total. Agrees with the ruling.
  • plugin-list/src/index.tsx:265: same over-statement as S1.
  • Nit N1 — the list pages on dataLimitReached ("the last window came back full") rather than the server's hasMore. Under the door's opt-out arm hasMore is the same test (records.length === pageLimit), so they agree; an exactly-full last window costs one more empty read. No effect on correctness.

Fixes owed: M1, M2, S1. Each earns a delta review of its fix.

Implemented-by: claude/project-thread-r6o0tq
Reviewed-by: session_01Utp6CaJjkQx5fPE4Fbmoeq

VERDICT: FAIL

…size anywhere

The grid footer on a host that loads window by window with no total prints
no count lead, asks no whole-set aggregate (it would scan the set the list
declined to count), and labels its figures as over the rows on screen.
ListView's onTotalChange takes null for a declined total, so hosts drop a
stale count; the record drawer and record page step through the loaded
rows with no N / M counter. The showRecordCount description names the
lists that still ask for the total (grouped grid, numbered pager, compact
or capped posture); docs, en bundle and SDUI manifest regenerated.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CZT8FUBCNmB1htsrbB
@github-actions github-actions Bot added size/l and removed size/m labels Dec 3, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CaJjkQx5fPE4Fbmoeq

Contract review

Served-tier: TIER_DEFAULT
Tier-note: CONTRACT_REVIEW_TIER exhausted (429, resets Dec 9 20:00 UTC); Opus review per maintainer 「fable 用完之后,可以用 opus 复审」 (2026-12-03T15:42Z)
Head-sha: fe50f48c7ffe5226c4b16abdfc5111b767f372c6
Local-runs: none
Scope: packages/spec/src/ui/view.zod.ts, packages/spec/src/ui/view.metadata-form.ts + ui/packages/plugin-list/src/ListView.tsx, ui/packages/plugin-list/src/ListViewBlock.tsx, ui/packages/plugin-list/src/index.tsx, ui/packages/plugin-grid/src/ObjectGrid.tsx, ui/packages/plugin-grid/src/objectGridSummaries.ts, ui/packages/app-shell/src/views/objectViewRecordNavigation.ts, ui/packages/app-shell/src/views/recordDrawerStack.tsx, ui/packages/app-shell/src/views/ObjectDataPage.tsx, ui/packages/plugin-dashboard/src/DrillRecordList.tsx, packages/plugins/plugin-audit/src/objects/sys-audit-log.object.ts, ui/apps/console/src/pages/system/AuditLogPage.tsx
Security-touching: no
Rule-change-verified: none

Delta of record 7385481231 (head 86dcfbab), over the one new commit fe50f48c ("a declined total prints no window size anywhere"). Governing text unchanged: ruling 7381289655, analysis 7378111006, claim 7381451680 with amendments up to 7385528968.

① Derived judgments

  • view.zod.ts:3985 showRecordCount: the accept set is still z.boolean().optional(); only the describe and TSDoc text change. Right.
  • ListView.tsx:754: ListViewProps.onTotalChange changes from (total: number) => void to (total: number | null) => void. ListViewProps is a published export of @object-ui/plugin-list (plugin-list/src/index.tsx:39). Its earlier addition was declared as published surface under Clause-②: yes (plugin-list CHANGELOG, "ListView's two new optional host props ... capped and onTotalChange"). The prop is typed as a property, so under strictFunctionTypes a host handler typed (total: number) => void no longer type-checks against it. This diff had to retype its own in-repo handler, DrillRecordList.tsx:196, for that reason. At run time, a JS host now receives null where it was promised a number. This is a public-surface change of a published package, and the PR declares Clause-②: no. Wrong; see M3.
  • RecordDrawerLevel.totalUnknown and ListOriginState.totalUnknown are additive optional fields in @object-ui/app-shell, which is private: true, so they publish nothing. Right.
  • The hostCountIsWindow input to useObjectGridSummaries is internal to plugin-grid and has a default. Right.

② Semver level

  • The changeset adds @object-ui/plugin-grid, @object-ui/app-shell and @object-ui/plugin-dashboard at minor.
    • minor is the floor for Metadata-protocol: semantic on packages the diff moves.
    • app-shell is private, but privatePackages.version: true in .changeset/config.json versions it without publishing, so listing it is harmless.
    • The levels hold.
  • The Clause-②: no line does not hold at this head. The published ListViewProps.onTotalChange changed type, as named in ①: a host's narrower handler is refused, so the change is yes (narrowing) as written. That arm would need its BREAKING banner, a FROM/TO migration and an ADR-0087 disposition in the changeset.
    • The cheaper alternative keeps the published signature. onTotalChange(total: number) stays as it was, and a new optional host prop (for example a no-argument callback for "this list declined its total") carries the null case. That is Clause-②: yes (widening).
    • Either way the line changes.

③ Boundary flags

  • Dev flag, from the thread: "no whole-set query (the zone told it not to add one)". objectGridSummaries.ts:146 turns useWholeSetSummary off while hostCountIsWindow is true, so no aggregate runs over the set the list declined to count. Declared figures are labelled through the existing page scope, Sum (this page). This is consistent with the ruling, since C declines the scan, and it is answered.
  • onTotalChange callers at this head: ObjectDataPage.tsx:1231, objectViewListRenderer.tsx:1202 (through handleListTotalChange, now number | null), DrillRecordList.tsx:196 and ListViewBlock.tsx:352-357. Tests are retyped or still pass a number (DrillDownDialog-36256.test.tsx:39). No in-repo caller is left broken: Type Check UI is success on this head.
  • SQL push-down: no new id materialisation or in-app join, and one whole-set aggregate is removed on the declined path. No finding.

④ Design judgment

Previous findings:

  • M1: closed. objectGridSummaries.ts:104 resolves no match count while hostCountIsWindow. :137 keeps footerRowsAreTheSet false and :146 turns the whole-set query off, so declared figures take the page scope and its "(this page)" label. ObjectGrid.tsx:3782 drops the "Count N" lead.
    • hostCountIsWindow (ObjectGrid.tsx:2098) requires host paging, onLoadMore, hasMoreRows, and a rowCount no larger than the rows held. A counted scroll list hands a larger rowCount, so it never trips this.
    • Once the last window is in, hasMoreRows is false, and the footer counts the rows held, which are then the set. Correct.
    • ListView.tsx:9024 still hands rowCount: serverTotal ?? data.length, but every reader of that number now goes through hostCountIsWindow. The selection bar's "all N" offer stays off because resolvedTotalMatching is undefined.
    • Pinned by footerSummaryScope-12081.test.tsx (+2 cases, which go red under ablation per the PR body).
  • M2: closed. ListView.tsx:7260-7264 reports null once per settled load on the declined path. The host's listTotal becomes null, which clears a count an earlier view left behind.
    • objectViewRecordNavigation.ts:568 marks the drawer root totalUnknown, and :177 does the same for the record page's from state.
    • recordDrawerStack.tsx:441 and :904 omit position, so record-top-bar.tsx draws no "N / M".
    • Grouped sets (set.scope) keep their behaviour.
    • Pinned by recordStepper.totalUnknown-39270.test.tsx (7 cases).
  • S1: closed. view.zod.ts:3985-3990, view.metadata-form.ts:278-282 and plugin-list/src/index.tsx:265 now say "ungrouped grid view that declares no pagination". They name the numbered pager, the grouped grid and the compact or capped page-region form as still asking. This matches ListView.tsx:3170,3215,3228.

New findings:

  • M3 (must-fix). Clause-②: no (PR body; changeset line 14) is wrong for ListView.tsx:754; see ① and ②. Either declare yes (narrowing) with its banner, migration and ADR-0087 disposition, or keep onTotalChange(total: number) unchanged and carry the declined case on a new optional prop under yes (widening). The second route needs no migration, and the in-repo hosts only need to listen to one more prop.
  • S2 (should-fix). ui/packages/plugin-list/README.md:765 is shipped in the package (files includes README.md). It still teaches "onTotalChange(total) is called with the number of records the list's query matched". At this head the list can call it with null, and the block withholds null from the tab badge (ListViewBlock.tsx:355). The section needs the declined case, whichever route M3 takes.
  • N2 (nit). ListViewBlock.tsx:355 never passes null to the page tab's badge, so a block whose view goes from counted to declined keeps its last badge number. Blocks rarely switch views, and the changeset says the badge "gets no number". Accepted deviation.

Fixes owed: M3, S2. Each earns a delta review.

Implemented-by: claude/project-thread-r6o0tq
Reviewed-by: session_01Utp6CaJjkQx5fPE4Fbmoeq

VERDICT: FAIL

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation protocol:ui size/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Audit log list: the default view's exact total scans every row's metadata text (3.5 s on 200k rows, stalls the SQLite process)

2 participants