Repository navigation
fix(ios): avoid UI pauses while loading large session lists - #198104
Conversation
Worked on by: - @mikengyn - @vyctorbrzezowski Co-authored-by: mikengyn <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]> OpenClaw-Publication: 10f00f9a-fb63-4ee2-abec-c7dde1d6d4a2
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR moves iOS session-roster and sidebar-dashboard decoding off MainActor while preserving route checks and pagination. Example: Refresh an iOS roster containing 1,205 sessions with pages of 200 rows.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-authored draft open: current main retains synchronous MainActor decoding, and source review found no definite introduced defect. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe iOS sidebar and Sessions screen request roster pages through GatewayNodeSession, decode response data, and publish complete or partial snapshots; the sidebar also loads usage and cron summaries. flowchart TD
A[iOS sidebar and Sessions screen] --> B[MainActor roster loader]
B --> C[GatewayNodeSession]
C --> D[Gateway RPC responses]
D --> E[Concurrent payload decoder]
E --> F[Route validation and page collection]
F --> G[MainActor UI state]
Technical reviewBest possible solution: Use the existing payload-decoding owner for concurrent decoding while retaining MainActor state publication and the established roster-route contract. Do we have a high-confidence way to reproduce the issue? Source establishes synchronous typed decoding on MainActor, but does not establish the duration or severity of UI pauses; no target code was executed during this read-only review. Is this the best way to solve the issue? The patch is a small, coherent executor change using existing owners, with cancellation propagation and route validation preserving established behavior rather than adding caches or workers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1110e81c7b93. Provenance checked
TestingProof path: none. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +20, Tests +206. Total +226 across 4 files. Added test files: 1. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 13, 2026, 12:17 AM ET / 05:17 UTC. |
|
Merged via squash.
|
…#198104) Decode roster pages off the main actor while preserving route checks, state application, pagination, and offline behavior. Co-authored-by: vyctorbrzezowski <[email protected]> Co-authored-by: mikengyn <[email protected]>
What Problem This Solves
Addresses UI pauses while a large iOS session roster loads: source inspection confirms that typed page decoding currently runs on MainActor. The user-visible latency impact has not yet been measured.
User Impact
Moves roster-page and same-sidebar-model dashboard decoding to an explicit concurrent executor, without changing the existing sidebar animation, grouped replies, word fade, pagination, offline fallback, or partial-roster presentation. Broad chat-history decoding is outside this PR. No migration or user configuration change is required.
Why This Change Was Made
A network await did not move the subsequent synchronous JSON decode out of the MainActor-isolated roster loader. The existing payload-decoding owner now offers an explicit Swift
@concurrentData decoder with Sendable results and cancellation checks, also used by the same sidebar model’s usage/cron request helper. State application stays on MainActor. Both successful and failed page decodes revalidate their captured physical connection before the pagination owner consumes them.This relocates necessary decoding; it does not remove total decoding work or add a cache, detached task, persistent worker, or new refresh policy.
Evidence
Maintainer verification on
09338142c2d8fe0caa8f9b20974286e1b90875d1, compared with0633f256350b5580a5bdbcd8a6a5782750de03d4:Work sessions
Linked for team reference; these sessions aren’t public.
Worked on by