Skip to content

Commit 5f6dfb3

Browse files
thymikeeclaude
andauthored
feat(test-app): add a Bluesky-depth heavy feed screen (#3884)
* feat(test-app): add a Bluesky-depth heavy feed screen A JavaScript-only route that reproduces a heavy React Native home feed: 30 nested containers above a virtualized list of composite posts with image, link, quote, and quote-with-media embeds. Its native accessibility tree is deeper than 65 levels, so XCTest tree capture fails with kAXErrorIllegalArgument and recovers through private AX, as on Bluesky 1.136. Settings links to it with open-heavy-feed. Co-Authored-By: Claude Opus 5.5 <[email protected]> * refactor(test-app): share one route-param parser and keep the heavy feed card last Review on #3884: HeavyFeedScreen, DeepTreeScreen and TickerScreen each carried a copy of clampInteger; they now import it from route-params.ts. The heavy feed entry moves to its own last Settings card so the cards the Maestro differential flows tap without scrolling keep their positions (#1299). The README node count now matches the measured 305-308 raw nodes. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent f7844aa commit 5f6dfb3

9 files changed

Lines changed: 407 additions & 12 deletions

File tree

‎examples/test-app/README.md‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ It is intentionally small, but each surface is dense with durable accessibility
1919
- `Automation lab`: long-press, alert-result, app-event, app-state, appearance, orientation, permission-recovery, log canaries, a flattened (`accessible={true}`) text input, and an Apple Pay sheet hosted in `com.apple.PassbookUIService`
2020
- `WebView accessibility`: a deterministic semantic fixture plus live websites with varied HTML for native accessibility snapshot verification
2121
- `Perf lab`: seeded JavaScript render problems for `react-devtools profile`, one per scenario (see [Perf lab](#perf-lab))
22+
- `Heavy feed`: a Bluesky-shaped home feed whose accessibility tree is deeper than 65 levels (see [Heavy feed](#heavy-feed))
2223

2324
Navigation uses Expo Router native bottom tabs, so the tab bar itself is also part of the test surface.
2425

@@ -261,6 +262,23 @@ agent-device react-devtools profile stop
261262

262263
`src/screens/PerfLabScreen.tsx` imports only React and React Native, so it can be copied into a bare React Native app to check the profiler on other React Native versions.
263264

265+
## Heavy feed
266+
267+
**Settings → Open heavy feed** (`open-heavy-feed`) opens a JavaScript-only reproduction of a heavy
268+
React Native home feed, shaped after Bluesky 1.136. Thirty nested containers stand in for its
269+
navigation and provider layers. Below them a virtualized list renders posts with avatar, text,
270+
image, link, quote, and quote-with-media embeds. Every level opts out of view flattening, so the
271+
native accessibility tree is deeper than 65 levels and holds about 300 raw nodes.
272+
273+
On this screen the XCTest tree capture fails with `kAXErrorIllegalArgument` and recovers through
274+
private AX, while the simulator accessibility bridge still answers. Use it to reproduce deep-tree
275+
capture, recovery, and gesture-routing behavior without a third-party app. `wrappers` (default 30)
276+
and `posts` (default 60) route parameters change the shape.
277+
278+
The stable ids are `heavy-feed-title`, `heavy-feed-liked-count`, `heavy-feed-last-action`, and per
279+
post `heavy-post-<n>`, `heavy-post-<n>-like`, `-reply`, `-repost`, and `-more`. A like press updates
280+
`Liked posts: <count>`, and a long press on a post sets `Last action: held post <n>`.
281+
264282
## Local Agent Device suites
265283

266284
The repo includes two local suites for iterating on the fixture app:

‎examples/test-app/app/(tabs)/settings.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export default function SettingsRoute() {
1919
onLoadDiagnostics={state.loadDiagnostics}
2020
onOpenAccessorySetup={() => router.push('/accessory-setup')}
2121
onOpenAutomationLab={() => router.push('/automation')}
22+
onOpenHeavyFeed={() => router.push('/heavy-feed')}
2223
onOpenInertSurface={() => router.push('/inert')}
2324
onOpenSnapshotDepth={() => router.push('/snapshot-depth')}
2425
onOpenWebViewLab={() => router.push('/webview')}

‎examples/test-app/app/_layout.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ function RootLayoutContent() {
2828
<Stack.Screen name="inert" options={{ presentation: 'fullScreenModal' }} />
2929
<Stack.Screen name="snapshot-depth" />
3030
<Stack.Screen name="deep-tree" />
31+
<Stack.Screen name="heavy-feed" options={{ headerShown: true, title: 'Heavy feed' }} />
3132
<Stack.Screen name="ticker" />
3233
<Stack.Screen name="perf-lab" />
3334
<Stack.Screen name="product/[productId]" />
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { HeavyFeedScreen } from '../src/screens/HeavyFeedScreen';
2+
3+
export default function HeavyFeedRoute() {
4+
return <HeavyFeedScreen />;
5+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export function clampInteger(
2+
value: string | undefined,
3+
fallback: number,
4+
min: number,
5+
max: number,
6+
): number {
7+
const parsed = Number.parseInt(value ?? '', 10);
8+
if (!Number.isFinite(parsed)) return fallback;
9+
return Math.min(max, Math.max(min, parsed));
10+
}

‎examples/test-app/src/screens/DeepTreeScreen.tsx‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { useLocalSearchParams } from 'expo-router';
22
import { StyleSheet, Text, View } from 'react-native';
33

4+
import { clampInteger } from '../route-params';
45
import { useAppColors, type AppColors } from '../theme';
56

67
/**
@@ -62,12 +63,6 @@ function DeepLevel({
6263
);
6364
}
6465

65-
function clampInteger(value: string | undefined, fallback: number, min: number, max: number) {
66-
const parsed = Number.parseInt(value ?? '', 10);
67-
if (!Number.isFinite(parsed)) return fallback;
68-
return Math.min(max, Math.max(min, parsed));
69-
}
70-
7166
function createStyles(colors: AppColors) {
7267
return StyleSheet.create({
7368
frame: {

0 commit comments

Comments
 (0)