Skip to content

perf(mobile): pause covered chat rendering and bound file previews - #665

Merged
huichen merged 1 commit into
mainfrom
claude/mobile-preview-perf
Sep 16, 2026
Merged

huichen merged 1 commit into
mainfrom
claude/mobile-preview-perf

Conversation

@huichen

@huichen huichen commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Follow-up after merged #664.

  • Retain the transcript/composer subtree while file surfaces cover it, pause display timers, and catch up without remounting or losing scroll/draft state. Accessibility hiding remains live.
  • Read only the bounded text-preview prefix through a read-only native file handle; yield between groups of 64 KiB reads and close on cancellation/failure.
  • Avoid Expo File.slice (it does a whole-file sync read). Validate UTF-8 without fatal/stream decoder options unsupported by the mobile fallback.
  • Virtualize Markdown file-preview blocks and bypass the shared message parse cache for large previews.

Validation

  • Mobile typecheck, ESLint, all 1,399 tests (99 suites) passed.
  • New workloads: 500 covered updates retain state; 2,000 paragraphs initially mount 8 text blocks; a 10 MiB file reads at most 2 MiB; cancellation, EOF, invalid UTF-8 and CJK/emoji truncation covered.
  • Report: mobile/docs/preview-performance-2026-09-16.md. File-I/O uses instrumented native-handle mocks and rendering uses the React test renderer, not a phone. No measured battery-saving or native-FPS claim.

Limits

The bounded Markdown prefix still parses in full; giant single tables/code blocks are not internally virtualized. Download/hash verification and protocol behavior are unchanged.

@huichen
huichen enabled auto-merge (squash) September 16, 2026 10:24
@huichen
huichen merged commit 85fa2ac into main Sep 16, 2026
12 checks passed
@huichen
huichen deleted the claude/mobile-preview-perf branch September 16, 2026 10:27
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