fix(mobile): stabilize timeline initial load and scroll behavior#4856
fix(mobile): stabilize timeline initial load and scroll behavior#4856
Conversation
SafeDep Report SummaryNo dependency changes detected. Nothing to scan. This report is generated by SafeDep Github App |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c5c9fe1178
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return remoteQuery | ||
| } | ||
|
|
||
| if (remoteQuery.error) { |
There was a problem hiding this comment.
Surface first-load remote errors before returning fallback state
For timeline view queries, this branch assumes remoteQuery.error will be set when the remote fetch fails, but useRemoteEntries above returns fallbackReturn whenever !query.data, which is also true for an initial failed request with no cached pages. In that common offline/timeout scenario, remoteQuery.error stays null, this local fallback path never runs, and the list remains in the empty loading state instead of showing local entries, contradicting the intended "local fallback on remote errors" behavior.
Useful? React with 👍 / 👎.



Description
This PR refactors mobile timeline initial loading to avoid rendering cached entries before remote data in timeline views. It changes
useEntriesto use remote-first behavior for timeline view queries with local fallback only on remote errors. It also scopes query state byviewId + activeacross list components and adjusts top reset timing so the list only resets once after first ready state.PR Type
Screenshots (if UI change)
N/A
Demo Video (if new feature)
N/A
Linked Issues
N/A
Additional context
Please focus review on initial timeline load consistency and scroll-position stability during refresh.
Changelog