The best way to control Claude Code, Codex and more from any computer or phone
fix(mobile): screen lists register with their header, enforced by lint (#24710)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Oct 25, 2026 at 00:07 UTC
ebd29ca951e1e9303ef8fd07e72ed52264b61583
14 files changed
+95
-1
apps/mobile/src/features/archive/ArchivedThreadsScreen.tsx
+2
@@ -1,3 +1,4 @@
1
+import { NativeScrollView } from "../../native/NativeScrollViewMarker";
2
import { Button } from "../../components/ui/Button";
3
import type {
4
EnvironmentProject,
@@ -428,6 +429,7 @@ export function ArchivedThreadsScreen(props: {
429
<SettingsScreenContent>
430
<GestureDetector gesture={archiveScrollGesture}>
431
<LegendList
432
+ renderScrollComponent={Platform.OS === "ios" ? NativeScrollView : undefined}
433
className="flex-1"
434
contentContainerStyle={{
435
paddingBottom: 32,
apps/mobile/src/features/files/FileTreeBrowser.tsx
+2
@@ -1,3 +1,4 @@
1
+import { NativeScrollView } from "../../native/NativeScrollViewMarker";
2
import { Button } from "../../components/ui/Button";
3
import { LegendList } from "@legendapp/list/react-native";
4
import type { ProjectEntry } from "@t3tools/contracts";
@@ -221,6 +222,7 @@ export function FileTreeBrowser(props: {
222
// Keep the list as direct screen content so UIKit can apply header insets.
223
return (
224
<LegendList
225
+ renderScrollComponent={Platform.OS === "ios" ? NativeScrollView : undefined}
226
contentInsetStartAdjustment={headerInset}
227
alwaysBounceVertical
228
className="flex-1"
apps/mobile/src/features/pull-requests/PullRequestFiles.tsx
+2
@@ -1,3 +1,4 @@
1
+import { NativeScrollView } from "../../native/NativeScrollViewMarker";
2
import { sourceControlClients } from "@t3tools/client-runtime/source-control-clients";
3
import { AnimatedLegendList } from "@legendapp/list/reanimated";
4
import {
@@ -440,6 +441,7 @@ export function PullRequestFilesSheet({ route }: StaticScreenProps<PullRequestDi
441
</Toolbar>
442
<ScreenContent>
443
<AnimatedLegendList
444
+ renderScrollComponent={Platform.OS === "ios" ? NativeScrollView : undefined}
445
className="flex-1"
446
data={parsed.kind === "files" ? groupByDirectory(parsed.files, collapsed) : []}
447
keyExtractor={(item) => item.key}
apps/mobile/src/features/settings/SettingsOpenSourceLicensesRouteScreen.tsx
+2
@@ -1,3 +1,4 @@
1
+import { NativeScrollView } from "../../native/NativeScrollViewMarker";
2
import { SearchField } from "../../components/ui/SearchField";
3
import { Toolbar } from "../../components/ui/Toolbar";
4
import { ScreenScrollView as ScrollView } from "../../components/ui/ScreenScrollView";
@@ -127,6 +128,7 @@ export function SettingsOpenSourceLicensesRouteScreen() {
128
) : null}
129
130
<LegendList
131
+ renderScrollComponent={Platform.OS === "ios" ? NativeScrollView : undefined}
132
className="flex-1"
133
contentContainerStyle={{
134
paddingBottom: usesNativeMailSearchToolbar
apps/mobile/src/features/threads/NewTaskContextPickerScreens.tsx
+2
@@ -1,3 +1,4 @@
1
+import { NativeScrollView } from "../../native/NativeScrollViewMarker";
2
import { SearchField } from "../../components/ui/SearchField";
3
import { Button } from "../../components/ui/Button";
4
import { Toolbar } from "../../components/ui/Toolbar";
@@ -449,6 +450,7 @@ export function BranchPickerScreen(props: {
450
</ScrollView>
451
) : (
452
<LegendList
453
+ renderScrollComponent={Platform.OS === "ios" ? NativeScrollView : undefined}
454
alwaysBounceVertical={false}
455
automaticallyAdjustsScrollIndicatorInsets
456
automaticallyAdjustKeyboardInsets={Platform.OS === "ios"}
apps/mobile/src/features/threads/ThreadFeed.tsx
+1
@@ -3108,6 +3108,7 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
3108
<PresentationSource identifier={fileShareSourceIdentifier} style={{ flex: 1 }}>
3109
<View className="flex-1" onLayout={handleViewportLayout}>
3110
<View className="flex-1">
3111
+ {/* oxlint-disable-next-line t3code/require-registered-list-scroll -- ThreadFeedScrollView is passed through the iOS-only spread below; the prop rejects undefined. */}
3112
<KeyboardAwareLegendList
3113
ref={listRef}
3114
// LegendList cannot see adjustedContentInset; remount so initial positioning waits for UIKit attachment.
apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx
+3
@@ -79,6 +79,7 @@ import {
79
type ThreadListV2ListItem,
80
} from "./threadListV2";
81
import { useSelectWorkspaceDetail } from "../workspace/useSelectWorkspaceDetail";
82
+import { NativeScrollView } from "../../native/NativeScrollViewMarker";
83
84
type SidebarListItem =
85
| ThreadListV2ListItem
@@ -725,6 +726,7 @@ function ThreadNavigationSidebarPane(
726
<SwipeableScrollGateProvider enabled={swipeEnabled}>
727
<GestureDetector gesture={sidebarScrollGesture}>
728
<AnimatedLegendList
729
+ renderScrollComponent={Platform.OS === "ios" ? NativeScrollView : undefined}
730
itemLayoutAnimation={THREAD_SIDEBAR_ROW_LAYOUT}
731
data={listItems}
732
drawDistance={500}
@@ -793,6 +795,7 @@ function ThreadNavigationSidebarPane(
795
) : (
796
<SwipeableScrollGateProvider enabled={swipeEnabled}>
797
<GestureDetector gesture={sidebarScrollGesture}>
798
+ {/* oxlint-disable-next-line t3code/require-registered-list-scroll -- Only the non-native workspace layout (Android and the fallback) renders this sidebar, which has no native header to register with. */}
799
<AnimatedLegendList
800
itemLayoutAnimation={THREAD_SIDEBAR_ROW_LAYOUT}
801
data={listItems}
apps/mobile/src/features/threads/ThreadPullRequestsSheet.tsx
+1
@@ -50,6 +50,7 @@ export function ThreadPullRequestsSheet(
50
51
const content = (
52
<View className="flex-1 android:bg-sheet-solid ios:bg-screen">
53
+ {/* oxlint-disable-next-line t3code/require-registered-list-scroll -- Sheet content; sheets sit outside workspace columns and keep their own header handling. */}
54
<LegendList
55
data={lines}
56
keyExtractor={linkedPullRequestKey}
apps/mobile/src/features/threads/ThreadSettingsSheet.tsx
+1
@@ -1009,6 +1009,7 @@ function ThreadSettingsMainContent(props: {
1009
};
1010
1011
return (
1012
+ // oxlint-disable-next-line t3code/require-registered-list-scroll -- Sheet content; sheets sit outside workspace columns and keep their own header handling.
1013
<AnimatedLegendList
1014
alwaysBounceVertical
1015
automaticallyAdjustsScrollIndicatorInsets
apps/mobile/src/features/threads/thread-work-log.tsx
+1
@@ -705,6 +705,7 @@ function ThreadWorkGroupList(props: {
705
706
return (
707
<View style={{ height, overflow: "hidden" }}>
708
+ {/* oxlint-disable-next-line t3code/require-registered-list-scroll -- Nested in a fixed-height card inside the thread feed, which owns the header's scroll view. */}
709
<AnimatedLegendList
710
ref={listRef}
711
data={props.activities}
oxlint-plugin-t3code/index.ts
+2
@@ -15,6 +15,7 @@ import noMobileUniwindThemeEscapeHatches from "./rules/no-mobile-uniwind-theme-e
15
import noAmbiguousDetailNavigation from "./rules/no-ambiguous-detail-navigation.ts";
16
import noMobilePullRequestGlyphLiterals from "./rules/no-mobile-pull-request-glyph-literals.ts";
17
import noNativeTitleTooltip from "./rules/no-native-title-tooltip.ts";
18
+import requireRegisteredListScroll from "./rules/require-registered-list-scroll.ts";
19
import noOutsetStateIndicators from "./rules/no-outset-state-indicators.ts";
20
import noPollingLoopInTests from "./rules/no-polling-loop-in-tests.ts";
21
import noRawMcpRegistration from "./rules/no-raw-mcp-registration.ts";
@@ -51,6 +52,7 @@ export default definePlugin({
52
"no-ambiguous-detail-navigation": noAmbiguousDetailNavigation,
53
"no-mobile-pull-request-glyph-literals": noMobilePullRequestGlyphLiterals,
54
"no-native-title-tooltip": noNativeTitleTooltip,
55
+ "require-registered-list-scroll": requireRegisteredListScroll,
56
"no-outset-state-indicators": noOutsetStateIndicators,
57
"no-polling-loop-in-tests": noPollingLoopInTests,
58
"no-raw-mcp-registration": noRawMcpRegistration,
oxlint-plugin-t3code/rules/require-registered-list-scroll.test.ts
new
+32
@@ -0,0 +1,32 @@
1
+import { assert, describe } from "@effect/vitest";
2
+
3
+import { createOxlintRuleHarness } from "../test/utils.ts";
4
+
5
+const rule = createOxlintRuleHarness("t3code/require-registered-list-scroll", {
6
+ filename: "fixture.tsx",
7
+});
8
+
9
+describe("t3code/require-registered-list-scroll", () => {
10
+ rule.valid(
11
+ "allows a list that renders through a registered scroll view",
12
+ `const el = <LegendList data={rows} renderScrollComponent={NativeScrollView} />;`,
13
+ );
14
+
15
+ rule.valid(
16
+ "allows a keyboard-aware list with its scroll view component",
17
+ `const el = <KeyboardAwareLegendList data={rows} ScrollViewComponent={FeedScrollView} />;`,
18
+ );
19
+
20
+ rule.invalid(
21
+ "reports a list given the other list's scroll prop",
22
+ `const el = <LegendList data={rows} ScrollViewComponent={NativeScrollView} />;`,
23
+ );
24
+
25
+ rule.invalid(
26
+ "reports a list with the default scroll view",
27
+ `const el = <AnimatedLegendList data={rows} renderItem={renderRow} />;`,
28
+ (output) => {
29
+ assert.match(output, /header-registered scroll view/);
30
+ },
31
+ );
32
+});
oxlint-plugin-t3code/rules/require-registered-list-scroll.ts
new
+40
@@ -0,0 +1,40 @@
1
+import { defineRule } from "@oxlint/plugins";
2
+
3
+// LegendList takes a render function; KeyboardAwareLegendList takes the component itself.
4
+const SCROLL_COMPONENT_PROP: Readonly<Record<string, string>> = {
5
+ LegendList: "renderScrollComponent",
6
+ AnimatedLegendList: "renderScrollComponent",
7
+ KeyboardAwareLegendList: "ScrollViewComponent",
8
+};
9
+
10
+// A screen's list must scroll in a scroll view registered with its header, or the header loses
11
+// its scroll-edge blur (and, on the iPhone Duo, the blur's reach under the vertical bar).
12
+export default defineRule({
13
+ meta: {
14
+ type: "problem",
15
+ docs: {
16
+ description:
17
+ "Require mobile lists to render through a header-registered scroll view (renderScrollComponent).",
18
+ },
19
+ },
20
+ create(context) {
21
+ return {
22
+ JSXOpeningElement(node) {
23
+ if (node.name.type !== "JSXIdentifier") return;
24
+ const prop = SCROLL_COMPONENT_PROP[node.name.name];
25
+ if (!prop) return;
26
+ const registered = node.attributes.some(
27
+ (attribute) =>
28
+ attribute.type === "JSXAttribute" &&
29
+ attribute.name.type === "JSXIdentifier" &&
30
+ attribute.name.name === prop,
31
+ );
32
+ if (registered) return;
33
+ context.report({
34
+ node,
35
+ message: `Pass ${prop} so the list scrolls in a header-registered scroll view: NativeScrollView on iOS, or a component wrapping NativeScrollViewMarker. A list nested in another scroll surface or sheet can suppress this with a reason.`,
36
+ });
37
+ },
38
+ };
39
+ },
40
+});
vite.config.ts
+4
-1
@@ -439,7 +439,10 @@ export default defineConfig({
439
},
440
{
441
files: ["apps/mobile/src/**"],
442
- rules: { "t3code/no-mobile-uniwind-theme-escape-hatches": "error" },
442
+ rules: {
443
+ "t3code/no-mobile-uniwind-theme-escape-hatches": "error",
444
+ "t3code/require-registered-list-scroll": "error",
445
+ },
446
},
447
{
448
files: ["apps/mobile/src/**"],