[judy] feat(pwa): installable PWA shell (manifest + service worker)#46
Merged
Conversation
Make OpenForge installable as a standalone Mac app via Chrome/Edge
"Install app" — no native bundle, no Electron, no signing. Verified:
curl /manifest.webmanifest -> 200 application/manifest+json
curl /sw.js -> 200 + Service-Worker-Allowed: /
Changes:
- web/manifest.webmanifest: name/icons/theme using existing branding/*
- web/sw.js: SWR cache for shell assets, network-only for /api/*
- server.py: whitelist routes for both files (sw.js gets the SW header)
- web/index.html: <link rel=manifest>, theme-color, apple-mobile-web-app-*,
and a deferred navigator.serviceWorker.register('/sw.js')
Phase 1: shell only. Tray icon / global hotkeys / native notifications
would be a follow-up Tauri wrapper once we know standalone window mode
is enough for daily use.
🤖 bot-review (comment-only · phase 1)Diff: Red-line checks:
Needs human review — these paths are not eligible for future auto-approve:
Phase 1: this bot leaves comments only. Auto-approve will be enabled per-path after 1–2 weeks of clean runs. Promotion plan: judy PR #42 follow-up. |
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.
Thread:
th_19e6e6a8a5a_2979da(将 OpenForge 封装成可独立运行的 app)What
Phase 1 of the "OpenForge as a Mac app" plan: make the existing web UI installable as a standalone Dock app via Chrome/Edge's "Install app" affordance. No native bundle, no Electron, no code signing — backend keeps running under launchd unchanged.
Changes
web/manifest.webmanifest— name/short_name/icons (reuses existingbranding/logo-forge-f-{32,48,256}.png),display: standalone+window-controls-overlayfallback, theme#0a0a0ato match the new Slack-ish palette.web/sw.js— minimal service worker. Stale-while-revalidate on a small allow-list of shell assets (style.css, app.js, /branding/, /assets/, manifest). All/api/*requests are network-only (belt + suspenders).CACHE_VERSIONconstant for easy bumps.server.py— whitelisted routes for/manifest.webmanifestand/sw.js. The SW response also setsService-Worker-Allowed: /so its scope is unambiguous.web/index.html—<link rel=manifest>,theme-color,apple-mobile-web-app-*metas, and a deferrednavigator.serviceWorker.register('/sw.js', { scope: '/' }). Registration failure is non-fatal.Verification
Ran the server on a side port and curled:
To install: open http://127.0.0.1:7878/ in Chrome → address bar shows an "Install app" icon → click → standalone window with Forge icon in Dock and Cmd-Tab.
Out of scope (deliberate)
forge update. Not worth it while OpenForge is single-user.cc @scott