Repository navigation
perf(dashboard): shrink gallery session list payloads - #169062
Conversation
Project gallery and membership fields through the existing session-row presenter while preserving richer client row facts and other list callers. A 200-dashboard fixture drops from 233,629 to 81,829 bytes per refresh with broadly unchanged warm server CPU.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. What this changesThis PR adds a smaller dashboard session-row projection while preserving compact and full responses for other callers. Example: Refresh a gallery containing 200 synthetic persisted dashboards.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 3 items remain This PR provides a useful, distinct payload optimization, but both prior findings remain: dashboard reads can clear confirmed permission presentation, and the dashboard route tests still expect compact rows. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe gallery requests sessions through the shared managed-query owner; the Gateway authorizes and projects rows, then client reconciliation combines their facts with held lists and descriptors. flowchart LR
A[Dashboard gallery] --> B[Managed session query]
B --> C[Gateway session list]
C --> D[Authorized row presenter]
D --> E[Dashboard projection]
E --> F[Client reconciliation]
F --> G[Gallery and held descriptors]
Technical reviewBest possible solution: Keep the smaller projection, preserve omitted permission facts in the permission owner, and align the dashboard route expectations. Do we have a high-confidence way to reproduce the issue? Source establishes both remaining findings: newer dashboard reads overwrite the permission overlay, and the route loader supplies dashboard mode to assertions requiring compact; no tests were executed during this read-only review. Is this the best way to solve the issue? The existing presenter and shared provenance owner are appropriate, but omission semantics must also reach the permission owner. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4db95aa552f7. Merge-risk optionsMaintainer options:
Copy recommended automerge instructionProvenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource +62, Tests +158, Docs +7. Total +227 across 14 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 11, 2026, 6:34 AM ET / 10:34 UTC (Revision 2). |
|
Merged as 86f4a21 using the maintainer-authorized inherited-failure exception. The sole test failure in PR CI 38132017453 was The fail-fast monitor cancelled remaining CI work; those checks are not reported as passing. The dashboard-specific remote regressions, Gateway/UI/browser sibling proof, complete type checks, lint/guard completion, and independent review passed as recorded in the PR. No CI rerun or unrelated fix was added to this branch. |
The gallery switched to dashboard rows in 86f4a21 (#169062), while this cross-route E2E still required compact rows from every caller. Preserve the no-refetch and event-rendering assertions and match the documented projection for board-filtered requests.\n\nProof: current-main reproduction failed only the dashboard case; all four routes pass after the assertion update (23.94s wrapper wall time). Scoped Codex autoreview is clean.
Project gallery and membership fields through the existing session-row presenter while preserving richer client row facts and other list callers. A 200-dashboard fixture drops from 233,629 to 81,829 bytes per refresh with broadly unchanged warm server CPU.
The gallery switched to dashboard rows in 8b6fa37 (openclaw#169062), while this cross-route E2E still required compact rows from every caller. Preserve the no-refetch and event-rendering assertions and match the documented projection for board-filtered requests.\n\nProof: current-main reproduction failed only the dashboard case; all four routes pass after the assertion update (23.94s wrapper wall time). Scoped Codex autoreview is clean.
First-parent upstream 75df19c..5ed6a30 (23 commits, including openclaw#169005 infrastructure SQLite work and runtime-write offload, openclaw#169062, openclaw#136677, openclaw#169070, openclaw#168857 plugin-sdk SQLite runtime writes into workers, openclaw#169038, openclaw#168916, openclaw#169053, openclaw#169052 closed-turn transcript work in workers, openclaw#168974, openclaw#168811, openclaw#169082, openclaw#169084, openclaw#166581 worker heap limits). Conflicts: - openclaw-state-worker-runtime.ts: upstream routes more update-run mutations to the worker; our continuation custody dispatch stays ahead of that branch. - worker-access inventory: regenerated (632 files, 2429 calls). server-restart-sentinel.ts auto-merged: upstream's awaited update-run writes; our continuation restart delivery is unaffected. Refs #1475 Co-Authored-By: Claude Opus 5.5 <[email protected]>
What Problem This Solves
The dashboard gallery repeatedly downloads session execution and settings metadata that its cards never render. Observed 200-row refreshes transfer about 348 KB, often twice per minute per open tab.
User Impact
Gallery refreshes transfer smaller rows while preserving cards, author/search filters, sorting, navigation, pagination, and event updates. Other compact and full
sessions.listcallers retain their response fields.Why This Change Was Made
Add
rowMode: "dashboard"at the existing session-row presentation owner. The gallery uses that projection, including the ownership and lineage facts its shared event reconciler needs. Client field provenance treats excluded fields as unknown, so gallery refreshes preserve richer descriptor/event facts. Detail panels still fetch a full descriptor.Production LOC: +62 (86 added, 24 removed; excluding tests and docs). The existing public compact response supplies model, usage, permission, and participant fields to other callers, so narrowing it globally would break their contract. The added projection shares the existing presentation cache and revision invalidation; there is no new cache, subscription owner, configuration option, or database migration.
Evidence
On 200 synthetic persisted dashboards, same Linux process and client, five rounds of 25 warm handler + wire-serialization reads per mode:
65.0% fewer bytes (2.86× smaller). At one or two reads per minute, this is 81.8–163.7 KB/min/tab, down from 233.6–467.3 KB/min/tab in this fixture. CPU is broadly unchanged. The fixture is smaller than the reported production payload, and cold-cache CPU and live production traffic were not measured. No operator Gateway was modified.
Remote proof used Crabbox's authorized Hetzner fallback after Testbox queueing and AWS capacity limits:
cbx_691e3d64764d: corrected serialization regression, 25 changed UI tests, and the benchmark above. The serialization file took 56.16 s wall / about 5.6 s test execution withnode scripts/run-vitest.mjs <file> --maxWorkers=1; UI files took 9.03 s combined wall. Changed-file checks passed: the full run completed every type graph and audit, then a brace-only benchmark formatting correction passed lint and every remaining owner-planned check in runrun_f8b5b73a32f363e4e1b38db53ce0c470. The successful type/test proofs were reused.cbx_24c4319fe079, runrun_9c6639917bac1abaf375776506303954: 63 Gateway/protocol tests including a real WebSocket response, 67 UI sibling tests, export-collision guard, 20 source-closure tests, and all five headless browser scenarios passed. Browser scenarios cover gallery navigation/retention, two independent tabs, and failure recovery. The existing WebSocket suite was included in the 177.29 s combined Gateway/protocol run; the added request ran within its existing 4.32 s persisted-usage case.18941faa9629; the single commit rebased unchanged onto6e06137f85ef(verified withgit range-diff). Exact-head CI run38132017453reached its inherited failure in 144 s in the affected shard; cancelled checks are not counted as passes.Commands:
node scripts/run-vitest.mjs <focused files> --maxWorkers=1;OPENCLAW_DASHBOARD_BENCH=1 node scripts/run-vitest.mjs src/gateway/session-list-serialization.test.ts -t 'projects dashboard cards' --maxWorkers=1;node scripts/check-changed.mjs; the repository export/source-closure guards; and the Control UI E2E wrapper.Remote-run accounting
tbx_01m4mw0m9ek1v9vfddzef70y55cbx_24c4319fe079,run_da0d1b95e2cfdd42845b9b73c32a3c56run_40f036fea1f50c5ec94746d5d361977crun_9c6639917bac1abaf375776506303954rg.run_e25e4da639c28ac06d5c26c2547a5906rg; corrected test exposed a fixture model-selection expectation. Fixed with explicit model overrides. Lease released.cbx_f51cf62cfb47cbx_691e3d64764d,run_28cf145c33f66e8e4cae54a7d5878636rg; final focused regressions and 200-row benchmark passed; all type graphs and audits passed. A benchmark loop needed braces for lint.| Same lease,
run_f8b5b73a32f363e4e1b38db53ce0c470| The formatter, corrected lint step, and every remaining check from the same generated plan passed; prior successful type and test proofs reused. Lease released. |All tests, typechecks, and browser builds ran remotely. The only Mac work was source inspection/editing, Git, formatting, and the authorized independent-review helper.
CI qualification
CI run 38132017453 failed only
session-utils-store-lookup.test.ts > keeps direct selection on the physical parent across all-agent lists (separate)inchecks-node-changed-compact-large-6; the fail-fast monitor cancelled the remaining selected work. The test expectedmodelOverrideSource: "user"after selecting the configured default, which correctly yieldsnull.The identical case and mismatch already failed in scheduled main run 38128806138. The test and its model-selection producers are unchanged between the tested base and this PR. Main already fixes the fixture in ec5fe47d136b. This PR retains only the dashboard change; no CI rerun or unrelated fix was added. Landing uses the maintainer-authorized inherited-failure exception, with the independent review and remote behavior/type/lint proof above.