Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@
},
"reanimated": {
"staticFeatureFlags": {
"DISABLE_COMMIT_PAUSING_MECHANISM": true
"DISABLE_COMMIT_PAUSING_MECHANISM": true,
"ANDROID_SYNCHRONOUSLY_UPDATE_UI_PROPS": true
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
}
}
}
8 changes: 6 additions & 2 deletions apps/mobile/src/components/LoadingStrip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,25 @@ function IndeterminateLoadingStrip() {
};
}, [travelProgress]);

// Keep the animated style transform-only. On Android a layout prop here would
// make every frame a shadow-tree commit instead of a synchronous UI update.
const indicatorStyle = useAnimatedStyle(
() => ({
transform: [
{
translateX: (containerWidth + indicatorWidth) * travelProgress.value - indicatorWidth,
},
],
width: indicatorWidth,
}),
[containerWidth, indicatorWidth],
);

return (
<LoadingStripFrame onLayout={setContainerWidth}>
<Animated.View className="h-full rounded-full bg-primary" style={indicatorStyle} />
<Animated.View
className="h-full rounded-full bg-primary"
style={[{ width: indicatorWidth }, indicatorStyle]}
/>
</LoadingStripFrame>
);
}
Expand Down
13 changes: 13 additions & 0 deletions docs/internals/performance-regressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,16 @@ continuous traffic during an outage.
Focused coverage: `ProjectionSettlement.test.ts`, `ThreadSettlementService.test.ts`,
`runtimeLayer.test.ts`, `AgentAwarenessRelay.test.ts`, `GitVcsDriverCore.test.ts`,
`ThreadStatusIndicators.subscriptions.test.tsx`, and `desktopLocal.test.ts`.

## Mobile looping animations

`apps/mobile/package.json` sets Reanimated's `DISABLE_COMMIT_PAUSING_MECHANISM` so keyboard
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
avoiding animates on iOS. Without commit pausing, an animation that commits to the shadow tree on every frame
can starve React's commits: the JS thread retries the same commit until it gives up, which looks
like a frozen screen where back does nothing. Release builds spin forever; dev builds abort with
`ShadowTree.cpp: assertion failed (attempts < 1024)`.

`ANDROID_SYNCHRONOUSLY_UPDATE_UI_PROPS` keeps Android out of that loop by applying transform,
opacity, and color updates directly to views. Keep looping animations (`withRepeat`, shimmers,
spinners) on those props. A layout prop such as `width` in the same animated style sends the
whole update back through the shadow tree every frame, so pass static sizes as a plain style.
Loading