Repository navigation
perf(ui): reduce idle native session catalog polling - #174404
Conversation
Refresh visible native catalogs every two minutes while retaining visibility catch-up, explicit refresh, retries, and progressive results. Remove the catalog-change event mode because the Gateway neither advertises nor emits that event. Fixture periodic calls fall from 2 to 0.5 per minute per tab; external discovery can take up to two minutes plus native indexing time.
|
🦞👀 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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 061a24c0e9
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Codex review: needs changes before merge. What this changesThis PR changes visible native-session catalog polling from 30 seconds to two minutes and removes an unused catalog-change event path. Example: A Control UI tab stays visible and idle for ten minutes with fast catalog responses.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open: it delivers a useful, maintainer-approved polling reduction that main does not contain, with no actionable code finding. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI session-data controller schedules catalog reads through the Gateway and merges local and paired-host results into sidebar rows. flowchart LR
A[Visible Control UI tab] --> B[Session data controller]
B --> C[Catalog refresh lifecycle]
C --> D[Gateway catalog RPC]
D --> E[Native catalog providers]
E --> F[Sidebar catalog rows]
F --> B
Technical reviewBest possible solution: Retain one two-minute catalog cadence with the existing visibility catch-up, explicit refresh, retry, and progressive-result lifecycle. Do we have a high-confidence way to reproduce the issue? Source establishes the existing 30-second polling path, and the supplied production-sidebar fixture reports the expected before/after request counts; no live Gateway reproduction was run during this review. Is this the best way to solve the issue? The small change uses the existing refresh owner, removes the unsupported event branch completely, and documents the accepted freshness tradeoff without adding another cache or setting. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against cee2191da55b. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -36, Tests +1, Docs +1. Total -34 across 21 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 Reviewed October 16, 2026, 12:46 PM ET / 16:46 UTC. |
|
Landed under the authorized unrelated-CI-failure exception for run 38932271626, head The sole failed file was The catalog regressions, UI E2E, UI performance, all types/lint/docs/security checks, and remaining planned jobs passed. Independent review is clean and the documentation review finding is resolved. No CI rerun or unrelated source change was used. Full attribution and timings are in the PR body. |
…158510 * commit '236ceb85e92ac8cb5bdc58a4a70bd79cbebd1094': (24 commits) feat(decisions): run typed tasks with prepared model credentials (#157225) fix(gateway): retain observer slots until model work settles (#174262) refactor(ui): own assistant content subscriptions in Solid (#174035) refactor(logging): remove package and snapshot debug instrumentation (#174431) fix: show native Talk speech separately from completed answers (#172598) test(ui): forbid new controller host consumers (#174446) chore(deps): refresh dependencies with a seven-day cutoff (#174410) perf(ui): reduce idle native session catalog polling (#174404) refactor(test): remove unused Signal fixture overrides (#174445) fix: surface DNS zone and Linux camera read failures (#174424) fix(doctor): keep at most three standalone Doctor captures (#174415) perf(cron): reuse session writer for completed run alias cleanup (#174413) feat(database): legacy SQLite migrations complete before PostgreSQL port (#174399) perf(channels): avoid rereading ingress queue mutations (#174393) feat(control-ui): keep link readers scoped to their pane session (#173652) test(ui): wait for desktop widget placement before pinning (#174439) refactor(ui): compose remaining plugin classes (#174441) perf(control-ui): shrink transcript overscan and settle skipped row sizes synchronously (#173690) fix(sessions): quietly settle archived delivery endpoints (#174442) perf(sessions): keep config loading out of transcript workers (#174414) ...
…esafe-decision-native * commit '236ceb85e92ac8cb5bdc58a4a70bd79cbebd1094': (24 commits) feat(decisions): run typed tasks with prepared model credentials (#157225) fix(gateway): retain observer slots until model work settles (#174262) refactor(ui): own assistant content subscriptions in Solid (#174035) refactor(logging): remove package and snapshot debug instrumentation (#174431) fix: show native Talk speech separately from completed answers (#172598) test(ui): forbid new controller host consumers (#174446) chore(deps): refresh dependencies with a seven-day cutoff (#174410) perf(ui): reduce idle native session catalog polling (#174404) refactor(test): remove unused Signal fixture overrides (#174445) fix: surface DNS zone and Linux camera read failures (#174424) fix(doctor): keep at most three standalone Doctor captures (#174415) perf(cron): reuse session writer for completed run alias cleanup (#174413) feat(database): legacy SQLite migrations complete before PostgreSQL port (#174399) perf(channels): avoid rereading ingress queue mutations (#174393) feat(control-ui): keep link readers scoped to their pane session (#173652) test(ui): wait for desktop widget placement before pinning (#174439) refactor(ui): compose remaining plugin classes (#174441) perf(control-ui): shrink transcript overscan and settle skipped row sizes synchronously (#173690) fix(sessions): quietly settle archived delivery endpoints (#174442) perf(sessions): keep config loading out of transcript workers (#174414) ...
…/decision-tool-v2-proof-20261016 * commit '236ceb85e92ac8cb5bdc58a4a70bd79cbebd1094': (24 commits) feat(decisions): run typed tasks with prepared model credentials (#157225) fix(gateway): retain observer slots until model work settles (#174262) refactor(ui): own assistant content subscriptions in Solid (#174035) refactor(logging): remove package and snapshot debug instrumentation (#174431) fix: show native Talk speech separately from completed answers (#172598) test(ui): forbid new controller host consumers (#174446) chore(deps): refresh dependencies with a seven-day cutoff (#174410) perf(ui): reduce idle native session catalog polling (#174404) refactor(test): remove unused Signal fixture overrides (#174445) fix: surface DNS zone and Linux camera read failures (#174424) fix(doctor): keep at most three standalone Doctor captures (#174415) perf(cron): reuse session writer for completed run alias cleanup (#174413) feat(database): legacy SQLite migrations complete before PostgreSQL port (#174399) perf(channels): avoid rereading ingress queue mutations (#174393) feat(control-ui): keep link readers scoped to their pane session (#173652) test(ui): wait for desktop widget placement before pinning (#174439) refactor(ui): compose remaining plugin classes (#174441) perf(control-ui): shrink transcript overscan and settle skipped row sizes synchronously (#173690) fix(sessions): quietly settle archived delivery endpoints (#174442) perf(sessions): keep config loading out of transcript workers (#174414) ...
…157433 * commit '3dd7f576829fd8ec1fd395acb59f3d4f9e999166': (24 commits) feat(decisions): run typed tasks with prepared model credentials (#157225) fix(gateway): retain observer slots until model work settles (#174262) refactor(ui): own assistant content subscriptions in Solid (#174035) refactor(logging): remove package and snapshot debug instrumentation (#174431) fix: show native Talk speech separately from completed answers (#172598) test(ui): forbid new controller host consumers (#174446) chore(deps): refresh dependencies with a seven-day cutoff (#174410) perf(ui): reduce idle native session catalog polling (#174404) refactor(test): remove unused Signal fixture overrides (#174445) fix: surface DNS zone and Linux camera read failures (#174424) fix(doctor): keep at most three standalone Doctor captures (#174415) perf(cron): reuse session writer for completed run alias cleanup (#174413) feat(database): legacy SQLite migrations complete before PostgreSQL port (#174399) perf(channels): avoid rereading ingress queue mutations (#174393) feat(control-ui): keep link readers scoped to their pane session (#173652) test(ui): wait for desktop widget placement before pinning (#174439) refactor(ui): compose remaining plugin classes (#174441) perf(control-ui): shrink transcript overscan and settle skipped row sizes synchronously (#173690) fix(sessions): quietly settle archived delivery endpoints (#174442) perf(sessions): keep config loading out of transcript workers (#174414) ...
…/decision-onnx-v2-proof-20261016 * commit '3dd7f576829fd8ec1fd395acb59f3d4f9e999166': (24 commits) feat(decisions): run typed tasks with prepared model credentials (#157225) fix(gateway): retain observer slots until model work settles (#174262) refactor(ui): own assistant content subscriptions in Solid (#174035) refactor(logging): remove package and snapshot debug instrumentation (#174431) fix: show native Talk speech separately from completed answers (#172598) test(ui): forbid new controller host consumers (#174446) chore(deps): refresh dependencies with a seven-day cutoff (#174410) perf(ui): reduce idle native session catalog polling (#174404) refactor(test): remove unused Signal fixture overrides (#174445) fix: surface DNS zone and Linux camera read failures (#174424) fix(doctor): keep at most three standalone Doctor captures (#174415) perf(cron): reuse session writer for completed run alias cleanup (#174413) feat(database): legacy SQLite migrations complete before PostgreSQL port (#174399) perf(channels): avoid rereading ingress queue mutations (#174393) feat(control-ui): keep link readers scoped to their pane session (#173652) test(ui): wait for desktop widget placement before pinning (#174439) refactor(ui): compose remaining plugin classes (#174441) perf(control-ui): shrink transcript overscan and settle skipped row sizes synchronously (#173690) fix(sessions): quietly settle archived delivery endpoints (#174442) perf(sessions): keep config loading out of transcript workers (#174414) ...
* refactor(memory): move overview into Memory Core * fix(memory): qualify Settings contract integration * fix(memory): prepare Settings presentation for UI-only delivery * test(ui): align catalog refresh clock with polling interval Match the two-minute refresh contract introduced by #174404 (fb6a79a). Keep the existing cursor replay, retained-host, and history assertions. * test(ui): exercise optional hover loading outside Chat Chat eagerly imports the hover provider since #173652 (8e95a76). Use the real About Docs link to retain the failed-download, reload, title fallback, no-card, and no-preview-RPC assertions. * test(ui): count nested assets in compression progress Include nested packaged plugin assets in the observed sidecar totals and emit nested fixture assets so the exact cadence and failure assertions cover this layout. * test(ui): type recursive compression filenames as UTF-8
* perf(ui): reduce idle native session catalog polling Refresh visible native catalogs every two minutes while retaining visibility catch-up, explicit refresh, retries, and progressive results. Remove the catalog-change event mode because the Gateway neither advertises nor emits that event. Fixture periodic calls fall from 2 to 0.5 per minute per tab; external discovery can take up to two minutes plus native indexing time. * docs(ui): align native catalog freshness guidance
…aw#174452) * refactor(memory): move overview into Memory Core * fix(memory): qualify Settings contract integration * fix(memory): prepare Settings presentation for UI-only delivery * test(ui): align catalog refresh clock with polling interval Match the two-minute refresh contract introduced by openclaw#174404 (bd43f1f). Keep the existing cursor replay, retained-host, and history assertions. * test(ui): exercise optional hover loading outside Chat Chat eagerly imports the hover provider since openclaw#173652 (adbbb40). Use the real About Docs link to retain the failed-download, reload, title fallback, no-card, and no-preview-RPC assertions. * test(ui): count nested assets in compression progress Include nested packaged plugin assets in the observed sidecar totals and emit nested fixture assets so the exact cadence and failure assertions cover this layout. * test(ui): type recursive compression filenames as UTF-8
What Problem This Solves
Every visible Control UI tab repeatedly enumerates native session catalogs, even when idle. The 30-second polling path is always used:
sessions.catalog.changedwas handled and mocked in the UI but is neither emitted nor advertised by the Gateway.User Impact
Idle catalog discovery drops from 2 to 0.5 requests per minute per visible tab. Sessions created outside OpenClaw can take up to two minutes, plus native discovery time, to appear while a tab remains visible. Returning to a hidden tab catches up through the existing paced refresh; explicit refreshes, catalog actions, reconnects, progressive host results, pagination, and retry behavior remain intact. Hidden tabs keep polling paused. There is no visual layout change.
Why This Change Was Made
Use one two-minute discovery cadence and delete the unused catalog-change event mode, its ten-minute safety branch, and its fixtures. Existing tests now exercise real visibility and refresh triggers. Production code: +3 / -39 lines (net -36); no new cache, configuration, server state, or protocol fields.
The accompanying audit found no periodic
models.listorsessions.describetimer in the Control UI. Metadata invalidations can fetch both as a pair; hidden panes already defer those reads and unchanged session model revisions retain cached choices. Some server catalog publications still emit broadchat.metadata.changednotifications without agent scope, so that remains a separate potential source of fan-out. This PR does not change those freshness contracts.Conditional unchanged responses are deferred: external native catalog mutations have no complete Gateway-owned revision, so comparing a result hash would still require provider enumeration. An untracked revision would risk hiding external changes.
Evidence
pnpm test <files> --maxWorkers=1:app-sidebar.catalog-events.test.ts,app-sidebar.catalog-discovery.test.ts,app-sidebar.catalog-import.test.ts,app-sidebar.catalog.test.ts, andapp-sidebar-session-catalog-live.test.ts. Combined wrapper wall time approximately 36 seconds; individual Vitest durations 6.81 s, 11.70 s for discovery/import together, 7.54 s for the existing catalog composition, and 1.43 s for progressive-host ownership.oxfmt, repositoryrun-oxlint.mjs, andgit diff --checkpassed. Existing Vite config and Solid tracking diagnostics appeared in focused tests; no test failures remain.061a24c0e91123bf658017efa85a2f7c695137a4passed all three UI shards, the selected UI E2E shard, Control UI performance, production/test type checks, lint, docs, and the planned Node/boundary/source-contract checks. The only failed jobs were the two inherited guards below. Final head1f721552bce887dd5e46d13e3c568d137fedf702completed run 38932271626: both earlier guards passed, as did UI shards 2/3 and 3/3, UI E2E, Control UI performance, types, lint, docs, security, and all remaining planned jobs. UI shard 1/3 failed only in the unrelated native harness file documented below. No Testbox/Crabbox lease or production-state benchmark was used.CI failure attribution
Run 38930298775 compared against an older scheduled main run and labeled both guard failures new. Focused reproduction against its actual main parent
bb642e181e130153894a45f141a5368123bcd487and tested merged5f894dae5c5e3574125048fac767b7a93d70b7cinstead reproduced both failures identically:check-guards: canonicalnode scripts/check-duplicates.mts --coverageexits 1 on both revisions becausecli-parent-lifetime.mjsis outside the scan targets and intentional excludes. The inventory-only mode stops before duplicate scanning.checks-fast-baseline-ratchets: the canonical mock scanner, parser, and import resolver, applied only tosrc/flows/doctor-plugin-source-captures.test.ts, reject its line 32 mock of../process/supervisor/darwin-bun-process-census.json both revisions. The same exact factory identity is absent from both baseline ledgers.This focused Linux proof verified 85 original source blobs and the full 56,600-path tracked inventory for each revision without a full checkout or suite run; the relevant guard, resolver, baseline, and offending source inputs are identical across base and merge. TypeScript and its native Linux binary were pinned to the repository version. All four expected guard rejections reproduced; the proof driver exited 0. These failures are not marked green.
The PR review identified two additional stale cadence references in the Anthropic provider and Codex specification docs. Both were corrected in
1f721552bce887dd5e46d13e3c568d137fedf702; changed-file formatting and independent review of that documentation delta passed, and the review thread is resolved.Final-head unrelated harness timeout
Run 38932271626, UI shard 1/3, reported one failed file and 625 passed files.
ui/src/test-helpers/control-ui-e2e-suite.test.tstimed out inscenario-timeoutafter its native Vitest child printed only its startup banner. Seven subsequent cases refused to reuse the unjoined fixture. The changed catalog tests in this shard passed. The failure table labeled this new against an older scheduled main run; it did not establish attribution to this PR.Focused attribution used
OPENCLAW_VITEST_RUNTIME=bun pnpm test ui/src/test-helpers/control-ui-e2e-suite.test.ts --maxWorkers=1, sequentially and without running a suite:1f721552bce887dd5e46d13e3c568d137fedf702aded33b0cef1a063fa68e6fb4e1fc4b099d04241The main-parent runs used the actual detached baseline in the task checkout, then restored the PR branch. Runtime and dependency manifests are identical; both use the same pinned Bun revision as CI (
1.4.3-canary.1+c45839085). The failing test, native fixture helper, process-shutdown owner, and test-state helper are identical between the CI main parent and tested merge4a558019759e6ca186837544b50ef277fab6dd41. This synthetic harness does not import or render the changed sidebar controllers, and no changed production code is on its path.This satisfies the authorized five-run baseline/head rule for an unrelated flake. The original Linux shard timeout remains unresolved; passing focused macOS replays do not claim a fix or a green CI run. Landing uses the unrelated-failure exception. No CI rerun, update-branch request, or unrelated repair commit was used.