Repository navigation
Studio: make the web UI installable as a PWA - #13360
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 982421205b
ℹ️ 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".
| "name": "Unsloth Studio", | ||
| "short_name": "Unsloth", | ||
| "id": "/", | ||
| "start_url": "/", |
There was a problem hiding this comment.
Avoid installing against an ephemeral tunnel origin
When Studio is opened through the built-in --secure or Remote access flow, this URL resolves against the current *.trycloudflare.com origin. That flow explicitly uses a temporary URL and creates a new one each time Studio starts (studio/frontend/src/features/settings/components/remote-access-section.tsx:379-381), so the installed app's launch URL points to a dead hostname after the next restart. Either suppress the install manifest for quick-tunnel requests or provide a stable launch origin before advertising installation.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Install is user initiated, and a quick tunnel URL is temporary for bookmarks and shortcuts too. The request in #12262 is a stable HTTPS origin behind a reverse proxy, which is what this targets, so I'd rather not add per origin manifest routing for the quick tunnel case.
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Fixes #12262
Mobile browsers never offered to install the Studio web UI as an app:
index.htmllinked no web app manifest, and/manifest.webmanifestfell through to the SPA catch-all and came back as the HTML shell.Changes
studio/frontend/public/manifest.webmanifest: name,start_url: "/",scope,display: "standalone", and a 192px plus a 512px icon.studio/frontend/public/pwa-192.png: the existingrounded-512.pngdownscaled to 192px. The 512px entry reusesrounded-512.pngas is, so nothing that reads it by name (theinstall.shlauncher icon) moves.studio/frontend/index.html: one<link rel="manifest">.tests/studio/test_pwa_manifest.py: the link is present, the manifest has the fields Chromium checks, and each icon exists with the declared size.No backend change. Vite copies
public/intodist/, the existing catch-all serves the file, Python'smimetypesmaps.webmanifesttoapplication/manifest+json(3.11 to 3.13), and the CSP'sdefault-src 'self'already covers a same-origin manifest. No service worker, so caching and offline behaviour are unchanged.Testing
Installed Studio from this branch with
install.sh --localand launched it with--secure:GET /manifest.webmanifest200 text/html(the SPA shell)200 application/manifest+jsonPage.getInstallabilityErrorsover HTTPSno-manifest/chatstill returns the HTML shell and an unknown/assets/*path still 404s.tests/studio/test_pwa_manifest.pyfails on main (2 failed) and passes here (2 passed).test_middleware.py,test_frontend_resolution.py,test_llama_compat_routes.py,test_frontend_dist_cache.py,test_package_discovery.py,test_tauri_branding_contract.py): 288 passed, 2 skipped on both main and this branch.node --testfiles that readindex.html: 69 passed.tsc --noEmitclean, bundle budget within limits.HTTPS is still the deployment's job for LAN access (a reverse proxy, or
--secure). Desktop ignores the manifest: its webview does not install PWAs and its CSP is alsodefault-src 'self'.Before / after
Same Chromium build against two isolated Studio installs (merge base
a4b9c62vs this branch).Opening
/manifest.webmanifest: main returns the Studio shell, this PR returns the manifest.Chromium's install check on the Studio home (caption drawn by the test harness; the page itself is unchanged):
no-manifeston main, installable with this PR.