Skip to content

perf(mobile): keep thread navigation responsive - #1464

Merged
nixuuu merged 2 commits into
devfrom
fix/mobile-thread-performance
Nov 29, 2026
Merged

nixuuu merged 2 commits into
devfrom
fix/mobile-thread-performance

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

Change

On a phone, a tap on a thread could leave the thread list on screen while an outstanding cache write, a directory scan or protobuf decoding finished. Push or replace the route immediately and use the screen's existing cache reader. An in-memory thread still renders on entry. A disk-only thread can display its overview header while the reader restores its saved cursor.

Returning to the list schedules retention accounting and persistence in an idle callback. Backgrounding an open conversation still flushes its checkpoint. Root rows mount their action sheets on first use, and the covered phone list skips looking up the selected thread and expanding its side threads. Layout context stays stable across unrelated thread updates.

Fixes: #375

Verification

  • Mobile and benchmark-script TypeScript checks and scoped oxlint passed.
  • All seven mobile thread cache tests passed, including disk restart, retained-view eviction, a pending write during revocation and a real paired gateway.
  • Android 16 emulator in portrait, actual navigation with synthetic data and a deliberately stalled 5 s disk read. Time from the press handler to mounting the thread screen was 5.57 s before / 0.34 s after for a disk hit, 5.20 s / 0.14 s for a miss and 0.33 s / 0.34 s for a retained memory hit. The title and composer appeared while disk was pending. History populated afterward. Returning mid-read and selecting a different thread kept the second thread on screen.
  • Verified idle persistence ran on return, both Working indicators rotated on the list, and long press opened the actions on first use, including Rename and Snooze and their dismissal.
  • The original multi-second spinner stall did not reproduce on the baseline Android emulator. The recording is from iOS. No physical iPhone profile or on-device iOS verification.

Start the route on tap and let the screen restore its checkpoint. Defer encoding on return to the list and mount row action sheets on demand.

Fixes: #375
@nixuuu
nixuuu marked this pull request as ready for review November 29, 2026 09:05
@nixuuu
nixuuu enabled auto-merge (squash) November 29, 2026 09:05
@nixuuu
nixuuu merged commit 06b96e1 into dev Nov 29, 2026
13 checks passed
@nixuuu
nixuuu deleted the fix/mobile-thread-performance branch November 29, 2026 09:06
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