Skip to content

refactor(ui): make sessions and navigation reliable across reconnects - #117103

Merged
steipete merged 2 commits into
mainfrom
codex/control-ui-architecture-reassessment
Jul 31, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/control-ui-architecture-reassessment

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Control UI sessions, chat panes, agents, and nodes could retain stale asynchronous work across gateway reconnects or client replacement, while the application shell and session capability had grown beyond 2,000 lines each. That made reconnect behavior harder to reason about, left agent-file loading indicators stuck after disconnect, and allowed obsolete authentication or navigation handoffs to overwrite current connection state.

Why This Change Was Made

Establish one shared connection-epoch ownership contract and one shared retry owner, then split the oversized session and application-shell modules into focused owners with explicit, compiler-checked boundaries. Session observation, roster refresh, navigation, rendering, shell chrome, gateway synchronization, and workboard lifecycle retain their existing product contracts while rejecting work from retired connections.

User Impact

Sessions stay visible and correctly selected while the gateway reconnects, even when users rapidly switch chats. Agent-file loading state clears reliably after disconnect, stale authentication responses cannot overwrite the new connection, and navigation cannot consume a handoff from a retired gateway connection.

Evidence

  • Complete remote Control UI regression suite: 7,624 tests passed across 521 test files.
  • Focused owner regression run: 324 tests passed across 23 Control UI owner test files.
  • Real Chromium coverage: 27 browser tests passed across four end-to-end suites, including rapid A→B→A reconnect navigation, one acknowledged observer per connection, selected-route preservation, and refreshed sidebar content.
  • Both previously grandfathered oversized modules now meet the normal 700-line limit: application shell 2,331 → 601 lines; session owner 2,101 → 478 lines. Their max-lines baseline exemptions were removed.
  • Fresh independent structured architecture review: no accepted or actionable findings.
  • Remote validation passed the complete changed-code/type/lint gate, full production build, plugin SDK export checks, finalized UI asset checks, and Control UI startup-performance budgets.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XL maintainer Maintainer-authored PR labels Jul 31, 2026
@steipete
steipete marked this pull request as ready for review July 31, 2026 23:18
@steipete
steipete merged commit 7bae247 into main Jul 31, 2026
97 checks passed
@steipete
steipete deleted the codex/control-ui-architecture-reassessment branch July 31, 2026 23:36
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 1, 2026
…openclaw#117103)

* refactor(ui): consolidate connection ownership and split control shell

* fix(ui): keep terminal session contract with reconciliation owner
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 maintainer Maintainer-authored PR size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant