Skip to content

perf(ui): reduce dashboard and chat reload RPC fan-out - #179157

Merged
steipete merged 3 commits into
mainfrom
steipete/perf-micro-reload-rpc-churn-20260919
Oct 21, 2026
Merged

steipete merged 3 commits into
mainfrom
steipete/perf-micro-reload-rpc-churn-20260919

Conversation

@steipete

@steipete steipete commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Reloading a dashboard or chat performs avoidable per-pin descriptor reads and one activation-report RPC per browser plugin.

User Impact

Reloading uses fewer Gateway requests while preserving the existing roster, pin navigation, plugin availability, and authoritative refresh behavior.

Why This Change Was Made

Check for a loaded row when a queued pin lookup actually receives the foreground request budget. Rows supplied by the roster during that wait need no descriptor; pins outside held windows still get one.

The plugin runtime publishes healthy plugins immediately and sends their activation receipts as one bounded batch once initializers finish or reach their existing deadline. It includes retained owners when a refresh supersedes an unsent batch. The Gateway keeps its live-client and per-plugin revision checks, records valid peers in a mixed batch, and identifies rejected plugins separately. The old per-plugin report transport method is removed. The coupled UI/Gateway request payload changes together; status results retain their existing per-plugin shape.

Evidence

Acceptance rule recorded before measurement: real isolated Gateway, synthetic 5,000-session roster, seven plugins, eight personal pins, dashboard and chat; first 15 seconds per document; 11 simultaneous baseline/candidate pairs with CPU halves swapped on alternating pairs. Compare per-pair candidate-minus-baseline differences, with cold browser contexts separate from warm reloads. Target 40% fewer requests without blocking regression; retain useful requested simplifications with a smaller nonregressing result.

Diagnostic baseline at ef6d500b534062f352aa6d7ceef01c97d907c511: 63 RPCs for each route. All 63 requests have distinct full parameters. The eight avoidable pin descriptors wait behind foreground bootstrap; seven activation receipts are independently reported. Current main already uses the shared model catalog (ui/src/lib/model-catalog-store.ts) and its bootstrap snapshot (models.list = 0). Its four list queries have distinct filters. PR subscriptions already deduplicate the sorted active/passive set signature in ui/src/lib/session-pull-requests.ts; the three observed sets differ as membership arrives. Those owners retain their authoritative refresh semantics.

Final measurement: 11 concurrent A/B pairs, 44 result files, 88 page loads, using pinned Chrome for Testing 156.0.8078.4, without request-stack capture. Each pair swaps the two 16-core CPU halves relative to the preceding pair. All groups contain all 11 pairs; actual A/B start skew is −27 to +44 ms. Across the campaign, requests fall from 2,794 to 2,177 (−617, −22.08%). The median saving is 14 requests per load; one warm dashboard saves 15 because the existing PR-set owner converges with two subscriptions instead of three.

Values below are A → B medians; Δ is the median of within-pair B−A differences, not the difference between independent medians. Blocking and row timings are milliseconds.

Load RPCs A → B RPC reduction Native LoAF blocking A → B Paired blocking Δ
Dashboard, cold 65 → 51 21.54% 127.3 → 128.5 +0.5
Dashboard, warm 63 → 49 22.22% 18.8 → 21.1 +2
Chat, cold 63 → 49 22.22% 135.9 → 119.4 +4.2
Chat, warm 63 → 49 22.22% 9.6 → 6.3 -1.5
Load First rows A → B Paired first-row Δ Final rows A → B Paired final-row Δ Paired FCP Δ
Dashboard, cold 917.2 → 897.4 -23.4 1420.6 → 1435.7 -11.9 0
Dashboard, warm 354.6 → 362.1 -6.8 354.6 → 362.1 -6.8 0
Chat, cold 468.2 → 456.5 +12 833.6 → 805.7 +13.3 +8
Chat, warm 365 → 372.8 +8.9 365 → 372.8 +8.9 0

Decision and limits: the 40% RPC target is not met. The requested removal of avoidable work provides a repeatable ~22% reduction, with no consistent blocking shift across the paired sample; paired blocking means are +6.36, −0.20, +1.04, and −2.84 ms in table order. This is a request-count improvement with neutral central timing, not evidence of a latency or tail improvement. It qualifies under the standing acceptance rule for useful requested changes with timing differences within observed variation.

Keep the tail visible: pair 11 has the largest cold-dashboard blocking on both sides, 203.2 → 325.6 ms (Δ +122.4 ms). The candidate’s largest individual blocking frame is 99.1 ms at 509.7 ms, before its first RPC at 752.2 ms and activation batch at 1,574.1 ms. Candidate FCP and first rows in that pair are 144 and 275.5 ms earlier. CPU-context non-idle means are 13.66%/14.12% for A/B, versus whole-pair means of 3.02%–10.81% in pairs 1–10. These measurements include benchmark work and outside work; they do not establish the spike’s cause. Pair 11 remains included. Eleven pairs cannot rule out a rare tail cost, and no tail-win claim is made.

Every document completes the 15-second window with 10 final sidebar rows; no page errors, cleanup errors, missing replies, late replies, or unknown response outcomes occur. Cold dashboards have one symmetric talk.catalog warm-up failure followed by a successful retry on each side (22 such initial failures total); all other requests succeed. The extra cold-dashboard descriptor is a distinct child-navigation query. sessions.describe falls 10→2 there and 9→1 elsewhere; plugins.controlUi.report falls 7→1 everywhere. sessions.list stays at four distinct filters and models.list stays at zero. The traced census below is the earlier warmed-Gateway diagnostic; the paired cold-dashboard startup additionally includes the child query and the intentional voice-catalog retry.

The earlier baseline-runtime path failure and Snap Chromium shared-profile collision were setup failures, not valid comparison pairs. Both attempts are excluded. The final campaign used a sandbox-local pinned browser, with simultaneous distinct-profile launches verified before measurement; no valid timing result was removed or rerun.

All 11 paired native-LoAF differences and CPU context

Blocking columns are B−A milliseconds; CPU columns are mean non-idle percent over the pair, including benchmark work. Odd pairs place A on cores 96–111 and B on 112–127; even pairs swap them.

Pair Dashboard cold Δ Dashboard warm Δ Chat cold Δ Chat warm Δ A CPU B CPU
1 +11.8 +6.7 +4.2 +2.8 5.22% 5.03%
2 -17.5 -7.9 +9.6 +0.9 5.01% 5.43%
3 -7.2 +2 +11.4 -1.5 4.96% 6.89%
4 +1.3 +2.6 -28.5 +7.4 4.07% 5.01%
5 -9.7 -10.6 +19.8 -5.2 5.82% 5.15%
6 +0.5 +3.5 +44.6 -28.2 6.3% 5.61%
7 -24.8 -3.8 -20.8 -5.8 5.51% 5.16%
8 +0.7 -3.4 -3.6 -4.7 3.12% 2.92%
9 -10.1 +5.6 -27.3 +2.8 2.96% 4.21%
10 +2.6 +11 +18.1 +3.6 9.51% 12.12%
11 +122.4 -7.9 -16.1 -3.3 13.66% 14.12%

Proof: pin regression red on baseline and 32/32 focused tests green; batch protocol validation red on baseline; export collision guard and both import-closure files pass (22 tests). UI typecheck passes after explicit activation return correction. Independent review completed with no actionable P0–P2 findings. Gateway plugin asset tests pass (22/22), including mixed-batch live-client/revision validation; protocol validators pass (9/9). Runtime tests pass (20/20), including immediate healthy-plugin availability, superseded batches, transport failures, and per-plugin rejection attribution. The new runtime regression also fails on the original code for the intended early singular-report behavior; changed-file format and lint are green. PR CI supplies broad and E2E validation; no local full suite or test lease was used. A corrective Gateway test run passes all 22 tests using the real request-context factory. Changed-file source-only lint passes; an earlier lint invocation entered declaration preparation and was stopped.

The first PR CI run (39557079735) passed 51 jobs and exposed three test-proof corrections: use the request-context factory instead of a partial cast, assert the complete two-plugin receipt batch while preserving the mounted manager for its pending-button check, and prune the retired loader mock baseline entry. The second run on 33f054e616c39c37a03c8dd9bd0ff1d65987b0b0 passes all four browser shards, the Gateway test-type shard, and the baseline ratchet. It exposed one rebase integration issue: #179134’s new runtime test used the retired unqualified mock reference. The correction points it at the existing loader spy, preserves all assertions, passes 21/21 focused runtime tests, and has a clean independent review. Final head fdde14b601619f8c16cf12187f0db64fe346d73b carries that correction. On that final head, all three UI unit shards and all four browser shards pass. The only failing constituent CI jobs are the two independently reproduced main failures below; the aggregate CI gate remains red because of them.

The separate test/scripts/lint-suppressions.test.ts failure is inherited. On final head fdde14b601619f8c16cf12187f0db64fe346d73b, job 119096347002 reports 99 entries versus 97. The same exact-file run on unchanged main parent a7800168fc85000fae3ec5c165b08949cf926172 reproduces both extra entries: scripts/perf/workboard-read-measure.ts|typescript/unbound-method|1 from #179090 and scripts/perf/transcript-worker-memory-preload.ts|typescript/unbound-method|2 from #179119. Both runs have 13 passing tests and that one failure; neither implicated file nor the inventory test is changed here. The first PR head and its main parent had already reproduced the earlier 98-versus-97 form before #179119 landed. No CI rerun was requested.

The separate test-planner type errors in final-head job 119096825712 are also inherited: test/scripts/ci-changed-node-test-plan.test.ts:813 and :891 pass CompactNodeTestShard to a helper requiring ChangedNodeTestShard (missing configs), introduced on main by 0f750efb137b. A bounded scripts/run-tsgo.mjs diagnostic in the isolated Linux sandbox, selecting only that file and the existing declaration globs, reproduces both TS2345 errors against f29ecf310b2c103dcd9ae70db46df89395170d2b inputs. The test, imported planner modules, and config-chain blobs match that main baseline; no additional local typecheck or full tooling lane was run.

ClawSweeper reviewed exact head fdde14b601619f8c16cf12187f0db64fe346d73b with no actionable findings. Its requested paired measurements are complete above. A latest-stable upgrade was not run: this change does not alter persisted pins, plugin settings, configuration, migrations, or installation/update behavior. The activation receipt is an observation tied to a live browser connection; the existing matched-version UI/Gateway contract owns the coupled wire change. Current-head UI unit and browser CI cover the affected consumers. This is a stated validation limit, not upgrade evidence.

Runtime production delta is +26 lines (78 added, 52 removed). The requested batch contract needs a bounded envelope, retained-owner receipts across superseding refreshes, and per-plugin rejection attribution; it removes the old per-plugin transport method and introduces no cache or new state owner. The separate fixture/census tooling makes the real-Gateway measurement reproducible. The requested filtered diff statistic, which also includes benchmark scripts and their README, is 516 insertions / 60 deletions (+456): +431 in measurement tooling/documentation, +26 in runtime code, and one retired mock-baseline line removed.

The UI A/B inputs are exact baseline f29ecf310b2c103dcd9ae70db46df89395170d2b and candidate fdde14b601619f8c16cf12187f0db64fe346d73b, verified in the emitted source maps. Gateway bundles use fixed core ef6d500b534062f352aa6d7ceef01c97d907c511, with the candidate batch-protocol change on B. This isolates reload acquisition on the same core; it is not a complete latest-deployment latency comparison. In particular, the intervening operator-authority optimization in #179165 is absent on both sides.

The fixture has realistic roster/run/approval/project counts but only 8 MiB of transcript text; it tests reload acquisition, not multi-gigabyte storage throughput or model inference. First/final rows are observed DOM inventory milestones, not paint or authoritative-freshness claims. No sidebar rendering or activity-polling behavior changes.

Complete baseline RPC census: identical dashboard and chat counts, caller owners, and parameter keys

Every call was captured with an opaque per-document query identity and source-mapped stack. No method in this sample repeated the same complete parameters. Callers below summarize the mapped stacks; parameter values are omitted.

RPC Calls Distinct queries Caller owners Parameter keys
agent.identity.get 1 1 ui/src/app/assistant-identity.ts, ui/src/lib/agents/identity.ts, ui/src/pages/chat/chat-assistant-identity.ts, ui/src/pages/chat/chat-pane-context.ts agentId
agents.list 1 1 ui/src/app/app-host.tsx, ui/src/app/app-shell-gateway.ts, ui/src/app/app-shell-navigation.ts, ui/src/lib/agents/index.ts includeSessionPlacement
board.get 1 1 ui/src/lib/board/gateway-provider.ts, ui/src/lib/board/provider.ts, ui/src/pages/chat/chat-pane-board.ts, ui/src/pages/chat/chat-pane-lifecycle.ts agentId, sessionKey
chat.metadata 1 1 ui/src/lib/chat/chat-metadata-store.ts, ui/src/pages/chat/chat-state-refresh.ts agentId, includeModels
chat.startup 1 1 ui/src/pages/chat/chat-history-hydration.ts, ui/src/pages/chat/chat-history-request.ts knownState, limit, maxBytes, sessionKey, toolResultMaxChars
connect 1 1 ui/src/api/gateway.ts (connection handshake) caps, client, device, locale, maxProtocol, minProtocol, modelCatalog, role, scopes, userAgent
controlUi.sessionPullRequests.subscribe 3 3 ui/src/lib/gateway-set-sync-lifecycle.ts, ui/src/lib/session-pull-requests.ts passiveSessionKeys, sessionKeys
cron.list 1 1 ui/src/app/connection-bootstrap.ts, ui/src/components/sidebar-attention-store.ts, ui/src/lib/cron/jobs.ts agentId, compact, enabled, includeDeliveryPreviews, includeDisabled, limit, offset, sortBy, sortDir
cron.status 1 1 ui/src/app/connection-bootstrap.ts, ui/src/components/sidebar-attention-store.ts, ui/src/lib/cron/state.ts
exec.approval.list 1 1 ui/src/app/connection-bootstrap.ts, ui/src/app/exec-approval.ts, ui/src/app/gateway-observers.ts, ui/src/app/gateway-store.ts
mcp.app.discover 1 1 ui/src/lib/mcp-app-catalog.ts agentId, sessionKey
mentions.list 1 1 ui/src/app/mentions.ts
models.authStatus 1 1 ui/src/lib/model-auth.ts, ui/src/pages/chat/chat-pane-context.ts, ui/src/pages/chat/chat-pane-lifecycle.ts, ui/src/pages/chat/chat-pane-runtime-view.tsx agentId
openclaw.approval.list 1 1 ui/src/app/connection-bootstrap.ts, ui/src/app/exec-approval.ts, ui/src/app/gateway-observers.ts, ui/src/app/gateway-store.ts
plugin.approval.list 1 1 ui/src/app/connection-bootstrap.ts, ui/src/app/exec-approval.ts, ui/src/app/gateway-observers.ts, ui/src/app/gateway-store.ts
plugin.surface.refresh 1 1 ui/src/app/canvas-surface-lease.runtime.ts, ui/src/app/gateway-canvas-surface.ts observedUrl, surface
plugins.controlUi.list 1 1 ui/src/app/gateway-observers.ts, ui/src/app/gateway-store.ts, ui/src/plugins/control-ui-runtime.ts
plugins.controlUi.report 7 7 ui/src/plugins/control-ui-runtime.ts pluginId, revision, status
presence.activity 1 1 ui/src/app/gateway-observers.ts, ui/src/app/gateway-presence-activity.ts, ui/src/app/gateway-store.ts
progressCard.get 1 1 ui/src/lib/reactive/domain-keyed.ts, ui/src/lib/reactive/projection.ts, ui/src/lib/session-progress-cards.ts sessionKey
projects.list 1 1 ui/src/lib/projects.ts, ui/src/lib/reactive/parked-projection.ts, ui/src/lib/reactive/projection.ts, ui/src/pages/chat/chat-pane-runtime-view.tsx
question.list 1 1 ui/src/app/question-prompt-client.ts, ui/src/app/question-prompt.ts, ui/src/pages/chat/chat-pane-context.ts, ui/src/pages/chat/chat-pane-lifecycle.ts
session.discussion.info 1 1 ui/src/pages/chat/chat-pane-discussion.ts, ui/src/pages/chat/chat-pane-session.ts, ui/src/pages/chat/performance.ts agentId, sessionKey
session.members.listEvidence 1 1 ui/src/lib/reactive/parked-projection.ts, ui/src/pages/chat/chat-pane-header.ts, ui/src/pages/chat/chat-pane-layout-render.ts, ui/src/pages/chat/chat-pane-render.ts agentId, sessionKey
session.reactions.list 1 1 ui/src/lib/reactive/parked-projection.ts, ui/src/pages/chat/chat-pane-lifecycle.ts, ui/src/pages/chat/chat-pane-reactions.ts, ui/src/pages/chat/chat-pane-runtime-view.tsx sessionKey
sessions.branches.list 1 1 ui/src/lib/sessions/session-scoped-operations.ts, ui/src/pages/chat/chat-history-branches.ts, ui/src/pages/chat/chat-pane-session.ts, ui/src/pages/chat/performance.ts sessionKey
sessions.catalog.list 1 1 ui/src/app/connection-bootstrap.ts, ui/src/components/app-sidebar-session-catalog-live.ts, ui/src/components/session-data-catalog.ts, ui/src/components/session-data.ts agentId, allowPartialResults, limitPerHost, progressId
sessions.companion.state 1 1 ui/src/pages/chat/chat-pane-session.ts, ui/src/pages/chat/chat-pane-side-panels.ts, ui/src/pages/chat/chat-session-companion.ts, ui/src/pages/chat/performance.ts agentId, sessionKey
sessions.describe 9 9 ui/src/app/connection-bootstrap.ts, ui/src/components/app-sidebar-personal-navigation.ts, ui/src/lib/sessions/session-describe.ts, ui/src/pages/chat/chat-pane-active-resources.ts key
sessions.github.options 1 1 ui/src/lib/reactive/parked-projection.ts, ui/src/lib/sessions/github-publication-owner.ts, ui/src/pages/chat/chat-pane-render.ts, ui/src/pages/chat/chat-pane-runtime-view.tsx agentId, sessionKey
sessions.groups.defaults 1 1 ui/src/lib/sessions/session-group-catalog.ts
sessions.groups.list 1 1 ui/src/app/connection-bootstrap.ts, ui/src/lib/sessions/session-group-catalog.ts
sessions.list 4 4 ui/src/app/connection-bootstrap.ts, ui/src/components/session-data-events.ts, ui/src/components/session-data.ts, ui/src/components/sidebar-owner-session-counts.ts agentId, configuredAgentsOnly, excludeCron, excludeDock, excludeSubagents, excludeSystem, ifRowsRevision, includeDerivedTitles, includeGlobal, includeLastMessage, includeOwnerSessionCounts, includeUnknown, limit, ownerFirst, ownerId, rowMode, source, spawnedBy
sessions.messages.subscribe 1 1 ui/src/lib/sessions/session-scoped-operations.ts, ui/src/pages/chat/chat-history-subscription.ts, ui/src/pages/chat/chat-pane-context.ts, ui/src/pages/chat/chat-pane-lifecycle.ts includeApprovals, key, subscriptionId
sessions.observer.visibility 1 1 ui/src/app/bootstrap.ts, ui/src/app/connection-bootstrap.ts, ui/src/pages/chat/chat-observer.ts visible
sessions.resolve 1 1 ui/src/app-routes.ts, ui/src/app/bootstrap.ts, ui/src/app/stale-chunk-reload.ts, ui/src/app/startup-lifecycle.ts agentId, allowMissing, includeGlobal, includeUnknown, reference
sessions.subscribe 1 1 ui/src/app/gateway-observers.ts, ui/src/app/gateway-store.ts, ui/src/lib/sessions/index.ts, ui/src/lib/sessions/session-event-subscription.ts
sessions.viewers.set 1 1 ui/src/lib/gateway-set-sync-lifecycle.ts, ui/src/lib/session-viewer-presence.ts sessionKeys
system.info 1 1 ui/src/lib/system-info.ts, ui/src/pages/chat/chat-pane-session-menu.ts, ui/src/pages/chat/chat-pane-session.ts, ui/src/pages/chat/performance.ts
talk.catalog 1 1 ui/src/pages/chat/components/chat-composer.tsx, ui/src/pages/chat/composer-microphone-picker.ts sessionKey
talk.config 1 1 ui/src/pages/chat/components/chat-composer.tsx, ui/src/pages/chat/composer-microphone-picker.ts
taskSuggestions.list 1 1 ui/src/pages/chat/chat-pane-session.ts, ui/src/pages/chat/chat-pane-task-suggestions.ts, ui/src/pages/chat/performance.ts agentId
update.status 1 1 ui/src/app/connection-bootstrap.ts, ui/src/app/gateway-observers.ts, ui/src/app/gateway-store.ts, ui/src/app/overlays-updates.ts
users.list 1 1 ui/src/components/solid/identity-avatar-view.ts, ui/src/components/solid/identity-avatar.tsx, ui/src/lib/profile-directory.ts, ui/src/lib/reactive/projection.ts

Dashboard before

Dashboard after

Chat before

Chat after

@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review October 21, 2026 06:42
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T07:36:22.406805Z fdde14b New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts size: L labels Oct 21, 2026
@steipete
steipete force-pushed the steipete/perf-micro-reload-rpc-churn-20260919 branch from 97de262 to 33f054e Compare October 21, 2026 07:12
Reuse rows that arrive while personal pin lookups wait for foreground
bootstrap, and batch browser plugin activation receipts per catalog refresh.
Keep healthy plugins available immediately, preserve receipts across
superseding refreshes, and retain per-plugin revision validation.

Add a reproducible synthetic Gateway fixture and caller-attributed reload
census with separate RPC, LoAF, and sidebar inventory measurements.
Use the Gateway request-context factory in the mixed activation-batch test
instead of casting a partial context. Expect the complete receipt batch
after the peer deadline, and keep the plugin manager mounted while checking
its own pending Reload button. Prune the retired loader mock baseline entry.

The Gateway plugin-assets file passes all 22 tests and changed-file format
and source-only lint pass. CI owns the browser and test-type recheck.
The unrelated workboard lint-suppression inventory failure reproduces with
the same signature on the unchanged main parent.
@steipete
steipete force-pushed the steipete/perf-micro-reload-rpc-churn-20260919 branch from 33f054e to fdde14b Compare October 21, 2026 07:27
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 21, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR skips queued pin lookups when roster rows have arrived and batches browser plugin activation receipts.

Example: Reload chat with eight personal pins and seven browser plugins.

  • Before: The reported diagnostic baseline sends 63 RPCs, including seven separate activation reports.
  • After: The reported candidate sends 49 RPCs, including one activation batch, while retaining ten visible sidebar rows.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and has useful regression coverage; diagnostic product evidence exists, while required performance and upgrade validation remain incomplete.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Reloading dashboard and chat spends Gateway requests on pin data already supplied by the roster and separate browser activation receipts.
Reason: The maintainer-authored direction has measurable diagnostic request savings and reuses existing owners without adding a cache or application setting.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR provides a useful, maintainer-directed reduction in reload work, and no concrete introduced correctness defect was found.

Priority: P2
Reviewed head: fdde14b601619f8c16cf12187f0db64fe346d73b

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Complete the declared untraced paired dashboard/chat performance comparison and a latest-stable upgrade with existing pins and plugin settings intact.
Agent review details

How this fits together

The Control UI acquires session rows and plugin catalogs from the Gateway, renders navigation, and returns browser activation observations to the Gateway.

flowchart LR
  A[Dashboard or chat reload] --> B[Connection bootstrap]
  B --> C[Sidebar pin owner]
  C --> D[Loaded roster or descriptor RPC]
  A --> E[Plugin runtime]
  E --> F[Immediate plugin publication]
  E --> G[Batched activation receipts]
  G --> H[Gateway receipt validation]
Loading

Technical review

Best possible solution:

Keep the existing bootstrap and plugin-runtime owners, eliminate obsolete reads, and complete the required performance and upgrade validation.

Do we have a high-confidence way to reproduce the issue?

Current-main source shows queued descriptions without a loaded-row recheck and separate activation-report requests; the supplied real-Gateway census corroborates those paths, but this review ran no target code.

Is this the best way to solve the issue?

The implementation is focused: it checks existing row owners at dispatch, batches at the existing plugin runtime, removes the singular-report helper, and preserves Gateway validation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against b9c2e13b97c9.

Provenance checked

  • Queued pin descriptions keeps the original intent (86dc22d: Prioritize selected-conversation startup while retaining cached pins and eventual off-window descriptor refreshes.)
  • Plugin activation reporting changes intended behavior with a stated reason (6a97159: Record per-browser activation observations while keeping plugin lifecycle and Gateway admission authoritative; this PR explains replacing individual transport calls with one bounded batch.)
  • Packaged plugin delivery keeps the original intent (7aa077a: Load matching packaged assets from the UI origin and retire owners when delivery eligibility changes.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Introduced changes verified: The pinned introduction diff contains the queued-row recheck, batched receipt transport, matching Gateway/schema changes, consumer updates, and reproducible measurement tooling. (ui/src/plugins/control-ui-runtime.ts:310, fdde14b60161)
  • Current main still has the redundant paths: Fetched main retains the pre-change implementation in all four production owners; this PR's central optimization is not already implemented there. (ui/src/components/app-sidebar-personal-navigation.ts:166, b9c2e13b97c9)
  • Coupled transport change is intentional: The maintainer-authored body explicitly changes UI and Gateway payloads together; UI policy requires matched versions and rejects older-Gateway compatibility fallbacks. (ui/AGENTS.md:73, fdde14b60161)
  • Receipt boundary preserved: The handler checks the exact live Control UI client before synchronously validating each plugin revision; receipts remain observations stored against that client, not activation authority. (src/gateway/server-methods/plugins-control-ui.ts:24, fdde14b60161)
  • Full discussion and proof inspected: The full REST body and all discussion comments were read, including omitted body content associated with supplied source SHA256 2aa2f5e2efa502849c2d5db54b45431df7cef27193212d14a307014450d9a454. Both prepared images and all four current body screenshots were inspected. The body reports diagnostic RPC reductions but explicitly leaves the final paired timing campaign pending. (fdde14b60161)
  • Earlier pin scheduling intent retained: perf(control-ui): let chat load before pinned sessions #170047 explains why optional pin descriptions wait behind foreground startup; this PR preserves that scheduler and checks whether the queued work is still needed. (ui/src/components/app-sidebar-personal-navigation.ts:188, 86dc22dc4663)

Likely related people:

  • Peter Steinberger: Raw commit 6443c30 adds ui/src/components/app-sidebar-personal-navigation.ts:96 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 6443c30708da; files: ui/src/components/app-sidebar-personal-navigation.ts)

PR surface

Source +26, Tests +253, Docs +37, Other +396. Total +712 across 19 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 78 52 +26
Tests 10 331 78 +253
Docs 2 37 0 +37
Config 0 0 0 0
Generated 0 0 0 0
Other 3 404 8 +396
Total 19 850 138 +712

Review metrics

Metric Value Why it matters
Runtime versus regression coverage Runtime +78/−52 lines; tests +331/−78 lines. Runtime growth supports bounded batching, retained-owner receipts, and rejection attribution; tests cover scheduling, lifecycle, protocol bounds, and affected browser consumers.
Benchmark CLI additions 4 census options and 8 fixture options; 0 application settings. New knobs belong to reproducible measurement tooling and do not alter product defaults.

Labels

Label changes:

  • add P2: This reduces limited reload overhead without evidence of an urgent broken workflow.
  • add merge-risk: 🚨 compatibility: The activation-report wire envelope changes from singular to batched; the maintainer explicitly accepts the coupled UI/Gateway cutover under the matched-version contract.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: This reduces limited reload overhead without evidence of an urgent broken workflow.
  • merge-risk: 🚨 compatibility: The activation-report wire envelope changes from singular to batched; the maintainer explicitly accepts the coupled UI/Gateway cutover under the matched-version contract.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Provide the completed paired performance results and latest-stable upgrade evidence described in the proof assessment.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 21, 2026, 4:30 AM ET / 08:30 UTC.

@steipete

Copy link
Copy Markdown
Contributor Author

Landing this lane under the authorized inherited-CI-failure exception for exact head fdde14b601619f8c16cf12187f0db64fe346d73b. All three UI unit shards, all four browser shards, production types, touched test types, lint, and applicable dependency/security checks pass. Independent review is clean.

The two failing constituent jobs in run 39562170386 have baseline reproductions:

The aggregate CI gate remains red because of these two jobs. No CI rerun or unrelated source repair was used to chase green. This exception does not waive any product, review, or security finding; the PR body records the paired measurements and limitations.

@steipete
steipete merged commit fef5402 into main Oct 21, 2026
156 of 160 checks passed
@steipete
steipete deleted the steipete/perf-micro-reload-rpc-churn-20260919 branch October 21, 2026 09:07
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 22, 2026
* perf(ui): reduce dashboard and chat reload RPC fan-out

Reuse rows that arrive while personal pin lookups wait for foreground
bootstrap, and batch browser plugin activation receipts per catalog refresh.
Keep healthy plugins available immediately, preserve receipts across
superseding refreshes, and retain per-plugin revision validation.

Add a reproducible synthetic Gateway fixture and caller-attributed reload
census with separate RPC, LoAF, and sidebar inventory measurements.

* test(ui): align reload batching proofs with owner lifetimes

Use the Gateway request-context factory in the mixed activation-batch test
instead of casting a partial context. Expect the complete receipt batch
after the peer deadline, and keep the plugin manager mounted while checking
its own pending Reload button. Prune the retired loader mock baseline entry.

The Gateway plugin-assets file passes all 22 tests and changed-file format
and source-only lint pass. CI owns the browser and test-type recheck.
The unrelated workboard lint-suppression inventory failure reproduces with
the same signature on the unchanged main parent.

* test(ui): use loader spy in rebased publication test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant