Skip to content

perf(mobile): streamline conversation switches and defer hidden replay - #572

Merged
huichen merged 1 commit into
mainfrom
claude/mobile-responsive
Sep 12, 2026
Merged

huichen merged 1 commit into
mainfrom
claude/mobile-responsive

Conversation

@huichen

@huichen huichen commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Share a single get_state request between opening model controls and timeline sync; remove the extra opening attachment-history fetch.
  • Ignore stale navigation responses and bind delayed model/thinking commands to the intended session.
  • Defer hidden-session history/replay/projection; preserve catalog/terminal/approval notifications and reload durable state on reopen.
  • Stop obsolete replay pagination after its in-flight page, prioritize visible lanes on reconnect, and deduplicate opening reconciles while one is executing.
  • Preserve the warm ten-exchange window through immediate lane restart.

Validation without a physical device

  • Mobile typecheck and ESLint passed.
  • 50 Jest suites / 718 tests passed with the updated worktree shared packages.
  • Fake-clock 350 ms state + 350 ms history: one state request, one history request, history commit at 700 ms (not a measured phone frame/render latency).
  • 100 hidden sessions / 10,000 text deltas: zero history/replay requests and no timeline-lane allocations; opening restores durable history/approvals.
  • Regressions cover A-to-B response reordering/failure, delayed draft/preferences, same-session reopen, reconnect prioritization, replay cancellation, and failure recovery.
  • One earlier run hit a 5s beforeEach timeout in the unchanged SessionList test; isolated and subsequent complete reruns passed with unchanged timeout settings.

This does not change transport authentication, wildcard subscription/JSON decoding, native background lifecycle, or Markdown rendering. A request already on the wire may complete/time out; it will not trigger more replay pages after navigation invalidates the lane. See docs/mobile-latency-diagnosis.md for scope and limitations.

@huichen
huichen enabled auto-merge (squash) September 12, 2026 07:18
@huichen
huichen merged commit 36c01a8 into main Sep 12, 2026
12 checks passed
@huichen
huichen deleted the claude/mobile-responsive branch September 12, 2026 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant