Repository navigation
Conversation
allozaur
force-pushed
the
allozaur/refactor/ui-typed-routes-and-dev-proxy
branch
from
November 24, 2026 14:10
f2bcb0e to
2497365
Compare
allozaur
force-pushed
the
allozaur/refactor/ui-typed-routes-and-dev-proxy
branch
from
November 24, 2026 14:45
2497365 to
d0e8cbb
Compare
This was referenced Nov 24, 2026
llama-server refuses browser requests whose Origin does not match its own host unless --cors-origins allows it, and the Vite proxy forwarded the page's Origin (localhost:5173, or a LAN or Tailscale address). Loading a model, saving tools and /v1 calls failed with 403 under `vite dev`. The proxy now calls the server with its own Host and no Origin, WebSocket upgrades included. Sec-Fetch-Site still passes through, so requests from other sites stay refused. Assisted-by: Claude (Opus 5.5 Medium)
ROUTES holds the app's route ids, as page.route.id reports them, in place of hash strings and the separate *_ROUTE_ID constants. Every link and goto() goes through resolve() from $app/paths, which checks the route exists and returns its URL (#/models with the hash router). RouterService resolves the routes that take params: a chat, a project, a project's chat or new chat, and an extension's page. Tab links, sidebar items and extension navigation items carry the resolved URL's type, and checks for the current page compare page.route.id instead of the hash. svelte/no-navigation-without-resolve is on again, with type information for the app's modules so a URL typed as ResolvedPathname passes. Links that leave the app say so with rel="external"; the deep-link cleanups, which change the current page's own query, are marked as such. Assisted-by: Claude (Opus 5.5 Medium)
allozaur
force-pushed
the
allozaur/refactor/ui-typed-routes-and-dev-proxy
branch
from
November 24, 2026 16:43
d0e8cbb to
9a28def
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Llama Chat navigates through SvelteKit's typed routes, and its dev server reaches llama-server without a 403. Nothing changes for the user of a build; the URLs are the same
#/…ones.Additional information
The new bottom of the fork stack. These two commits sat at the bottom of the Llama Harness branch (#55) without being part of it, and every layer above builds on them. The harness itself is upstream now (ggml-org#32927), so #55 is closed and the two commits get a PR of their own.
What changed
ROUTESholds route ids, aspage.route.idreports them, in place of hash strings and the separate*_ROUTE_IDconstants. Every link andgoto()goes throughresolve()from$app/paths, which checks the route exists and returns its URL (#/modelswith the hash router).RouterServiceresolves the routes that take params. Checks for the current page comparepage.route.idinstead of the hash, andsvelte/no-navigation-without-resolveis on again.Originis not its own host unless--cors-originsallows it, and the Vite proxy forwarded the page's origin, so loading a model, saving tools and/v1calls failed with 403 undervite dev. The proxy now calls the server with its ownHostand noOrigin, WebSocket upgrades included.Sec-Fetch-Sitestill passes through, so requests from other sites stay refused.Testing
ui/apps/chat:npm run check(0 errors),npm run lintand the unit tests pass on this branch, rebased onto master at 9578bd3.Requirements
Claude (Opus 5.5 Medium)