The best way to control Claude Code, Codex and more from any computer or phone
perf(mobile): thread rows no longer re-render the list when another thread streams (#21255)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Oct 18, 2026 at 14:33 UTC
685c4137f17d7711c0ffb3e7e50b60ff188b59f8
2 files changed
+13
-24
apps/mobile/src/features/home/HomeScreen.tsx
+8
-22
@@ -415,28 +415,14 @@ export function HomeScreen(props: HomeScreenProps) {
415
),
416
);
417
const handleSettleThread = props.onSettleThread;
418
- const handleSnoozeThread = (thread: EnvironmentThreadShell, snoozedUntil: string) => {
419
- void props.onSnoozeThread(thread, snoozedUntil);
420
- };
421
- const handleUnsnoozeThread = (thread: EnvironmentThreadShell) => {
422
- void props.onUnsnoozeThread(thread);
423
- };
424
- const handlePinThread = (thread: EnvironmentThreadShell) => {
425
- void props.onPinThread(thread);
426
- };
427
- const handleMoveThread = (thread: EnvironmentThreadShell, direction: ThreadMoveDestination) => {
428
- void props.onMoveThread(thread, direction);
429
- };
430
- const handleUnpinThread = (thread: EnvironmentThreadShell) => {
431
- void props.onUnpinThread(thread);
432
- };
433
- const handleSetThreadAutoSettle = (thread: EnvironmentThreadShell, enabled: boolean) => {
434
- void props.onSetThreadAutoSettle(thread, enabled);
435
- };
436
- const handleRegenerateThreadTitle = (thread: EnvironmentThreadShell) => {
437
- void props.onRegenerateThreadTitle(thread);
438
- };
439
- const handleRenameThread = (thread: EnvironmentThreadShell) => props.onRenameThread(thread);
418
+ const handleSnoozeThread = props.onSnoozeThread;
419
+ const handleUnsnoozeThread = props.onUnsnoozeThread;
420
+ const handlePinThread = props.onPinThread;
421
+ const handleMoveThread = props.onMoveThread;
422
+ const handleUnpinThread = props.onUnpinThread;
423
+ const handleSetThreadAutoSettle = props.onSetThreadAutoSettle;
424
+ const handleRegenerateThreadTitle = props.onRegenerateThreadTitle;
425
+ const handleRenameThread = props.onRenameThread;
426
const handleDeleteThread = props.onDeleteThread;
427
const handleUnsettleThread = props.onUnsettleThread;
428
const [settledVisibleCount, setSettledVisibleCount] = useState(
apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx
+5
-2
@@ -484,15 +484,18 @@ function ThreadNavigationSidebarPane(
484
openSwipeableRef.current = null;
485
}
486
};
487
+ // These close the open row too, so they cannot be pass-throughs. The compiler would
488
+ // recache a closure over `props` whenever any prop changed.
489
+ const { onSelectThread, onOpenThreadPullRequests } = props;
490
const handleSelectThread = (thread: EnvironmentThreadShell) => {
488
- props.onSelectThread(thread);
491
+ onSelectThread(thread);
492
openSwipeableRef.current?.close();
493
};
494
const handleOpenThreadPullRequests = (
495
thread: EnvironmentThreadShell,
496
pr: ThreadPrPresentation,
497
) => {
495
- props.onOpenThreadPullRequests(thread, pr);
498
+ onOpenThreadPullRequests(thread, pr);
499
openSwipeableRef.current?.close();
500
};
501
const handleScrollBeginDrag = () => {