Skip to content

perf(swift-ios): apply thread catch-up in bounded batches - #11687

Merged
t3dotgg merged 4 commits into
t3code/rebuild-mobile-app-swiftfrom
t3code/swift-parity-thread-batches
Sep 14, 2026
Merged

t3dotgg merged 4 commits into
t3code/rebuild-mobile-app-swiftfrom
t3code/swift-parity-thread-batches

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

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.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Sep 14, 2026
@cursor

cursor Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Bugbot is paused — on-demand spend limit reached

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

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Sep 14, 2026
@cursor

cursor Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Bugbot is paused — on-demand spend limit reached

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

@macroscopeapp

macroscopeapp Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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:

  • No code objects were reviewed. Approvability was decided on eligibility alone.

You can add or adjust custom eligibility rules. Learn more.

@macroscopeapp
macroscopeapp Bot dismissed their stale review September 14, 2026 04:21

Dismissing prior approval to re-evaluate 343e3ff

@github-actions

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire — 13.5 KiB — 15.1 KiB ✅
Codex Thread snapshot wire — 7.0 KiB — 7.3 KiB ✅
Codex Live turn WebSocket wire — 6.5 KiB — 7.8 KiB ✅
Codex Live turn WebSocket decoded — 57.0 KiB — 66.4 KiB ✅
Codex Live turn messages — 8 — 21 ✅
Claude Total thread wire — 13.5 KiB — 15.1 KiB ✅
Claude Thread snapshot wire — 7.1 KiB — 7.3 KiB ✅
Claude Live turn WebSocket wire — 6.5 KiB — 7.8 KiB ✅
Claude Live turn WebSocket decoded — 57.8 KiB — 66.4 KiB ✅
Claude Live turn messages — 8 — 21 ✅

Baseline: unavailable · PR result: 343e3ff · Source CI: success

Scenario and decoded snapshot size

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

  • Codex decoded thread snapshot: 113.9 KiB
  • Claude decoded thread snapshot: 114.6 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@t3dotgg
t3dotgg merged commit efc8b08 into t3code/rebuild-mobile-app-swift Sep 14, 2026
24 checks passed
@t3dotgg
t3dotgg deleted the t3code/swift-parity-thread-batches branch September 14, 2026 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant