ollama - ✅(Solved) Fix app/ui: chat shows loading flash when switching between conversations [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
ollama/ollama#15996Fetched 2026-05-07 03:31:58
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
cross-referenced ×1labeled ×1

Fix Action

Fixed

PR fix notes

PR #16000: app/ui: await ensureQueryData in chat route loader

Description (problem / solution / changelog)

The route loader fires ensureQueryData without await, so the component mounts before the cache is populated and briefly shows 'Loading chat...' on every navigation. Adding await makes TanStack Router wait for the data to be ready before rendering.

Fixes #15996

Changed files

  • app/ui/app/src/routes/c.$chatId.tsx (modified, +1/-1)
RAW_BUFFERClick to expand / collapse

What is the issue?

When switching from one chat to another, there's a brief "Loading chat..." flash before the messages appear. This happens every time, even if the chat data was already fetched.

Why it happens The route loader for the chat page fires off a data prefetch but doesn't wait for it to complete. The component mounts immediately, finds no data in the cache yet, and renders the loading state for a split second until the data arrives.

Expected behavior The router should wait for the chat data to be ready before mounting the component, so the user sees the messages instantly without any loading flash.

Relevant log output

OS

macOS

GPU

Apple

CPU

Apple

Ollama version

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING