Skip to content

fix(ios): avoid UI pauses while loading large session lists - #198104

Merged
vyctorbrzezowski merged 1 commit into
mainfrom
openclaw/ios-session-page-decode
Nov 14, 2026
Merged

vyctorbrzezowski merged 1 commit into
mainfrom
openclaw/ios-session-page-decode

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

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 @concurrent Data 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 with 0633f256350b5580a5bdbcd8a6a5782750de03d4:

  • iOS and macOS builds passed. Source-selected native tests passed 101 candidate and 99 baseline cases. Only the compatible roster regression was transplanted; missing baseline APIs were not counted as failures.
  • An actual iOS app connected to a synthetic Gateway loaded 1,205 rows over seven roster pages. Main-queue roster decodes decreased from seven to zero; both variants performed eight total decodes, including the separate chat decode.
  • Both showed the online roster and retained the existing 50-row offline cache. Screenshots were inspected.
  • The trigger was one synthetic sequence-gap resync per variant. No dropped-packet detection, latency, CPU, or RSS claim is made.

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

Worked on by:
- @mikengyn
- @vyctorbrzezowski

Co-authored-by: mikengyn <[email protected]>
Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 10f00f9a-fb63-4ee2-abec-c7dde1d6d4a2
@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 13, 2026
@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: The seven typed page decodes run synchronously on MainActor.
  • After: The seven typed page decodes use an explicit concurrent executor; state application remains on MainActor, with responsiveness gains still unmeasured.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The implementation is coherent on source review, but the declared native validation and performance acceptance have not been demonstrated.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Loading a large iOS session roster can compete with sidebar interaction and streamed replies for MainActor execution.
Reason: The maintainer-authored direction targets a concrete source-level bottleneck with little production machinery and preserves the existing navigation and pagination design.

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
Reviewed head: 09338142c2d8fe0caa8f9b20974286e1b90875d1

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Supply exact-head native build and affected-test results, base-red/head-green executor evidence, and comparable device traces or before/after video for the declared 1,205-session refresh with streamed replies, including roster and dashboard decoding; redact IPs, keys, phone numbers, and non-public endpoints.
Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

Testing

Proof path: none.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 160e2ba adds apps/ios/Sources/RootSidebarModel.swift:128 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 160e2baf495b; files: apps/ios/Sources/RootSidebarModel.swift)
  • Marvinthebored: Raw commit 5bfbfe6 adds apps/ios/Sources/RootSidebarModel.swift:188 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 5bfbfe6e5982; files: apps/ios/Sources/RootSidebarModel.swift)

PR surface

Source +20, Tests +206. Total +226 across 4 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 2 23 3 +20
Tests 2 206 0 +206
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 229 3 +226

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a focused native responsiveness improvement for large rosters; user-visible latency impact and urgency have not been measured.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 13, 2026, 12:17 AM ET / 05:17 UTC.

@vyctorbrzezowski vyctorbrzezowski self-assigned this Nov 14, 2026
@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review November 14, 2026 16:57
@vyctorbrzezowski
vyctorbrzezowski merged commit 310f410 into main Nov 14, 2026
161 of 163 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the openclaw/ios-session-page-decode branch November 14, 2026 17:46
@vyctorbrzezowski

Copy link
Copy Markdown
Member

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 15, 2026
…#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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: ios App: ios P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants