Skip to content

Commit fa68e03

Browse files
committed
fix(mobile): keep the empty-thread message still when the composer card opens
1 parent e77b1a3 commit fa68e03

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

‎apps/mobile/src/features/threads/ThreadDetailScreen.tsx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -811,8 +811,9 @@ export const ThreadDetailScreen = function ThreadDetailScreen(props: ThreadDetai
811811
) ||
812812
(props.historyControls?.hasMoreHistory === true &&
813813
props.selectedThread.latestUserMessageAt !== null);
814-
const composerOverlapHeight =
815-
composerHeight ?? COMPOSER_COLLAPSED_CHROME + (hasSidebarTabBar ? 14 : 0) + composerBottomInset;
814+
const collapsedComposerHeight =
815+
COMPOSER_COLLAPSED_CHROME + (hasSidebarTabBar ? 14 : 0) + composerBottomInset;
816+
const composerOverlapHeight = composerHeight ?? collapsedComposerHeight;
816817
const [collapsedUserInputRequestId, setCollapsedUserInputRequestId] =
817818
useState<RuntimeRequestId | null>(null);
818819
const activeUserInputRequestId = props.activePendingUserInput?.requestId ?? null;
@@ -1410,6 +1411,7 @@ export const ThreadDetailScreen = function ThreadDetailScreen(props: ThreadDetai
14101411
estimatedOverlayHeight +
14111412
(showFloatingStatus ? FLOATING_WORKING_CONTROL_COVERAGE : 0)
14121413
}
1414+
placeholderBottomInset={collapsedComposerHeight}
14131415
contentMaxWidth={contentMaxWidth}
14141416
historyControls={props.historyControls}
14151417
contentSideInsets={nativeMetrics?.safeArea}

‎apps/mobile/src/features/threads/ThreadFeed.tsx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ export interface ThreadFeedProps {
344344
readonly keyboardOffset: number;
345345
readonly contentTopInset?: number;
346346
readonly contentBottomInset?: number;
347+
readonly placeholderBottomInset?: number;
347348
readonly historyControls?: ThreadFeedHistoryControls;
348349
readonly contentMaxWidth?: number;
349350
readonly contentSideInsets?: { readonly left: number; readonly right: number };
@@ -2125,6 +2126,7 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
21252126
const insets = useSafeAreaInsets();
21262127
const topContentInset = props.contentTopInset ?? insets.top + IOS_NAV_BAR_HEIGHT;
21272128
const bottomContentInset = props.contentBottomInset ?? 18;
2129+
const placeholderBottomInset = props.placeholderBottomInset ?? bottomContentInset;
21282130
const usesNativeAutomaticInsets =
21292131
props.usesAutomaticContentInsets === true && Platform.OS === "ios";
21302132
const initialContentInset = deriveThreadFeedInitialContentInset({
@@ -2954,7 +2956,7 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
29542956
title={props.contentPresentation.title}
29552957
detail={props.contentPresentation.detail}
29562958
topInset={topContentInset}
2957-
bottomInset={bottomContentInset}
2959+
bottomInset={placeholderBottomInset}
29582960
horizontalPadding={horizontalPadding}
29592961
/>
29602962
);
@@ -3130,7 +3132,7 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
31303132
title="No conversation yet"
31313133
detail="Ask the agent to inspect the repo, run a command, or continue the active thread."
31323134
topInset={topContentInset}
3133-
bottomInset={bottomContentInset}
3135+
bottomInset={placeholderBottomInset}
31343136
horizontalPadding={horizontalPadding}
31353137
/>
31363138
</View>

0 commit comments

Comments
 (0)