Skip to content

📊 - Enable EAS Observe expo-router integration#642

Merged
guytepper merged 1 commit into
mainfrom
feat/observe-expo-router-integration
Jun 29, 2026
Merged

📊 - Enable EAS Observe expo-router integration#642
guytepper merged 1 commit into
mainfrom
feat/observe-expo-router-integration

Conversation

@guytepper

Copy link
Copy Markdown
Member

Enables the EAS Observe expo-router integration for per-route navigation metrics.

  • Add Observe.configure({ integrations: { "expo-router": true } }) at module scope in the root layout — gives automatic per-route cold_ttr/warm_ttr.
  • Call markInteractive() in the route list screen once results resolve, for per-route TTI.

https://claude.ai/code/session_015RHnt2t7dXS9c5PAqLNkgM

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
@guytepper guytepper merged commit 211b004 into main Jun 29, 2026
1 check passed
@guytepper guytepper deleted the feat/observe-expo-router-integration branch June 29, 2026 17:27

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +282 to +288
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])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
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])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant