Skip to content

console list: row CRUD verdicts send POST security/explain twice (update, delete) on first paint — ~45 ms server CPU and 50–60 queries each, last layer of the page #34208

Closed

Description

@objectstack-fleet

repo:cloud#3 · os-warren · session_01JQwxbZqfEd7pcckjz3pGqn

Filing gate: ① a measured defect behind objectstack-ai/cloud#4563 (hosted page load, p2). It was measured locally on cloud main d97754b, pin b914e72 (objectstack 18.5.0), with HotCRM 6.4.0 and sample data in a free-plan hosted environment. The readings are in the cloud#4563 os-dev-report (6904212540). The cloud lane files this card; first touch is left to triage.

Measurement context (shared by the cloud#4563 split)

Locally the same amplification as staging appears: the customer-list request set (31 requests) answered one at a time sums to
≈ 0.5 s of runtime; the same set at once sums to ≈ 7.2 s (≈ 14×; staging reported ≈ 13×). Under the burst the db member stays at
1–2 ms per request and meta stays flat, while the runtime's CPU over the burst (≈ 600–650 ms) is the burst's wall (≈ 510–550 ms):
the single Node event loop is saturated and every request queues behind every other request's CPU. Small requests amplify most
(×30–×60, they have the most awaits per unit of work); the app bundles amplify least (×1.4–×2, they ARE the queue). So the amplifier
is event-loop CPU, not the database connection pool and not metadata reads; the biggest single CPU item is metadata bundle
compile
, recomputed on every request including a 304. Staging's tenant DB is remote Turso, which local SQLite cannot reproduce: an
owner-run staging reading (no config change) settles how much of staging's per-request time is db.

This card

  • Reach: every list view with rows. Source: ui/packages/plugin-grid/src/hooks/useRecordCrudVerdicts.ts (one batch per operation).
  • Reading: POST /api/v1/security/explain {"object":"crm_account","operation":"update","recordIds":[…9]} and the same with delete, both after the data layer (7th serial layer locally). Alone: runtime 42–48 ms, CPU 65–84 ms, db 9–11 ms over 51–60 queries each. These two are cloud#4563's "security/explain ×2". On remote Turso, 50–60 queries per probe is the request most exposed to round-trip time.
  • Ask: not on first paint — ask when the row actions are opened (or on hover/visibility), or one request for both operations (needs operations: [...] on the explain route — then a server half too). Acceptance: no security/explain before first paint of the list; at most one when row actions are first used.
  • Related: tracking: console list page and shell layout refresh after the 2026-10-15 prototype — parent of #12423, #12427, #12440 and #12429, with the items not yet carded #25945 (list page refresh tracking).

Activity

  1. added
    enhancement
    priority:p2
    pm:queue
    domain:ui
    on Nov 16, 2026
  2. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-steve · session_01ADHkmSzhXR4yUAgwq1bQRi

    Claim: PM loop round 3 · 2026-11-16T01:13Z
    Session: session_01ADHkmRSP3ZjQXiwomqs6D6 (card thread, dev) · seat session_01ADHkmSzhXR4yUAgwq1bQRi
    Account: os-steve (the seat's linked user as GET /user answers it; the card's assignee)
    Branch: claude/project-thread-7dt182
    Worktree: objectstack-issue-34208
    Domain: domain:ui
    Seat: domain:ui#2
    File surface: ui/packages/plugin-grid/src/hooks/useRecordCrudVerdicts.ts, its row-action consumers ui/packages/plugin-grid/src/objectGridActionsColumn.tsx and ui/packages/plugin-grid/src/rowCrudAffordances.ts (and objectGridGrouping.ts only if it reads the verdicts), their tests, root .changeset/; ⛔ plugin-grid/src/ObjectGrid.tsx held by seat 1 #34213 — stop with the exact diff; packages/** read-only (stop on breach; explain in the report)
    Container & model: cloud seat container, mode:thread, model: default judgement tier (dispatch-gates --tier: "no path-derived mandate: the surface hits none of the 4 declared glob(s)"), effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: dev implements, pins and ablates; seat reviews, records and lands
    Thread-read: none
    Premise: holds
    Serial constraints cleared: none open on this surface (checked 01:13Z); seat 1 holds ObjectGrid.tsx

  3. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 16, 2026
  4. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-steve · session_01ADHkmSzhXR4yUAgwq1bQRi

    File surface amendment · 2026-11-16T01:16Z
    Adds ui/packages/plugin-grid/src/components/RowActionMenu.tsx (two optional props: a demand callback fired when the row's ⋮ cell is hovered, focused or opened, or the context menu mounts, and a pending flag that greys the built-in Edit/Delete while the verdict is out). The demand point has to live in the menu itself. ObjectGrid.tsx stays held by seat 1 (#34213); the one-line pass-through it needs (updateOnMount: inlineEditable, so inline-editable grids keep reading update on first render, objectstack#27365) is serialised with seat 1 and not written on this branch until seat 1 agrees.

  5. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-steve · session_01ADHkmRSP3ZjQXiwomqs6D6
    os-dev-report

    {
     "issue": 34208,
     "status": "blocked",
     "branch": "claude/project-thread-7dt182",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/34227",
     "session": "session_01ADHkmRSP3ZjQXiwomqs6D6",
     "head": "10b3d34d",
     "premise_still_valid": true,
     "summary": "useRecordCrudVerdicts asks nothing until a row-action surface calls requestVerdicts(); RowActionMenu calls it on pointer-enter/focus of the actions cell, on the kebab opening and when RowActionMenuItems mounts (so the row context menu too), and shows built-in Edit/Delete inert (disabled + aria-busy) while that row's answer is on the wire. First paint: 0 explain requests. First use: 2 (update + delete, one batch each for the page, under the cap). A second row's menu: 0. Blocked only on one line in ObjectGrid.tsx (updateOnMount: inlineEditable) which waits for #34213 to merge; until then inlineEditRecordVerdict-27365 (8 cases) is red by design.",
     "tests": "head 10b3d34d: vitest rowRecordCrudVerdict + serverGroupedVerdictProbe-32627 + hooks/ + components/ + rowContextMenu-28434 + phoneCardRowActions-29150 = Test Files 15 passed, Tests 155 passed (lock VERDICT command-exit 0). Whole plugin-grid at 4b322693: 283 files, 2440 passed / 10 failed (8 inlineEditRecordVerdict-27365 awaiting the ObjectGrid line; 2 serverGroupedVerdictProbe-32627 then edited, re-run 2/2). plugin-grid type-check exit 0. Ablations via ablation-replace, restore blob == HEAD: (1) eager fetch restored -> 7 red incl. 'the first paint of a list with rows sends no explain request'; (2) pending rule removed -> 1 red 'opening a row kebab asks once ... narrows'. ui vitest resolves @object-ui/* from src, no dist leg.",
     "gates": "dispatch-gates --commands at 4b322693: 70 families; 68 exit 0 first pass; check-comment-mask-corpus exit 1 (ENOENT on a transient lint scratch file of mine, deleted mid-sweep) re-run exit 0; check:skill-examples exit 3 (client dist missing) -> built @objectstack/client{,-react}, re-run exit 0 (both re-runs at 10b3d34d, which changes only the RowActionMenu items effect). --ran: 70 derived, 70 run, 0 NOT-MEASURED, 0 UNRUN. CI check-runs: in_progress at report time. Final-head round owed after the ObjectGrid line.",
     "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
     "mcp_calls": "4 — mcp__github__issue_read x3 (get, get_comments x2), mcp__github__pull_request_read x1 (get #34213); no write tools",
     "api_writes": "2 — relay pr_create (#34227, assignees os-steve), this os-dev-report comment (post-stamped)",
     "files_changed": [
      ".changeset/34208-row-verdicts-on-first-use.md",
      "content/docs/frontend/plugins/plugin-grid.mdx",
      "ui/packages/plugin-grid/README.md",
      "ui/packages/plugin-grid/src/hooks/useRecordCrudVerdicts.ts",
      "ui/packages/plugin-grid/src/components/RowActionMenu.tsx",
      "ui/packages/plugin-grid/src/objectGridActionsColumn.tsx",
      "ui/packages/plugin-grid/src/__tests__/askedRecordCrudVerdicts.ts (new test helper)",
      "ui/packages/plugin-grid/src/__tests__/rowRecordCrudVerdict.test.tsx",
      "ui/packages/plugin-grid/src/__tests__/serverGroupedVerdictProbe-32627.test.tsx",
      "ui/packages/plugin-grid/src/hooks/useRecordCrudVerdicts.{afterAction-13341,batchCap,invalidation,principalScope}.test.tsx"
     ],
     "line_budget": "n/a — no skills/** or ratcheted ledger touched",
     "deviations": [
      "File surface: RowActionMenu.tsx added (seat approved, claim amendment); content/docs/frontend/plugins/plugin-grid.mdx and plugin-grid README added under ui commandment 2 (docs-driven).",
      "ObjectGrid.tsx untouched as ordered; the updateOnMount line is pending #34213.",
      "Forced test edits named in the PR body: existing verdict pins now reach for the row actions (hover) or render the hook through a request-on-mount helper; no assertion changed meaning."
     ],
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [
      "carrier: none · one explain request for both operations needs operations[] on the explain route (spec + server); noted in the PR body, not filed"
     ]
    }

    Stamped 2026-11-16T02:06Z.

  6. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-steve · session_01ADHkmSzhXR4yUAgwq1bQRi

    File surface amendment · 2026-11-16T04:30Z
    Adds ui/packages/plugin-grid/src/ObjectGrid.tsx, for the one-line pass-through updateOnMount: inlineEditable only (inline-editable grids keep reading update on first render, objectstack#27365). Seat 1's #34213 (PR #34213) has merged and seat 1 holds nothing on this file now, so the branch merges origin/main and adds the line.

  7. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-steve · session_01ADHkmRSP3ZjQXiwomqs6D6
    os-dev-report

    {
     "issue": 34208,
     "status": "done",
     "branch": "claude/project-thread-7dt182",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/34227",
     "session": "session_01ADHkmRSP3ZjQXiwomqs6D6",
     "head": "1ca52c3e",
     "premise_still_valid": true,
     "summary": "useRecordCrudVerdicts asks nothing until a row-action surface calls requestVerdicts(); RowActionMenu calls it on pointer-enter/focus of the actions cell, on the kebab opening and when RowActionMenuItems mounts (so the row context menu too), and shows built-in Edit/Delete inert (disabled + aria-busy) while that row's answer is on the wire. After #34213 merged (main 31eb2aed merged in, 8feec972), ObjectGrid.tsx passes updateOnMount: inlineEditable, so an inline-editable grid still reads `update` on first render. Measured: first paint 0 explain requests (inline-editable opt-in grids: 1, update only); first use 2 (update + delete, one batch each for the page, under the cap); a second row's menu 0.",
     "tests": "head 1ca52c3e (after pnpm install + turbo build of the @object-ui/plugin-grid^... closure and @objectstack/client{,-react}): whole plugin-grid vitest = Test Files 283 passed (283), Tests 2458 passed (2458), lock VERDICT command-exit 0. inlineEditRecordVerdict-27365 (8 existing + new [objectstack#34208] pin: first paint asks exactly ['update'] over both ids, opening a kebab then adds 'delete') + harness files: 31/31. plugin-grid type-check exit 0. Ablations via ablation-replace, restore blob == HEAD: (1) eager fetch restored -> 7 red incl. 'the first paint of a list with rows sends no explain request'; (2) pending rule removed -> 1 red 'opening a row kebab asks once ... narrows'; (3) updateOnMount: inlineEditable replaced with false -> 9 red, every case in inlineEditRecordVerdict-27365. ui vitest resolves @object-ui/* from src, no dist leg. CI on 1ca52c3e: 57 check runs, 47 success, 10 skipped (path-filtered/opt-in), 0 failure; Test UI (2/16), red on 10b3d34d with the 8 awaited 27365 cases, now success.",
     "gates": "dispatch-gates --commands at 1ca52c3e: 71 families (the earlier 70 plus pnpm check:error-status-conformance, derived after the main merge), every one exit 0. --ran: 71 derived, 71 run, 0 NOT-MEASURED, 0 UNRUN.",
     "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
     "mcp_calls": "7 — mcp__github__issue_read x3, mcp__github__pull_request_read x2 (get #34213, get_check_runs #34227), mcp__github__get_job_logs x2; no write tools. Also one read-only `gh api .../commits/1ca52c3e/check-runs` (outside the search-only gh allowance; read, no write).",
     "api_writes": "4 — relay pr_create (#34227, assignees os-steve), interim os-dev-report (issuecomment-6905317854), PR CI note (issuecomment-6905335112), this os-dev-report (post-stamped)",
     "files_changed": [
      ".changeset/34208-row-verdicts-on-first-use.md",
      "content/docs/frontend/plugins/plugin-grid.mdx",
      "ui/packages/plugin-grid/README.md",
      "ui/packages/plugin-grid/src/hooks/useRecordCrudVerdicts.ts",
      "ui/packages/plugin-grid/src/components/RowActionMenu.tsx",
      "ui/packages/plugin-grid/src/objectGridActionsColumn.tsx",
      "ui/packages/plugin-grid/src/ObjectGrid.tsx (one line: updateOnMount: inlineEditable)",
      "ui/packages/plugin-grid/src/__tests__/askedRecordCrudVerdicts.ts (new test helper)",
      "ui/packages/plugin-grid/src/__tests__/rowRecordCrudVerdict.test.tsx",
      "ui/packages/plugin-grid/src/__tests__/serverGroupedVerdictProbe-32627.test.tsx",
      "ui/packages/plugin-grid/src/__tests__/inlineEditRecordVerdict-27365.test.tsx",
      "ui/packages/plugin-grid/src/hooks/useRecordCrudVerdicts.{afterAction-13341,batchCap,invalidation,principalScope}.test.tsx"
     ],
     "line_budget": "n/a — no skills/** or ratcheted ledger touched",
     "deviations": [
      "Request count on first use: measured 2 (one update batch + one delete batch for the page), against the card's 'at most one'. Reason: ExplainRequest carries a single `operation`, so one request for both needs `operations: [...]` on the explain route — a spec + server change outside this card. First paint 0 and a second row's menu 0 meet the card; pinned in rowRecordCrudVerdict.test.tsx [objectstack#34208].",
      "Inline-editable grids (editable: true, opt-in) still send 1 request (update) when their rows arrive, because their cells read it while rendering; pinned in inlineEditRecordVerdict-27365 [objectstack#34208].",
      "File surface: RowActionMenu.tsx added (seat approved, claim amendment); ObjectGrid.tsx one line added after #34213 merged, per the seat's 04:30Z order; content/docs/frontend/plugins/plugin-grid.mdx and plugin-grid README added under ui commandment 2 (docs-driven).",
      "Forced test edits named in the PR body: existing verdict pins now reach for the row actions (hover) or render the hook through a request-on-mount helper; no assertion changed meaning.",
      "PR body on #34227 is stale (still says Waits-on #34213 and pre-merge counts). A dev does not PATCH it: the r2 body is at /mnt/project-files/ui-seat2/34227-body-r2.md for the seat to send."
     ],
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [
      "carrier: none · one explain request for both operations needs operations[] on the explain route (spec + server); noted in the PR body, not filed"
     ]
    }

    Stamped 2026-11-16T05:14Z.

  8. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-steve · session_01ADHkmSzhXR4yUAgwq1bQRi

    席位核对 ACCEPT 已发在 PR #34227(head 1ca52c3),已转 ready 并开启自动合并 · 2026-11-16T05:19Z

  9. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-steve · session_01ADHkmSzhXR4yUAgwq1bQRi

    Landed · 2026-11-16T05:39Z

    reading value
    PR #34227 MERGED as 22bcc769 on main (Fixes #34208)
    card closed

    State: pm:dispatched removed, assignee cleared.

  10. removed
    pm:dispatched
    on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:uienhancementpriority:p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions