Skip to content

ui: Remove PWA navigate fallback to prevent caching API endpoint requests - #25174

Merged
allozaur merged 2 commits into
ggml-org:masterfrom
allozaur:fix/server-endpoints-pwa-cache
Jul 1, 2026
Merged

ui: Remove PWA navigate fallback to prevent caching API endpoint requests#25174
allozaur merged 2 commits into
ggml-org:masterfrom
allozaur:fix/server-endpoints-pwa-cache

Conversation

@allozaur

@allozaur allozaur commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Removes the navigate fallback setting which caused an unwanted re-routing to index.html after caching it for the llama serve endpoints like /models, /props, /slots etc.

@allozaur
allozaur marked this pull request as ready for review June 30, 2026 14:30
@allozaur
allozaur requested a review from a team as a code owner June 30, 2026 14:30
Copilot AI review requested due to automatic review settings June 30, 2026 14:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the SvelteKit PWA configuration for the UI so the service worker does not interfere with llama serve API endpoints (for example /models, /props, /slots, /v1/models) by routing navigations to index.html.

Changes:

  • Removes the previously exported PWA_KIT_OPTIONS.NAVIGATE_FALLBACK helper and its usage in devOptions.
  • Sets a workbox.navigateFallback override intended to prevent the PWA plugin from adding a navigation fallback route that can affect API endpoints.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tools/ui/src/lib/constants/pwa.ts
Comment thread tools/ui/src/lib/constants/pwa.ts
@allozaur
allozaur force-pushed the fix/server-endpoints-pwa-cache branch from 1bdc0de to 302c2b4 Compare June 30, 2026 15:30
@allozaur
allozaur force-pushed the fix/server-endpoints-pwa-cache branch from 302c2b4 to 74c2880 Compare June 30, 2026 16:30
@allozaur

Copy link
Copy Markdown
Contributor Author

@ServeurpersoCom @aldehir

ready for review & testing

@ServeurpersoCom

Copy link
Copy Markdown
Contributor

I suspected as much; I merged it to my server right after your push --force, and I didn't encounter any regressions with the direct links (settings / conversations) in Firefox:)
The PWA still needs testing.

@allozaur

Copy link
Copy Markdown
Contributor Author

I suspected as much; I merged it to my server right after your push --force, and I didn't encounter any regressions with the direct links (settings / conversations) in Firefox:) The PWA still needs testing.

besides the obvious PWA testing path, what needs to be tested manually is entering the / path and then entering /models or /props for instance. I just tested on ur server and it worked perfectly after clicking the update app alert.

@ServeurpersoCom

ServeurpersoCom commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

This LGTM, (no address bar to check URL on PWA), quick test OK no problem on install / any pages

@aldehir aldehir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Giving approval, won't be available to test for a couple of days.

@allozaur
allozaur merged commit 7af4279 into ggml-org:master Jul 1, 2026
6 checks passed
DFveloper pushed a commit to DFveloper/aikar-engine that referenced this pull request Jul 3, 2026
erusev added a commit to ggml-org/Llama-macOS that referenced this pull request Jul 5, 2026
Picks up the upstream webui fix that stopped the PWA service worker from caching API endpoint requests (ggml-org/llama.cpp#25174).
adrianhoehne pushed a commit to adrianhoehne/llama.cpp that referenced this pull request Jul 5, 2026
CowboyTim pushed a commit to aardbeiplantje/llama.cpp that referenced this pull request Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants