ninja_s6114 runs magpie in Docker and put the web UI on an iPhone's home screen; it opened with Safari's address and bookmarks bars. Now it opens standalone, with no setup: - index.html links manifest.json (display standalone, name magpie, start_url and scope "./", 180 and 512 px icons) and an apple-touch-icon, and sets apple-mobile-web-app-capable, mobile-web-app-capable, the title and status bar style "default". theme-color is set only under (display-mode: standalone), light #f4f4f6 and dark #1a1a1e, so a browser tab and the Wails windows look as before. - webGuard serves exactly /manifest.json, /icons/apple-touch-icon.png and /icons/icon-512.png on GET/HEAD without the key, since a home screen may fetch them without the page's cookie. Everything else still needs it. - The header's safe-area padding already in app.css (body.web .top) keeps it out from under the status bar and notch; app.css is unchanged. Run, at this head (rebased on origin/main): - go test ./internal/gui: ok, except TestRestartHandsTheGatewayOver, the handover EOF under load (#3451); it and TestWebAppAddsToHomeScreen pass 3 of 3 alone. - gofmt -l clean; go vet ./... on darwin, GOOS=linux -tags nogui, and GOOS=windows: ok; go build ok. - GUI web-app-standalone + i18n-keys: chromium 8/8, webkit 6/6 (the standalone cases are Chromium only, as WebKit can't emulate display-mode standalone; they run under --app with iPhone 13 safe-area insets 47/34 and touch, portrait and landscape, light and dark). - Before the rebase, 34 GUI files picked for strict fixtures/assert.fail on unexpected requests, plus menu-scroll, phone-web, mobile-web, web-page, old-webkit, usage-ledger and i18n-keys, in both engines: 563 of 576 pass. The reds fail the same on an origin/main copy and are filed: old-webkit Safari 15 (#3403), phone-web flick under load (#3180), gateway-key-models webkit under load (#2648), usage-ledger return-to-live (#3104). provider-detect-draft timed out under load and passes 20/20 alone. Broken by hand: - the guard exemption removed: the Go test fails with 401 on the manifest and the icon; - the old index.html: the Go test fails on the missing tags, and the GUI test fails in WebKit too; - theme-color media without display-mode: the GUI test fails in both engines; - app.css's body.web .top safe-area padding removed: the standalone test fails, ".top .brand under the status bar: 8". Not tried: a real iPhone or Android device and a real install; the whole GUI suite (the machine is loaded and nearly out of disk; run afterwards). iOS keeps the display mode it saw when the icon was added, so a user removes the old icon and adds it again. A home-screen app on iOS may not share Safari's cookie, so it can ask for the key once; MAGPIE_WEB_KEY keeps the key the same across restarts. iOS 27's top blur over the header is #3515, not changed here.
14 lines
356 B
JSON
14 lines
356 B
JSON
{
|
|
"name": "magpie",
|
|
"short_name": "magpie",
|
|
"start_url": "./",
|
|
"scope": "./",
|
|
"display": "standalone",
|
|
"background_color": "#f4f4f6",
|
|
"theme_color": "#f4f4f6",
|
|
"icons": [
|
|
{ "src": "icons/apple-touch-icon.png", "sizes": "180x180", "type": "image/png" },
|
|
{ "src": "icons/icon-512.png", "sizes": "512x512", "type": "image/png" }
|
|
]
|
|
}
|