Repository navigation
Control UI: parallelize session roster loads - #129175
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Live Control UI performance proofLive-tested exact head
The published 16.7-second video starts connected, rapidly switches the populated session roster, and ends on a real Codex response. The published final screenshot shows the connected exact build, Performance rows, Codex group, and real response. I inspected both captures; neither shows credentials or errors. Codex contract source was inspected directly at Focused local checks also passed: 18 unit tests, 2 browser E2E tests, UI typecheck, focused lint/format, bundle budgets, and high-effort Codex autoreview. The production diff is +15/-13 lines; total diff is net -1 line. Known harness note: the separate isolated Codex Vitest live wrapper stopped before provider admission because its temporary runtime omitted bundled plugin registration. The production Gateway proof above exercised the Codex harness successfully; that wrapper setup is a separate test-infrastructure follow-up. |
|
Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 5:06 AM ET / 09:06 UTC. ClawSweeper reviewWhat this changesThe PR starts the owner-only and shared initial session-roster requests concurrently, while keeping the owner rows visible before shared rows merge. Merge readinessKeep open. No concrete patch defect was found; this maintainer-authored, maintainer-labeled PR needs normal exact-head CI and merge-refresh handling rather than closure or an automated repair. Priority: P3 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — execution before step 1 Assertions:
How this fits togetherThe Control UI obtains session pages from the Gateway and publishes them as the signed-in user’s roster. The change alters initial request timing while retaining the roster’s existing owner-first publication and shared-row merge. flowchart LR
A[Control UI connects] --> B[Build roster refresh plan]
B --> C[Owner-only request]
B --> D[Shared roster request]
C --> E[Publish owner rows]
D --> F[Merge shared rows]
E --> F
F --> G[Visible session roster]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +2, Tests -3. Total -1 across 3 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the existing owner-boundary approach after a current-main merge refresh confirms the owner-first, queued-refresh, and reconnect tests still pass. Do we have a high-confidence way to reproduce the issue? Not applicable; this PR improves an existing roster-loading path rather than reporting a separately reproducible failure. Is this the best way to solve the issue? Yes. Starting both existing Gateway requests at the roster owner while retaining the established publication dependency is the narrowest way to remove the serial round-trip cost. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e7dbd5089adf. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Land-ready verificationApplied ClawSweeper's sole
Other land gates:
Known non-blocking test-infrastructure caveat: a separate isolated Codex Vitest wrapper stopped before provider admission because its temporary runtime omitted bundled plugin registration. The production Gateway Codex harness path passed with four concurrent real-provider sessions, so this does not indicate a product-path failure. Ready to land. |
|
Merged via squash.
|

What Problem This Solves
The signed-in Control UI roster loaded its owner-only and shared session pages serially. On a normal Gateway connection, users paid both RPC round trips before the complete session roster was ready, making startup and reconnect hydration slower as session counts grew.
Why This Change Was Made
The canonical roster owner now starts the owner-only and shared
sessions.listrequests together. The shared request still waits for the provisional owner publication before it may publish, preserving the existing owner-first visual ordering, canonical membership rules, connection fencing, queued refresh ordering, pagination, and retained-pane behavior.Non-primary queries and append requests remain single-load. This adds no protocol, config, polling, persistence, or compatibility surface.
User Impact
Signed-in roster request latency changes from approximately
owner RTT + shared RTTtomax(owner RTT, shared RTT). The owner roster still appears first, then the shared rows merge into it; repeated session switching and reconnect hydration retain their current behavior.Control UI production delta is +15/-13 lines. Test/E2E delta is +15/-18 lines. The complete PR is +30/-31 lines (net -1), and the built startup bundle is 379 bytes below the committed gzip baseline.
Evidence
Focused verification on exact head
71f994f356695a56efda196035b5d28f923f7f5f:node scripts/run-vitest.mjs run ui/src/lib/sessions/connection-hydration.test.ts— 18/18 passed.node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/session-owner-first.e2e.test.ts ui/src/e2e/chat-retained-pane-hydration.e2e.test.ts— 2/2 passed, including concurrent dispatch with owner-first publication and reconnect hydration of a retained pane.pnpm tsgo:ui— passed.oxlintandoxfmt --check— passed.pnpm ui:build— all bundle budgets passed; startup JS 332.0 KiB gzip, 379 B below baseline.gpt-5.6-sol, high) — clean, no accepted or actionable findings.Live proof used an isolated non-default Gateway, the freshly built Control UI, and real OpenAI API credentials:
openai/gpt-5.6-solOpenClaw turn returned its expected nonce.openai/gpt-5.6-lunaCodex sessions ran concurrently; every turn returned its unique nonce, reportedagentHarnessId: "codex", and used a distinct session ID.dist/control-uibyte-for-byte.Codex contract inspection used sibling source at
d52478c52ef09f001142a4b82339467c3880877f: app-server dispatches start and resume separately (codex-rs/app-server/src/message_processor.rs:1116-1149); fresh threads receive generated IDs and are rejected rather than aliased on collision (codex-rs/core/src/thread_manager.rs:128-155,codex-rs/core/src/thread_manager.rs:2008-2050); resume preserves the requested stored thread identity and auto-attaches its listener (codex-rs/app-server/src/request_processors/thread_processor.rs:3519-3637,thread_processor.rs:3780-3825); and each live thread owns an event loop whose translated notifications retain that thread ID, so events from concurrent threads can be demultiplexed after interleaving (codex-rs/app-server/src/request_processors/thread_lifecycle.rs:221-384,codex-rs/app-server/src/bespoke_event_handling.rs:143-187).Known harness note: the repository's separate isolated Codex Vitest live wrapper stopped before provider admission because its temporary prepared runtime omitted bundled plugin registration. The production Gateway proof above exercised the Codex harness successfully; the wrapper setup remains a separate test-infrastructure follow-up.