Repository navigation
fix(ui): gate system information at the shared reader - #160982
Conversation
|
🦞👀 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: needs maintainer review before merge. Reviewed October 2, 2026, 5:08 PM ET / 21:08 UTC (Revision 10). ClawSweeper reviewWhat this changesThe Control UI consolidates automatic host-information reads, suppresses requests without read access, rejects stale results, and repairs affected browser fixtures. Merge readiness✅ Ready for maintainer review The repair remains necessary on current main. The pinned patch has no actionable correctness findings, and the supplied browser-boundary proof supports the intended behavior. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI reads Gateway host information to display statistics, machine names, and platform-specific workspace actions. Its shared reader combines connection capabilities and operator grants before supplying those details to pages. flowchart TD
A[UI pages and chat menus] --> B[Shared host-information reader]
C[Connection and operator grants] --> B
B --> D{Read available?}
D -->|No| E[Unavailable presentation]
D -->|Yes| F[Shared Gateway request]
F --> G[Recheck connection and grants]
G --> H[Current host details]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +37, Tests +346. Total +383 across 22 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep one connection-scoped host-information reader that preserves authorized details and makes unavailable reads an intentional UI state. Do we have a high-confidence way to reproduce the issue? Yes: current-main source issues system.info reads without checking operator.read, and the supplied production-bundle scope scenario reports the denied session-only request. This review did not execute the reproduction. Is this the best way to solve the issue? Yes: the patch repairs the existing shared reader, removes competing request paths, and preserves authorized presentation using the established grant predicate. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4aa24e3a1340. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (9 earlier review cycles; latest 8 shown)
|
82ffb48 to
3703df1
Compare
caff65c to
18905f9
Compare
|
@clawsweeper re-review The PR body now reports exact-head CI duration for both changed test files: Devices 2.242 s (checks-ui 3/3), scoped chat E2E 7.881 s (checks-ui-e2e 8/9). Both were selected and passed; the body links the jobs and preserves the existing screenshot evidence. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Preserve authorized host details and foreground discovery while suppressing denied automatic reads. Retire cached and in-flight results when their connection or read scope changes, and remove the separate header cache. Co-authored-by: Patrick-Erichsen <[email protected]>
18905f9 to
56b4d3d
Compare
|
Rebased the isolated system-information repair onto main and completed the shared-reader cutover. Session-only chat-header 232 owner/caller tests pass; 18 production-bundle browser scenarios pass. Shared reads reject stale cached/in-flight results after permission or connection changes. Background-opened name/platform discovery resumes when presented, and delayed menu reads cannot overwrite a replaced connection. Menu opening remains immediate. No server grants were changed. Fresh independent review found no actionable defects. Attached in order: baseline session-only, repaired session-only, repaired read-only, and repaired admin. These captures use the production UI with a deterministic mock Gateway; they do not change a live identity or server grant. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Fixed the exact-head CI failure in Before: the unchanged browser scenario failed at the 432 MB memory assertion and rendered Unavailable. After: the same scenario passes and shows 432 MB / 25% CPU. All seven Debug/header scenarios pass (30.11 s), including the independent vitals polling and scope matrix. Fresh default-priority review is clean. The attached captures show the stale-fixture failure and corrected-fixture result from the production UI bundle with synthetic Gateway data. |
|
Reproduced and repaired the two browser-test failures from the final-head CI run. No production code changed.
Same production-bundle test command before: 2 failed, 11 passed. After: all 13 passed in 30.47 s. Fresh default-priority review is clean. Required changed checks are running before publication. Published as |
|
Merged via squash.
|
* commit '79be075e5aa46be9e42dbd53ed6e30e81469210a': (33 commits) fix(ui): keep selected-text comment input readable while scrolling (#163772) test(memory): open corpus database explicitly fix: bound Doctor migration capture to plugin data (#163780) fix(ui): gate system information at the shared reader (#160982) chore(db): reclassify worker inventory sites with caller evidence (#163754) refactor(channels): deslop Slack and Matrix (#163740) fix(agents): reject empty sessions_search queries in the tool schema (#129120) perf(nodes): load only what a worker turn needs (#160442) test(cli): assert concise Gateway failure copy in CLI process tests (#163649) refactor(discord): deslop discord (#163728) fix(workboard): make Sessions boards work on multi-agent Gateways (#163761) test(gateway): add sustained heap retention diagnostics (#163764) test(ui): disambiguate session filter controls refactor(plugins): deslop imessage, mattermost, and voice-call (#163767) fix(qa): run Telegram plugin source in --source-gateway userbot runs (#163718) feat(macos): add a --no-activate launch flag for background automation (#163758) fix(agents): preserve host authority across module reloads (#163725) perf(gateway): serve the listener before multi-gigabyte store validation and honor clean-close receipts at startup (#163690) fix: keep video widgets scrollable and preload initial frames (#163762) feat(memory): add a provider-neutral memory provider runtime (#162175) ...
* fix(ui): gate system information at the shared reader Preserve authorized host details and foreground discovery while suppressing denied automatic reads. Retire cached and in-flight results when their connection or read scope changes, and remove the separate header cache. Co-authored-by: Patrick-Erichsen <[email protected]> * test(ui): advertise system information in browser fixtures * test(ui): target catalog and sidebar requests precisely --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: Patrick-Erichsen <[email protected]> Co-authored-by: Patrick Erichsen <[email protected]>
* commit '1fda703fb4d3630e4633461967b2a2186e8f15fd': (33 commits) fix(ui): keep selected-text comment input readable while scrolling (openclaw#163772) test(memory): open corpus database explicitly fix: bound Doctor migration capture to plugin data (openclaw#163780) fix(ui): gate system information at the shared reader (openclaw#160982) chore(db): reclassify worker inventory sites with caller evidence (openclaw#163754) refactor(channels): deslop Slack and Matrix (openclaw#163740) fix(agents): reject empty sessions_search queries in the tool schema (openclaw#129120) perf(nodes): load only what a worker turn needs (openclaw#160442) test(cli): assert concise Gateway failure copy in CLI process tests (openclaw#163649) refactor(discord): deslop discord (openclaw#163728) fix(workboard): make Sessions boards work on multi-agent Gateways (openclaw#163761) test(gateway): add sustained heap retention diagnostics (openclaw#163764) test(ui): disambiguate session filter controls refactor(plugins): deslop imessage, mattermost, and voice-call (openclaw#163767) fix(qa): run Telegram plugin source in --source-gateway userbot runs (openclaw#163718) feat(macos): add a --no-activate launch flag for background automation (openclaw#163758) fix(agents): preserve host authority across module reloads (openclaw#163725) perf(gateway): serve the listener before multi-gigabyte store validation and honor clean-close receipts at startup (openclaw#163690) fix: keep video widgets scrollable and preload initial frames (openclaw#163762) feat(memory): add a provider-neutral memory provider runtime (openclaw#162175) ...
* refactor(ui): consolidate page rendering and trim speculative recovery Reuse the canonical retained Lit-content owner for the composer, resolve New Session defaults through one owner, filter palette choices once, and render stacked/total usage bars through one rectangle path. Supported rendering, features, authorization and both migration paths remain intact. Remove duplicate warm-prefetch alias-clock validation and the debug panel's within-animation remeasurement/retargeting; keep their existing owners. Best-effort tradeoffs accepted: - Remove the companion post-rejoin history barrier from #125107. The synthetic initial-read/rejoin timing window has no cited human incident; a racing row appears on the next refresh/reopen/reconnect. Keep stable IDs, durable history, live wizard state and ambiguous-turn non-replay. - Remove old-Gateway system.info error classification from #114971. Core methods already share version and advertisement/read admission (#160982); unexpected unknown-method errors now remain visible and retry normally. - Remove warm-prefetch alias-clock comparisons from #137947's synthetic scenario. An unopened cached transcript may lag; foreground open still revalidates its cursor and retains account/identity/deletion ownership. - Remove debug body-size retargeting from #162315's synthetic E2E. A size change within the 160ms animation settles at finish; ordinary animation, reduced motion, drag/resize and same-mode continuity stay. Remove unused reconnect() left by the completed #170758 Solid cutover. Net production reduction: 181 lines; remove 107 mechanism-only test lines. Focused retained page/owner tests: 216 passed; synthetic capture: 1 passed. Expanded/minimized Debug frames are byte-identical before/after, inspected and synthetic. No changelog, schema, protocol, dependency or config change. * refactor(ui): consolidate sidebar and overlay presentation Use reactive JSX props for sidebar adapters, share rendered-ancestry observation between tooltips and hovercards, and consolidate picker placement and fixed menu rows. Keep the Lit/Solid shipping paths, DOM classes, text, authorization, focus, resource handling, and asynchronous overlay animation generations unchanged. Best-effort tradeoffs accepted: - Same-call show/hide listeners replacing or disconnecting their overlay no longer have intent-token fencing; the next ordinary request reconciles state. - Reopening from a native-close callback no longer triggers compensating reopen; the accepted close wins until a later ordinary user request. - Recursive self-retirement from a hide callback has no separate retirement protocol; ordinary disposal and descendant retirement are retained. - Children created during the parent's native-close callback receive no second late-child sweep; normal descendants retire before native mutation. These removed mechanisms came from synthetic callback cases in #169128, with no cited human actual-use incident. Preserve ordinary veto and browser input behavior; remove only the tests that pin the retired synchronous protocols. * refactor(ui): retain getter calls for new-session links * test(ui): align companion rejoin request expectation * refactor(ui): retain main overlay behavior after inconclusive replays * refactor(ui): retain main agent switcher after inconclusive replay Drop the agent-menu avatar/property cleanup after the WebKit scroll case failed in bundle CI but passed focused replays at both head and main. Preserve main's implementation under the coordinator's conservative-cut rule; do not claim the browser failure repaired.
…72582) * refactor(ui): consolidate page rendering and trim speculative recovery Reuse the canonical retained Lit-content owner for the composer, resolve New Session defaults through one owner, filter palette choices once, and render stacked/total usage bars through one rectangle path. Supported rendering, features, authorization and both migration paths remain intact. Remove duplicate warm-prefetch alias-clock validation and the debug panel's within-animation remeasurement/retargeting; keep their existing owners. Best-effort tradeoffs accepted: - Remove the companion post-rejoin history barrier from openclaw#125107. The synthetic initial-read/rejoin timing window has no cited human incident; a racing row appears on the next refresh/reopen/reconnect. Keep stable IDs, durable history, live wizard state and ambiguous-turn non-replay. - Remove old-Gateway system.info error classification from openclaw#114971. Core methods already share version and advertisement/read admission (openclaw#160982); unexpected unknown-method errors now remain visible and retry normally. - Remove warm-prefetch alias-clock comparisons from openclaw#137947's synthetic scenario. An unopened cached transcript may lag; foreground open still revalidates its cursor and retains account/identity/deletion ownership. - Remove debug body-size retargeting from openclaw#162315's synthetic E2E. A size change within the 160ms animation settles at finish; ordinary animation, reduced motion, drag/resize and same-mode continuity stay. Remove unused reconnect() left by the completed openclaw#170758 Solid cutover. Net production reduction: 181 lines; remove 107 mechanism-only test lines. Focused retained page/owner tests: 216 passed; synthetic capture: 1 passed. Expanded/minimized Debug frames are byte-identical before/after, inspected and synthetic. No changelog, schema, protocol, dependency or config change. * refactor(ui): consolidate sidebar and overlay presentation Use reactive JSX props for sidebar adapters, share rendered-ancestry observation between tooltips and hovercards, and consolidate picker placement and fixed menu rows. Keep the Lit/Solid shipping paths, DOM classes, text, authorization, focus, resource handling, and asynchronous overlay animation generations unchanged. Best-effort tradeoffs accepted: - Same-call show/hide listeners replacing or disconnecting their overlay no longer have intent-token fencing; the next ordinary request reconciles state. - Reopening from a native-close callback no longer triggers compensating reopen; the accepted close wins until a later ordinary user request. - Recursive self-retirement from a hide callback has no separate retirement protocol; ordinary disposal and descendant retirement are retained. - Children created during the parent's native-close callback receive no second late-child sweep; normal descendants retire before native mutation. These removed mechanisms came from synthetic callback cases in openclaw#169128, with no cited human actual-use incident. Preserve ordinary veto and browser input behavior; remove only the tests that pin the retired synchronous protocols. * refactor(ui): retain getter calls for new-session links * test(ui): align companion rejoin request expectation * refactor(ui): retain main overlay behavior after inconclusive replays * refactor(ui): retain main agent switcher after inconclusive replay Drop the agent-menu avatar/property cleanup after the WebKit scroll case failed in bundle CI but passed focused replays at both head and main. Preserve main's implementation under the coordinator's conservative-cut rule; do not claim the browser failure repaired.






What Problem This Solves
Fixes: Session-only operators trigger denied host-information reads when opening chat, Devices, Connection settings, Appearance, New Session, or System busyness.
User Impact
User impact: These views remain usable without host-information access. Authorized readers retain host statistics, platform labels, shared polling, and platform-specific workspace actions, including pages opened in the background. Server scopes and grants are unchanged; no migration or configuration action is required.
Why This Change Was Made
All automatic
system.inforeads now use the existing shared reader and the Gateway's advertised method plusoperator.readgrant. The reader also checks the current connection and permissions before exposing cached or delayed results. This removes the chat header's permanent per-client cache and the separate advertisement-only helper; presentation gates stop unavailable polling.Evidence
Current chat-header scope proof.
Catalog/sidebar test repair evidence.
Debug fixture before/after proof.
Before editing, the mounted Devices regression and eight shared-reader cases failed on current main. The bundled chat-header test sent one denied
system.inforequest for session-only scopes. After the repair it sends zero; read-only and read+admin each send one, and admin retains Reveal in Finder.232 tests across ten owner/caller files passed with
--maxWorkers=1: the final main run took 17.21 s wall and the Config observer run took 2.88 s. Coverage includes cached/in-flight retirement, shared cancellation, reconnect/provider changes, authorized polling, Appearance, Debug, and New Session. Regression cases also prove background-to-visible resumption and delayed header results after connection replacement; both foreground-resume cases failed before their lifecycle repair.18 production-bundle browser scenarios passed in 23.89 s across the dedicated chat-header, Systems workspace, and New Session suites. The harness rebuilt the bundle before running. Synthetic mock-Gateway request observations and inspected screenshots establish UI behavior; this run did not alter a live identity or Gateway.
CI exposed a stale shared browser fixture: it supplied
system.inforesponses without advertising the method. The unchanged Debug diagnostics flow reproduced the failure locally; adding the current core method to the default mock catalog restores it. Seven Debug/header browser scenarios pass in 30.11 s, including vitals while session-list reads are held. No production change was needed.Broader CI exposed two test-target defects: the Models publication flow released an earlier Appearance prepared-only request, and the sidebar owner filter matched the distinct People filter. Both reproduced locally (2 failed / 11 passed); after targeting the Models projection and exact sessions control, all 13 scenarios passed in 26.48 s on the final typed candidate. Production and behavioral assertions remain unchanged. Final changed-file checks and fresh default-priority review also passed.
check:changedpassed all gates, including eight core test type graphs, production UI typecheck, format, coercion, unused-export scans, and changed-file lint.Independent Codex review: no P0–P2 findings; final default-priority review also found no actionable findings after foreground-resume and type-import fixes. Final-head CI passed at
2bbaedb4490f743345b28cbfdb3a8be0ae857127, including every bundled and both real-Gateway browser shards.The original Devices before/after images below are retained as historical evidence from
18905f968ad5; they are pixel-identical because this is a request-suppression fix. Current chat-header proof likewise preserves the menu while reducing denied traffic.Before

After

Review notes and proof scope
The architectural owner is
ui/src/lib/system-info.ts; all automatic UI requests now converge there. The existingcanCallGatewayMethodand shared operator-scope implications remain authoritative in the renderer. The server descriptor still requiresoperator.read.Production delta: +37 lines (103 added, 66 removed); tests and test support: +346 lines. Growth adds final owner/permission validation, stops unavailable compact-tray polling, and resumes deferred foreground reads, while removing duplicate caches and gates. Header menu opening remains immediate while the existing reactive platform label updates asynchronously. No config, protocol, dependency, or stored-data surface changes.
ClawSweeper revision 9 reviewed final head
2bbaedb4490fon October 2 at 20:55 UTC: no actionable findings, before-merge actions, or Rank-up moves; browser proof accepted. The local measurements above apply to the repaired candidate; the final test-target repairs are included in that review. Final-head CI also passed.Named follow-up: chat workspace-menu loading still issues
worktrees.list/worktrees.brancheswithout corresponding read/write presentation gates. Those separate methods retain server authorization and are outside this system-information owner repair.Contributor credit: Patrick requested the audit-backed repair.
Work sessions
Final-head CI test cost
Measured from passing jobs in CI run 37063152814, source
2bbaedb4490f743345b28cbfdb3a8be0ae857127. These are per-file test durations, not job setup or build time.ui/src/pages/new-session/draft-place-browser.test.tsui/src/lib/system-info.test.tsui/src/pages/debug/debug-overlay-access.test.tsui/src/pages/devices/devices-page.test.tsui/src/pages/connection/connection-page.test.tsui/src/pages/config/config-page.session-observer.test.tsui/src/pages/chat/chat-pane-system-info.test.tsui/src/e2e/model-providers-progressive.e2e.test.tsui/src/e2e/session-owner-filter-header.e2e.test.tsui/src/e2e/chat-header-system-info.e2e.test.tsCurrent main independently received the identical two sidebar locator corrections in
12e5f8dac63c; the shared-reader and Models test repairs remain necessary.The combined required status needed one security-workflow rerun after GitHub temporarily omitted the completed run from its workflow-list response. Both required
openclaw/ci-gateentries then passed on the same source head.