Fix mobile performance degradation during typing and after image upload #21

Merged
ryan merged 1 commits from fix/mobile-input-performance into main 2026-04-05 06:59:40 -04:00
Owner

Summary

  • Memoize URL.createObjectURL() in MessageInput to prevent blob URL leak on every keystroke while an image is attached
  • Wrap MessageInput in React.memo() with stable useCallback props to prevent re-renders during streaming
  • Remove expensive backdrop-blur-sm CSS from chat footer
  • Use instant scroll during streaming instead of queuing smooth scroll animations

Test plan

  • On mobile (or Chrome DevTools mobile emulation with CPU throttling), attach an image and type quickly — should feel responsive
  • Send a message and watch streaming response — no scroll jank
  • Check DevTools Memory tab — no blob URL accumulation on keystrokes

🤖 Generated with Claude Code

## Summary - Memoize `URL.createObjectURL()` in `MessageInput` to prevent blob URL leak on every keystroke while an image is attached - Wrap `MessageInput` in `React.memo()` with stable `useCallback` props to prevent re-renders during streaming - Remove expensive `backdrop-blur-sm` CSS from chat footer - Use instant scroll during streaming instead of queuing smooth scroll animations ## Test plan - [ ] On mobile (or Chrome DevTools mobile emulation with CPU throttling), attach an image and type quickly — should feel responsive - [ ] Send a message and watch streaming response — no scroll jank - [ ] Check DevTools Memory tab — no blob URL accumulation on keystrokes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ryan added 1 commit 2026-04-05 06:59:21 -04:00
Memoize blob URL creation to prevent leak on every keystroke, wrap
MessageInput in React.memo with stable useCallback props, remove
expensive backdrop-blur-sm from chat footer, and use instant scroll
during streaming to avoid queuing smooth scroll animations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ryan merged commit 975a337af4 into main 2026-04-05 06:59:40 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ryan/simbarag#21