Repository navigation
perf(swift-ios): apply thread catch-up in bounded batches - #11687
Conversation
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This changes the live iOS thread catch-up path from item-at-a-time processing to bounded batches and changes when synchronization and render publications occur, with special handling for snapshots, reverts, and pagination. Although the wire payload is unchanged and tests cover several ordering cases, this is a stateful existing-path runtime change rather than a purely mechanical tweak. Notes:
You can add or adjust custom eligibility rules. Learn more. |
Dismissing prior approval to re-evaluate 343e3ff
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
SwiftUI consumed each thread event separately. On servers without a completion marker, each event also flushed the message list.
Use the existing bounded batch transport for thread details. Apply each batch in order and synchronize legacy servers once per batch. Keep the current live render timer, snapshot replacement, revert handling, older-page merge points, applied cursor, and connection-bound retry behavior. Batches with only stale sequences do not emit a new live receipt.
This ports the thread catch-up change from #11302 to SwiftUI mobile. The native message reducer already has the last-message fast path, so it needs no extra array-scan change. Web, desktop, React Native mobile, providers, and wire contracts are unchanged.
Validation: The local native run passed 56 thread and transport tests. The added stale-only batch check passed on the current head. These cover batches of 1, 16, and 500 deltas, duplicate replay, reconnect cursors, completion ordering, snapshot and revert ordering, pending older pages, bounded overflow, and cold connection identity. Swift parse and git diff checks pass. No device performance measurement or visible layout change is claimed.
Created with Codex.