📊 - Enable EAS Observe expo-router integration#642
Conversation
Adds Observe.configure for per-route navigation metrics and marks the route list screen interactive for per-route TTI. Claude-Session: https://claude.ai/code/session_015RHnt2t7dXS9c5PAqLNkgM
There was a problem hiding this comment.
Code Review
This pull request integrates expo-observe to track per-route navigation metrics, configuring the library in the root layout and using the useObserve hook to signal interactivity in the route list screen. The review feedback points out a potential issue where the interactivity signal might hang if the query is disabled, and suggests adding a check for enableQuery to resolve this.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| useEffect(() => { | ||
| const hasResults = filteredRouteData.length > 0 | ||
| const isTerminalEmpty = !trains.isLoading && (resultType === "not-found" || trains.status === "error") | ||
| if (hasResults || isTerminalEmpty) { | ||
| markInteractive() | ||
| } | ||
| }, [filteredRouteData.length, trains.isLoading, trains.status, resultType, markInteractive]) |
There was a problem hiding this comment.
If enableQuery is false, the query is disabled and filteredRouteData will remain empty. In this scenario, neither hasResults nor isTerminalEmpty will evaluate to true, meaning markInteractive() will never be called. This can cause the EAS Observe navigation transition to hang or time out.
To prevent this, we should check if the query is disabled (!enableQuery) and mark the screen as interactive immediately. Also, make sure to add enableQuery to the useEffect dependency array.
| useEffect(() => { | |
| const hasResults = filteredRouteData.length > 0 | |
| const isTerminalEmpty = !trains.isLoading && (resultType === "not-found" || trains.status === "error") | |
| if (hasResults || isTerminalEmpty) { | |
| markInteractive() | |
| } | |
| }, [filteredRouteData.length, trains.isLoading, trains.status, resultType, markInteractive]) | |
| useEffect(() => { | |
| const hasResults = filteredRouteData.length > 0 | |
| const isTerminalEmpty = !trains.isLoading && (resultType === "not-found" || trains.status === "error") | |
| const isQueryDisabled = !enableQuery | |
| if (hasResults || isTerminalEmpty || isQueryDisabled) { | |
| markInteractive() | |
| } | |
| }, [filteredRouteData.length, trains.isLoading, trains.status, resultType, enableQuery, markInteractive]) |
Enables the EAS Observe expo-router integration for per-route navigation metrics.
Observe.configure({ integrations: { "expo-router": true } })at module scope in the root layout — gives automatic per-routecold_ttr/warm_ttr.markInteractive()in the route list screen once results resolve, for per-route TTI.https://claude.ai/code/session_015RHnt2t7dXS9c5PAqLNkgM