Skip to content

Commit 78d8f10

Browse files
Merge main into fix/issue-25307
2 parents 9b36ce0 + 85f17ea commit 78d8f10

29 files changed

Lines changed: 163 additions & 43 deletions

‎apps/mobile/src/components/ComposerEditor.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export function ComposerEditor({
7979
() => () => {
8080
importRef.current?.abort();
8181
},
82+
// oxlint-disable-next-line react/exhaustive-effect-dependencies -- Switching drafts aborts an import owned by the previous draft.
8283
[draftKey],
8384
);
8485
const pasteContext = async (

‎apps/mobile/src/components/MediaVideoPlayer.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ function LoadedMediaVideo(props: {
102102
},
103103
);
104104
return () => controller.abort();
105+
// oxlint-disable-next-line react/exhaustive-effect-dependencies -- A play request or Retry (attempt) reloads the source into the same player.
105106
}, [player, props.playRequested, attempt]);
106107

107108
return (

‎apps/mobile/src/components/VideoPreviewModal.tsx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ function useLocalPlayback(source: LocalVideoPreviewSource): PlaybackState {
8787
() => undefined,
8888
);
8989
};
90+
// oxlint-disable-next-line react/exhaustive-effect-dependencies -- A different attachment restarts the load even when it resolves to the same cached file URI.
9091
}, [attachmentId, fileUri]);
9192
const mimeType = videoMimeType(attachment) ?? attachment.mimeType;
9293
return {
@@ -208,9 +209,10 @@ export function VideoPreviewModal(props: {
208209
}) {
209210
const isFocused = useIsFocused();
210211
const hasSource = props.source !== null;
212+
const { onRequestClose } = props;
211213
useEffect(() => {
212-
if (!isFocused && hasSource) props.onRequestClose();
213-
}, [isFocused, hasSource, props.onRequestClose]);
214+
if (!isFocused && hasSource) onRequestClose();
215+
}, [isFocused, hasSource, onRequestClose]);
214216
const { source } = props;
215217
if (source === null || !isFocused) return null;
216218
return source.type === "local" ? (

‎apps/mobile/src/components/ui/Menu.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export function Menu(props: MenuProps) {
5151
let children = menuProps.children;
5252
if (props.shouldOpenOnLongPress && isValidElement(children)) {
5353
const child = children as ReactElement<Pick<PressableProps, "onTouchStart" | "onPress">>;
54+
/* oxlint-disable react/refs -- Cloning the trigger installs event callbacks; the refs are accessed when those callbacks run. */
5455
children = cloneElement(child, {
5556
onTouchStart: (event) => {
5657
// onPressIn can repeat within one gesture when a finger leaves and re-enters the row.
@@ -74,6 +75,7 @@ export function Menu(props: MenuProps) {
7475
child.props.onPress?.(event);
7576
},
7677
});
78+
/* oxlint-enable react/refs */
7779
menuProps.onMenuInteractionStart = () => {
7880
menuPress.current.isPreparing = true;
7981
props.onMenuInteractionStart?.();

‎apps/mobile/src/features/diffs/nativeReviewDiffSurface.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ function useNativeReviewDiffPayload(
263263
cancelAnimationFrame(frame);
264264
}
265265
};
266+
// oxlint-disable-next-line react/exhaustive-effect-dependencies -- A new resetKey redelivers an unchanged payload after the diff surface resets.
266267
}, [method, nativeRef, payload, resetKey, onFailure, onDelivered]);
267268
}
268269

@@ -387,6 +388,7 @@ function NativeReviewDiffContent(
387388
return null;
388389
}
389390

391+
/* oxlint-disable react/refs -- The native view receives this ref; only event callbacks access its current value. */
390392
return createElement(RawNativeView, {
391393
...nativeProps,
392394
refreshEnabled: props.onPullToRefresh !== undefined,
@@ -399,6 +401,7 @@ function NativeReviewDiffContent(
399401
},
400402
ref: nativeRef,
401403
});
404+
/* oxlint-enable react/refs */
402405
}
403406

404407
export function resolveNativeReviewDiffView(): ComponentType<NativeReviewDiffViewProps> | null {

‎apps/mobile/src/features/files/SourceFileSurface.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ function JavaScriptSourceFileSurface(props: SourceFileSurfaceProps) {
254254
listRef.current?.scrollToIndex({ index: targetIndex, animated: false, viewPosition: 0.3 });
255255
});
256256
return () => cancelAnimationFrame(frame);
257+
// oxlint-disable-next-line react/exhaustive-effect-dependencies -- Opening another file at the same line index scrolls the new file to it.
257258
}, [props.path, targetIndex]);
258259

259260
const renderLine = ({ item, index }: { item: string; index: number }) => (

‎apps/mobile/src/features/home/HomeScreen.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ export function HomeScreen(props: HomeScreenProps) {
484484
bumpSnoozeWakeTick((tick) => tick + 1);
485485
}, delayMs);
486486
return () => clearTimeout(id);
487-
// snoozeWakeTick re-arms clamped timers even when the wake date exceeds 32-bit setTimeout and stays unchanged.
487+
// oxlint-disable-next-line react/exhaustive-effect-dependencies -- snoozeWakeTick re-arms clamped timers even when the wake date exceeds 32-bit setTimeout and stays unchanged.
488488
}, [nextSnoozeWakeAt, snoozeWakeTick]);
489489
// Called as `props.onSelectThread(...)`, the compiler would cache this handler on the whole
490490
// props object, which is new on every render of Home's parent.

‎apps/mobile/src/features/home/thread-swipe-actions.tsx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,11 @@ export function ThreadSwipeable(props: ThreadSwipeableProps) {
506506
rightThreshold={actionsWidth * 0.42}
507507
simultaneousWith={props.simultaneousWith}
508508
>
509-
{props.children(close)}
509+
{
510+
/* oxlint-disable react/refs -- The render callback receives a close/open handler; only invoking that handler accesses the ref. */
511+
props.children(close)
512+
/* oxlint-enable react/refs */
513+
}
510514
</ReanimatedSwipeable>
511515
</View>
512516
</Animated.View>

‎apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ export function useRegisterWorkspaceInspector(render: (() => ReactNode) | undefi
148148
if (focusedRef.current) {
149149
syncRegistration();
150150
}
151+
// oxlint-disable-next-line react/exhaustive-effect-dependencies -- Changed pane content replaces its existing native workspace registration.
151152
}, [wrappedRender]);
152153

153154
useEffect(

‎apps/mobile/src/features/pull-requests/PullRequestRouteScreen.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ export function PullRequestRouteScreen({ route }: StaticScreenProps<PullRequestP
389389
currentScrollOffset.current = scrollOffsets.current.overview ?? -insets.top;
390390
setSection("overview");
391391
}
392-
}, [guidesEnabled, section, insets.top]);
392+
}, [guidesEnabled, section, insets.top, currentScrollOffset, requestedSection, scrollOffsets]);
393393
const tabContent = activityContent;
394394
const filesY = useRef(0);
395395
const descriptionY = useRef(0);

0 commit comments

Comments
 (0)