Repository navigation
refactor(ui): unify filtered session list ownership - #117158
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 31, 2026, 10:04 PM ET / August 1, 2026, 02:04 UTC. ClawSweeper reviewWhat this changesThis PR moves filtered Control UI session-list refresh, pagination, invalidation, and reconnect handling into the shared session capability, deleting the sidebar-specific owner. Merge readinessThe branch consolidates archived/all sidebar list ownership into the existing session capability rather than keeping a duplicate sidebar paginator. It is still necessary because current main does not contain this consolidation; keep it open for normal maintainer review because the protected Priority: P2 Review scores
Verification
How this fits togetherThe Control UI obtains session lists and events from the Gateway through a shared session capability. The sidebar and Sessions page consume those lists, so agent changes, filters, pagination, reconnects, and session events must update the correct scoped snapshot without stale results returning. flowchart LR
Gateway[Gateway session lists and events] --> Capability[Shared session capability]
Capability --> Active[Active session roster]
Capability --> Filtered[Archived and All scoped rosters]
Active --> Controller[Session data controller]
Filtered --> Controller
Controller --> Sidebar[Sidebar thread list]
Controller --> SessionsPage[Sessions page]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -74, Tests +68. Total -6 across 12 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Use the shared session capability as the sole owner for active, archived, and all filtered list lifecycle, then land after exact-head CI confirms no regression across filter changes, pagination, and reconnects. Do we have a high-confidence way to reproduce the issue? No independent failing current-main run was performed in this read-only review. The branch provides a clear source-level path and focused regression fixtures for filter changes, reconnects, pagination, and delayed results. Is this the best way to solve the issue? Yes. Centralizing filtered-list state in the existing session capability is a better owner boundary than retaining a separate sidebar pagination controller; the controller becomes a scoped consumer rather than a second lifecycle owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fdcb321bfaaa. 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
|
|
Merged via squash.
|
* origin/main: (3706 commits) refactor(ui): unify filtered session list ownership (openclaw#117158) refactor(agents): consolidate context budgets and compaction recovery (openclaw#117149) fix(net-policy): redact sig and x-* auth params in URLs and bodies (openclaw#116957) refactor(agents): remove duplicate generated-media delivery fallbacks (openclaw#117150) refactor(reply): unify turn lifecycle state ownership (openclaw#117145) fix(ui): preserve emoji agent avatar initials (openclaw#104912) refactor(auto-reply): unify command and directive ownership (openclaw#117143) refactor(plugins): consolidate descriptor and startup ownership (openclaw#117146) fix(messages): reply actions leak citation markers and reply/poll answers draw the no-reply fallback (openclaw#116909) fix(slack): let durable ingress retry transient thread lookups (openclaw#117135) refactor(doctor): consolidate shipped state migration ownership (openclaw#117142) fix(ai): Codex stream shows internal parser text on a malformed frame (openclaw#116966) fix: guard every migrated session accessor path (openclaw#117140) fix(terminal): measure unicode display width consistently (openclaw#117062) fix(openai): clear ChatGPT SSE fallback per session (openclaw#117123) fix(mistral): reject incomplete streamed tool terminals (openclaw#117137) fix(ai): preserve structured chat content and refusals (openclaw#117136) fix(doctor): persist normalized agent roster (openclaw#117115) fix(signal): avoid replay after ambiguous quote delivery errors (openclaw#117134) fix(cron): reject disabled delivery accounts when scheduling (openclaw#116899) ...
* commit '7e78de747b8a64d52f30aee948b697bf4c528691': (359 commits) refactor(ui): replace duplicated locale bundles with canonical translation memory (openclaw#117157) fix(ui): retire stale Gateway event-log observers (openclaw#117169) fix(agents): keep subagent status consistent after restart and large fan-outs (openclaw#117141) refactor(ui): unify filtered session list ownership (openclaw#117158) refactor(agents): consolidate context budgets and compaction recovery (openclaw#117149) fix(net-policy): redact sig and x-* auth params in URLs and bodies (openclaw#116957) refactor(agents): remove duplicate generated-media delivery fallbacks (openclaw#117150) refactor(reply): unify turn lifecycle state ownership (openclaw#117145) fix(ui): preserve emoji agent avatar initials (openclaw#104912) refactor(auto-reply): unify command and directive ownership (openclaw#117143) refactor(plugins): consolidate descriptor and startup ownership (openclaw#117146) fix(messages): reply actions leak citation markers and reply/poll answers draw the no-reply fallback (openclaw#116909) fix(slack): let durable ingress retry transient thread lookups (openclaw#117135) refactor(doctor): consolidate shipped state migration ownership (openclaw#117142) fix(ai): Codex stream shows internal parser text on a malformed frame (openclaw#116966) fix: guard every migrated session accessor path (openclaw#117140) fix(terminal): measure unicode display width consistently (openclaw#117062) fix(openai): clear ChatGPT SSE fallback per session (openclaw#117123) fix(mistral): reject incomplete streamed tool terminals (openclaw#117137) fix(ai): preserve structured chat content and refusals (openclaw#117136) ...
* commit '6938f7dddb63bad59862c014c427d63f0a41a6f4': (368 commits) fix: allow gateway service commands for named profiles (openclaw#116314) fix(plugins): invalidate bundled artifact locations after metadata refresh (openclaw#117041) fix(ollama): honor model requests and pull completion contracts (openclaw#117171) fix(agents): prevent fallback after stale lifecycle abort (openclaw#117168) fix(telegram): confirm polling before long poll (openclaw#116970) fix(tlon): wire autoDiscoverChannels through the settings-store round-trip (openclaw#114949) fix(gateway): yield before post-ready background work (openclaw#117083) fix(ui): keep canvas lease renewals lifecycle-owned and timer-safe (openclaw#117173) fix(teams): restore the official square product icon (openclaw#117170) refactor(ui): replace duplicated locale bundles with canonical translation memory (openclaw#117157) fix(ui): retire stale Gateway event-log observers (openclaw#117169) fix(agents): keep subagent status consistent after restart and large fan-outs (openclaw#117141) refactor(ui): unify filtered session list ownership (openclaw#117158) refactor(agents): consolidate context budgets and compaction recovery (openclaw#117149) fix(net-policy): redact sig and x-* auth params in URLs and bodies (openclaw#116957) refactor(agents): remove duplicate generated-media delivery fallbacks (openclaw#117150) refactor(reply): unify turn lifecycle state ownership (openclaw#117145) fix(ui): preserve emoji agent avatar initials (openclaw#104912) refactor(auto-reply): unify command and directive ownership (openclaw#117143) refactor(plugins): consolidate descriptor and startup ownership (openclaw#117146) ...
* commit 'bb6345847b6f1634f4c3aea62f4fbaf34b81cecf': fix(agents): keep subagent status consistent after restart and large fan-outs (openclaw#117141) refactor(ui): unify filtered session list ownership (openclaw#117158)
* commit '5148236bbe050f6c05ee59190986a7215b41ce1c': (359 commits) refactor(ui): replace duplicated locale bundles with canonical translation memory (openclaw#117157) fix(ui): retire stale Gateway event-log observers (openclaw#117169) fix(agents): keep subagent status consistent after restart and large fan-outs (openclaw#117141) refactor(ui): unify filtered session list ownership (openclaw#117158) refactor(agents): consolidate context budgets and compaction recovery (openclaw#117149) fix(net-policy): redact sig and x-* auth params in URLs and bodies (openclaw#116957) refactor(agents): remove duplicate generated-media delivery fallbacks (openclaw#117150) refactor(reply): unify turn lifecycle state ownership (openclaw#117145) fix(ui): preserve emoji agent avatar initials (openclaw#104912) refactor(auto-reply): unify command and directive ownership (openclaw#117143) refactor(plugins): consolidate descriptor and startup ownership (openclaw#117146) fix(messages): reply actions leak citation markers and reply/poll answers draw the no-reply fallback (openclaw#116909) fix(slack): let durable ingress retry transient thread lookups (openclaw#117135) refactor(doctor): consolidate shipped state migration ownership (openclaw#117142) fix(ai): Codex stream shows internal parser text on a malformed frame (openclaw#116966) fix: guard every migrated session accessor path (openclaw#117140) fix(terminal): measure unicode display width consistently (openclaw#117062) fix(openai): clear ChatGPT SSE fallback per session (openclaw#117123) fix(mistral): reject incomplete streamed tool terminals (openclaw#117137) fix(ai): preserve structured chat content and refusals (openclaw#117136) ...
* commit '55215cd9edd2b585cbaee5481d5352aabf7e4399': (368 commits) fix: allow gateway service commands for named profiles (openclaw#116314) fix(plugins): invalidate bundled artifact locations after metadata refresh (openclaw#117041) fix(ollama): honor model requests and pull completion contracts (openclaw#117171) fix(agents): prevent fallback after stale lifecycle abort (openclaw#117168) fix(telegram): confirm polling before long poll (openclaw#116970) fix(tlon): wire autoDiscoverChannels through the settings-store round-trip (openclaw#114949) fix(gateway): yield before post-ready background work (openclaw#117083) fix(ui): keep canvas lease renewals lifecycle-owned and timer-safe (openclaw#117173) fix(teams): restore the official square product icon (openclaw#117170) refactor(ui): replace duplicated locale bundles with canonical translation memory (openclaw#117157) fix(ui): retire stale Gateway event-log observers (openclaw#117169) fix(agents): keep subagent status consistent after restart and large fan-outs (openclaw#117141) refactor(ui): unify filtered session list ownership (openclaw#117158) refactor(agents): consolidate context budgets and compaction recovery (openclaw#117149) fix(net-policy): redact sig and x-* auth params in URLs and bodies (openclaw#116957) refactor(agents): remove duplicate generated-media delivery fallbacks (openclaw#117150) refactor(reply): unify turn lifecycle state ownership (openclaw#117145) fix(ui): preserve emoji agent avatar initials (openclaw#104912) refactor(auto-reply): unify command and directive ownership (openclaw#117143) refactor(plugins): consolidate descriptor and startup ownership (openclaw#117146) ...
* origin/main: (3706 commits) refactor(ui): unify filtered session list ownership (openclaw#117158) refactor(agents): consolidate context budgets and compaction recovery (openclaw#117149) fix(net-policy): redact sig and x-* auth params in URLs and bodies (openclaw#116957) refactor(agents): remove duplicate generated-media delivery fallbacks (openclaw#117150) refactor(reply): unify turn lifecycle state ownership (openclaw#117145) fix(ui): preserve emoji agent avatar initials (openclaw#104912) refactor(auto-reply): unify command and directive ownership (openclaw#117143) refactor(plugins): consolidate descriptor and startup ownership (openclaw#117146) fix(messages): reply actions leak citation markers and reply/poll answers draw the no-reply fallback (openclaw#116909) fix(slack): let durable ingress retry transient thread lookups (openclaw#117135) refactor(doctor): consolidate shipped state migration ownership (openclaw#117142) fix(ai): Codex stream shows internal parser text on a malformed frame (openclaw#116966) fix: guard every migrated session accessor path (openclaw#117140) fix(terminal): measure unicode display width consistently (openclaw#117062) fix(openai): clear ChatGPT SSE fallback per session (openclaw#117123) fix(mistral): reject incomplete streamed tool terminals (openclaw#117137) fix(ai): preserve structured chat content and refusals (openclaw#117136) fix(doctor): persist normalized agent roster (openclaw#117115) fix(signal): avoid replay after ambiguous quote delivery errors (openclaw#117134) fix(cron): reject disabled delivery accounts when scheduling (openclaw#116899) ...
What Problem This Solves
Fixes an issue where users switching Active, Archived, and All thread views could encounter duplicate list refreshes, stale pagination snapshots, or inconsistent sidebar state during session events, agent changes, and reconnects. The Control UI duplicated session-list lifecycle ownership across its sidebar, catalog, and Sessions page.
Why This Change Was Made
The existing session capability now owns connection- and agent/filter-scoped active, archived, and all rosters, including event invalidation, page accumulation, subscriber continuity, and stale-response retirement. This deletes the obsolete 223-line sidebar pagination owner and simplifies progressive catalog host identity and repeated Sessions view templates. Catalog streaming, cursor compatibility, PR #117090 child/filter race handling, and rendered operator behavior remain intact. AI-assisted, maintainer-requested cleanup.
User Impact
Thread filters, load-more pagination, child sessions, catalog progress, selected-session routing, and reconnect behavior stay consistent with fewer duplicate requests and less production code. No config, gateway protocol, internationalization, locale, Vite, or workflow surfaces change.
Session snapshots remain process-local browser state: no persisted data model, Gateway schema, configuration contract, or public API changes, and no migration is required.
Evidence
05681e79e08936259275374885f0c5878559417e.tbx_01kyxcvj6qk8jpdfx5c787m03w(jade-crab-5078): https://github.com/openclaw/openclaw/actions/runs/30676551952.a1b41d5ddb057fe0956b1d53c19fdbf4d33430d9: 2 real-Chromium suites / 12 tests passed before changes.pnpm check:changedrun passed formatting, dependency guards, all three dead-export scans, i18n verification, UI/core typechecks, and approximately 79 non-UI whole-core lint shards, but initially ended red on four new UI-only lint findings. After fixing those findings, the exact formerly failing complete UI lint shard passed 1,647 UI files / 245 rules / 0 warnings / 0 errors. The owner approved preserving the already-green unchanged core shards and using the final-head hosted CI instead of repeating the identical 14-minute whole-core fan-out.node scripts/run-tsgo.mjs -p tsconfig.ui.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/ui.tsbuildinfopassed.pnpm ui:build: 2,990 modules transformed, 688 finalized sidecars verified, startup JavaScript 11 requests / 297.9 KiB gzip against budgets 18 / 317.0 KiB, startup CSS 40.6 KiB gzip against its 45.0 KiB budget.OPENCLAW_CAPTURE_UI_PROOF=1 node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/session-list-filter.e2e.test.ts ui/src/e2e/session-management.sidebar.e2e.test.ts: 2 real-Chromium suites / 12 tests passed, covering configured-agent filters, canonical numeric filters, sidebar/Sessions route consistency, child expansion, same-client reconnect, selected-session route reconnect with one observer, long-list responsiveness, touch, and pin/drop.checks-uiand all four independentchecks-ui-e2eChromium shards passed; hosted repository lint plus production and test typechecks also passed.gpt-5.6-sol, high reasoning, TruffleHog clean, zero findings, helper exit 0.child-sessions-expanded.png:4c52aee5f43d4a7c2b159c6ff658e85a7e0c5388d809d281c8b0e8a84a864091→e34621e1b4d08d10572e0437ed2d163160eae1ffdd5a2d02e92812bffc7b3f02.sidebar-selected-session-route-reconnect.png:58b10da0b9831fba5801eb5ddd863e00d98f64386891915da7faf25f68c24ba2→c29055182605a739525a89a887375db5c4a7af705aba7c4c091391b8b340daba.sidebar-session-pinned-drop.webm:5d37a3fcc01c3929bb38404d4ff75415057cbc3c6763fbff23d4851e1ac5cb05→d2adbf65776cc211a339622f943f12d98d8bc787cdea30e1869e7622437ba418.