fix(control-ui): keep channel statuses responsive#80657
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path. Real behavior proof Next step before merge Review detailsBest possible solution: Retry the Codex review after fixing the execution failure. Do we have a high-confidence way to reproduce the issue? Unclear. The review failed before ClawSweeper could establish a reproduction path. Is this the best way to solve the issue? Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 4bb7acd88b42. |
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
071fb76 to
3d2466f
Compare
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
There was a problem hiding this comment.
Pull request overview
This PR targets progressive Control UI sluggishness by reducing background churn and preventing slow channel-status/probe work (and off-tab config schema normalization) from blocking tab paints or overwriting newer UI snapshots.
Changes:
- Pre-scope config schemas before analysis/rendering so off-tab sections aren’t normalized during scoped-tab paints.
- Keep Channels navigation on a fast cached/runtime status path, while protecting UI state from stale/slow probe completions.
- Reduce background load by scoping Nodes polling to the Nodes tab, debouncing
sessions.changedreconciliation reloads, and bounding chat-driven session refreshes.
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ui/src/ui/views/config.ts | Pre-scope schema sections before analyzeConfigSchema to avoid off-tab normalization work. |
| ui/src/ui/views/config.browser.test.ts | Adds regression coverage for scoped schema normalization avoidance. |
| ui/src/ui/controllers/channels.types.ts | Extends channels state with probe/loading sequencing fields. |
| ui/src/ui/controllers/channels.ts | Adds refresh sequencing + stale-probe guarding so slow probes can’t overwrite newer snapshots. |
| ui/src/ui/controllers/channels.test.ts | Adds test ensuring stale probes don’t replace newer non-probe snapshots. |
| ui/src/ui/chat/session-controls.ts | Bounds session option refresh to a limited recent window. |
| ui/src/ui/app.ts | Adds host field for debounced sessions.changed reload timer. |
| ui/src/ui/app-settings.ts | Stops auto live-probe on Channels tab load; scopes Nodes polling to Nodes tab; clears pending session reload timers on tab change. |
| ui/src/ui/app-settings.refresh-active-tab.node.test.ts | Updates/extends tests for Channels load behavior, Nodes polling scoping, and timer clearing. |
| ui/src/ui/app-render.ts | Bounds session list refresh when navigating to Sessions from chat-related UI. |
| ui/src/ui/app-render.helpers.ts | Uses bounded sessions refresh options in chat session creation / option refresh. |
| ui/src/ui/app-render.helpers.node.test.ts | Updates expectations for bounded sessions refresh parameters. |
| ui/src/ui/app-polling.ts | Introduces a 30s Nodes polling interval and guards polling by active tab. |
| ui/src/ui/app-polling.node.test.ts | Adds coverage for “don’t poll nodes unless Nodes tab is active”. |
| ui/src/ui/app-lifecycle.ts | Starts Nodes polling only if connected on Nodes tab; clears pending session reload timer on disconnect. |
| ui/src/ui/app-lifecycle.node.test.ts | Adds teardown coverage for clearing pending session reload timers. |
| ui/src/ui/app-lifecycle-connect.node.test.ts | Tests Nodes polling starts only when Nodes tab is active on connect. |
| ui/src/ui/app-gateway.ts | Debounces session reconciliation reloads after unapplied sessions.changed events; bounds chat-side session refresh limit. |
| ui/src/ui/app-gateway.sessions.node.test.ts | Adds tests for debounce/coalescing and skip-conditions (chat/disconnect). |
| ui/src/ui/app-gateway.node.test.ts | Adds coverage for clearing pending session reload timers on client close. |
| ui/src/ui/app-gateway-chat-load.node.test.ts | Ensures hello handling doesn’t eagerly load nodes/devices; defers to active-tab refresh. |
| ui/src/ui/app-chat.ts | Introduces shared constant for bounded chat-side sessions refresh limit. |
| ui/src/ui/app-chat.test.ts | Updates assertions for bounded sessions refresh payload. |
| src/gateway/server-methods/channels.ts | Adds bounded/timed summary building + preserves lastError when probe/audit returns failures. |
| src/gateway/server-methods/channels.status.test.ts | Adds coverage for preserving account rows on probe throw and summary fallback behavior. |
| CHANGELOG.md | Documents Control UI responsiveness/performance improvements. |
|
@copilot apply changes based on the comments in this thread |
Applied the review-thread follow-ups in commits |
Summary
Related work
Verification
origin/main(338fbd8bfd).git log --show-signature --max-count=3confirms all branch commits have good SSH signatures for[email protected].gh api repos/openclaw/openclaw/commits/<sha> --jq '.commit.verification'reportsverified=true,reason=validfor112955b6a0,d9f0eaa3e5, and3d2466fe40.pnpm test ui/src/ui/app-polling.node.test.ts ui/src/ui/app-gateway.sessions.node.test.ts ui/src/ui/app-settings.refresh-active-tab.node.test.ts ui/src/ui/app-lifecycle.node.test.ts ui/src/ui/app-lifecycle-connect.node.test.ts ui/src/ui/app-gateway-chat-load.node.test.ts ui/src/ui/app-gateway.node.test.ts ui/src/ui/app-chat.test.ts ui/src/ui/app-render.helpers.node.test.tspnpm test ui/src/ui/app-channels.test.ts ui/src/ui/controllers/channels.test.ts ui/src/ui/app-settings.refresh-active-tab.node.test.ts ui/src/ui/app-gateway.sessions.node.test.ts ui/src/ui/app-lifecycle-connect.node.test.ts ui/src/ui/controllers/sessions.test.ts ui/src/ui/views/config.browser.test.ts src/gateway/server-methods/channels.status.test.ts src/gateway/control-ui.http.test.ts ui/src/ui/app-polling.node.test.tspnpm exec oxfmt --check --threads=1 <changed TS files>git diff --check origin/main...HEADpnpm changed:lanes --jsonreportedcore,coreTests,docspnpm check:changedNotes