Skip to content

fix(control-ui): keep channel statuses responsive#80657

Merged
BunsDev merged 6 commits into
mainfrom
meow/control-ui-responsiveness-signed
May 11, 2026
Merged

fix(control-ui): keep channel statuses responsive#80657
BunsDev merged 6 commits into
mainfrom
meow/control-ui-responsiveness-signed

Conversation

@BunsDev

@BunsDev BunsDev commented May 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Pre-scope scoped Control UI config schemas before analysis so off-tab sections are not normalized during Communications/Appearance-style tab paints.
  • Keep Channels tab navigation on the fast runtime/cached status path, while manual Probe remains the live network check path.
  • Preserve channel account rows when probe/summary status hooks fail or exceed the status budget, keep stale slow probes from replacing newer non-probe snapshots, scope Nodes polling to the active Nodes tab, debounce stale session-list reconciliation, and bound chat-side session refreshes.

Related work

Verification

  • Rebased onto current origin/main (338fbd8bfd).
  • git log --show-signature --max-count=3 confirms all branch commits have good SSH signatures for [email protected].
  • gh api repos/openclaw/openclaw/commits/<sha> --jq '.commit.verification' reports verified=true, reason=valid for 112955b6a0, d9f0eaa3e5, and 3d2466fe40.
  • 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.ts
  • pnpm 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.ts
  • pnpm exec oxfmt --check --threads=1 <changed TS files>
  • git diff --check origin/main...HEAD
  • pnpm changed:lanes --json reported core, coreTests, docs
  • pnpm check:changed

Notes

  • This intentionally keeps Logs live-tail cadence unchanged while the Logs tab is active; the churn reduction comes from active-tab scoping, slower Nodes polling, stale-tab guards, and bounded/debounced session refreshes.
  • ClawSweeper reviewed the previous signed head and found no discrete blocker; it requested normal maintainer review before merge.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime size: L labels May 11, 2026
@openclaw-barnacle openclaw-barnacle Bot added the maintainer Maintainer-authored PR label May 11, 2026
@BunsDev BunsDev self-assigned this May 11, 2026
@clawsweeper

clawsweeper Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

Summary
Review failed before ClawSweeper could summarize the requested change.

Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path.

Real behavior proof
Not applicable: Real behavior proof was not assessed because the Codex review failed.

Next step before merge
Review did not complete, so no work-lane recommendation was made.

Review details

Best 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:

  • failure reason: codex execution failed.
  • codex failure detail: Codex review failed for this PR with exit 1.
  • codex stdout: Per-item Codex failure; continuing with the rest of the shard.

Likely related people:

  • unknown: Codex failed before it could trace repository history. (role: review did not complete; confidence: low)

Remaining risk / open question:

  • No close action taken because the review did not complete.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 4bb7acd88b42.

@BunsDev

BunsDev commented May 11, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@BunsDev
BunsDev requested a review from Copilot May 11, 2026 15:00
@BunsDev
BunsDev force-pushed the meow/control-ui-responsiveness-signed branch from 071fb76 to 3d2466f Compare May 11, 2026 15:03
@BunsDev
BunsDev marked this pull request as ready for review May 11, 2026 15:04
@BunsDev

BunsDev commented May 11, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.changed reconciliation 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.

Comment thread src/gateway/server-methods/channels.ts
Comment thread ui/src/ui/app-polling.node.test.ts
@BunsDev

BunsDev commented May 11, 2026

Copy link
Copy Markdown
Contributor Author

@copilot apply changes based on the comments in this thread

Copilot AI commented May 11, 2026

Copy link
Copy Markdown
Contributor

@copilot apply changes based on the comments in this thread

Applied the review-thread follow-ups in commits cbbee9be and 0e3821c0: extracted a shared timeout race helper for channel status hook/summary paths and fixed app-polling.node.test.ts cleanup to stop the real test host interval in afterEach. Re-ran pnpm test src/gateway/server-methods/channels.status.test.ts ui/src/ui/app-polling.node.test.ts and validation is clean.

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 gateway Gateway runtime maintainer Maintainer-authored PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants