The best way to control Claude Code, Codex and more from any computer or phone
fix(mobile): switching threads no longer flashes the feed header or misplaces the composer (#37131)
Julius Marminge committed
Nov 15, 2026 at 22:30 UTC
f8c8f30e49b840d22c2638df5c01746cf41bf0f0
2 files changed
+12
-5
apps/mobile/src/features/threads/ThreadComposer.tsx
+2
@@ -173,6 +173,8 @@ function useCompactComposerEditor(text: ScaledTextRole, value: string) {
173
const editorStyle = useAnimatedStyle(() => ({
174
position: "absolute",
175
overflow: "hidden",
176
+ // The compact slot is unknown until its first layout, so the editor would draw over the + button.
177
+ opacity: isExpanded || editorWidth.value > 0 ? 1 : 0,
178
height,
179
...(isExpanded
180
? { left: 14, right: 14 }
apps/mobile/src/features/threads/ThreadFeed.tsx
+10
-5
@@ -3465,9 +3465,15 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
3465
headerMaterialVisibleRef.current = visible;
3466
onHeaderMaterialVisibilityChange?.(visible);
3467
};
3468
+ const feedThreadKey = scopedThreadKey(props.environmentId, props.threadId);
3469
+ const [loadedListKey, setLoadedListKey] = useState<string | null>(null);
3470
+ // LegendList hides rows until it has scrolled to the end, but not its header.
3471
+ const settling = props.feed.length > 0 && loadedListKey !== feedThreadKey;
3472
const handleMetricsChange = () => {
3473
const state = listRef.current?.getState();
3470
- if (state) onIsAtEndChange?.(state.isAtEnd);
3474
+ // Offset 0 before the first positioning, and the gaps while rows measure in, are not the
3475
+ // user leaving the end; only a scroll away stops end following.
3476
+ if (state) onIsAtEndChange?.(settling || state.isAtEnd || state.isFollowingEnd);
3477
};
3478
const handleScroll = (event: NativeSyntheticEvent<NativeScrollEvent>) => {
3479
reportHeaderMaterialVisibility(
@@ -3482,6 +3488,7 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
3488
handleMetricsChange();
3489
const stops = [
3490
state.listen("isAtEnd", handleMetricsChange),
3491
+ state.listen("isFollowingEnd", handleMetricsChange),
3492
state.listen("totalSize", handleMetricsChange),
3493
state.listen("footerSize", handleMetricsChange),
3494
state.listen("headerSize", handleMetricsChange),
@@ -3490,7 +3497,6 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
3497
for (const stop of stops) stop();
3498
};
3499
}, [listRef, handleMetricsChange]);
3493
- const feedThreadKey = scopedThreadKey(props.environmentId, props.threadId);
3500
const [workGroupScrollPositions] = useState(
3501
() => new Map<string, ThreadWorkGroupScrollPosition>(),
3502
);
@@ -3498,7 +3504,6 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
3504
// Opening at a message: once the filled list has loaded, the render that sees
3505
// the jump unfolds a run hiding the message and stops following the end, so
3506
// the committed list holds the target row with end maintenance off.
3501
- const [loadedListKey, setLoadedListKey] = useState<string | null>(null);
3507
const { jumpToMessageId } = props;
3508
const jumpReady = !!jumpToMessageId && loadedListKey === feedThreadKey;
3509
if (jumpReady && revealedMessageId !== jumpToMessageId) {
@@ -3993,7 +3998,7 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
3998
onScroll={handleScroll}
3999
scrollEventThrottle={16}
4000
ListHeaderComponent={
3996
- <>
4001
+ <View style={settling ? { opacity: 0 } : undefined}>
4002
{usesNativeAutomaticInsets ? null : <View style={{ height: topContentInset }} />}
4003
{setupAnchorIndex < 0 && props.worktreeSetup ? (
4004
<WorktreeSetupCard key={props.threadId} {...props.worktreeSetup} />
@@ -4003,7 +4008,7 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
4008
{props.historyControls ? (
4009
<ThreadFeedLoadEarlierControl {...props.historyControls} />
4010
) : null}
4006
- </>
4011
+ </View>
4012
}
4013
ListFooterComponent={
4014
props.pendingHandoff ? (