@devries-cameron20 / t3code-1 / commits / b47d71da28
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(mobile): review's empty state stays below the header on iOS (#22420)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Claudesaul committed Oct 31, 2026 at 04:32 UTC b47d71da28a4a24f93fff1675722693fe4d9a15d
1 file changed +12 -1
apps/mobile/src/features/review/ReviewSheet.tsx
+12 -1
@@ -487,6 +487,16 @@ export function ReviewSheet(props: ReviewSheetProps) {
487 await refreshSelectedSection();
488 setIsPullRefreshing(false);
489 };
490 + const isRefreshing = isPullRefreshing || isSelectedSectionPending || areFilePatchesPending;
491 + // A refresh that starts programmatically adds its height to the native top inset and
492 + // subtracts it when it ends. If topContentInset changes in between, the inset ends up
493 + // short and the content sits under the header, so the fallback ScrollView starts over.
494 + const [fallbackInset, setFallbackInset] = useState(topContentInset);
495 + const [fallbackScrollViewKey, setFallbackScrollViewKey] = useState(0);
496 + if (fallbackInset !== topContentInset) {
497 + setFallbackInset(topContentInset);
498 + if (isRefreshing) setFallbackScrollViewKey((key) => key + 1);
499 + }
500 const reviewFileNavigatorRef = useRef<ReviewFileNavigatorHandle>(null);
501 const reviewFiles = parsedDiff.kind === "files" ? parsedDiff.files : [];
502 const fileVisibility = useReviewFileVisibility({
@@ -747,6 +757,7 @@ export function ReviewSheet(props: ReviewSheetProps) {
757 </View>
758 ) : (
759 <ScrollView
760 + key={fallbackScrollViewKey}
761 contentContainerStyle={
762 Platform.OS === "android" && (parsedDiff.kind === "empty" || !selectedSection)
763 ? { flexGrow: 1, justifyContent: "center" }
@@ -762,7 +773,7 @@ export function ReviewSheet(props: ReviewSheetProps) {
773 refreshControl={
774 // Fallback and empty states need refresh controls; only Android has an explicit refresh menu.
775 <RefreshControl
765 - refreshing={isPullRefreshing || isSelectedSectionPending || areFilePatchesPending}
776 + refreshing={isRefreshing}
777 onRefresh={() => void handlePullToRefresh()}
778 />
779 }