This repository was archived by the owner on Sep 10, 2026. It is now read-only.
Repository navigation
Serve a placeholder icon instead of linking one that is not there - #55
Merged
Merged
Conversation
Every engine-rendered page linked `/favicon.png` and `/icons/Icon-192.png` unconditionally. Those come from the game's own `public/`, which a fresh scaffold ships holding a single `.gitkeep`, so until a Flutter web build landed there the browser tab was blank and all four manifest icons 404ed. An Android-only game, which never runs `build:web`, stayed that way permanently, even though the download page's hero already had a fallback for exactly this case. The shell now links the EigenInteractive mark, served by the worker and drawn in `site.primaryColor`, and the manifest advertises that one scalable icon rather than four missing PNGs. Apple's touch icon is omitted rather than pointed at a missing file, since it has no SVG support. A placeholder, not a default: the moment `favicon.png` exists in `public/`, the game's own icons are linked everywhere and this goes unused. Splits the asset probe in two to make that work. `hasWebBuild` asks for `index.html` and still gates "Play on the web"; `hasAppIcons` asks for `favicon.png` and gates every icon. One probe served both on the grounds that `flutter build web` emits them together, which holds for a game that ships on the web and fails the case worth supporting. `hasAppIcons` also checks the content type, because the scaffold's `single-page-application` fallback answers `200 OK` with `index.html` for any missing asset. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Every page the engine renders linked
/favicon.pngand/icons/Icon-192.pngunconditionally. Those are static assets from the game's ownpublic/, which a fresh scaffold ships holding a single.gitkeep, so until a Flutter web build landed there the browser tab was blank and all four manifest icons 404ed.An Android-only game never runs
build:web, so it stayed that way permanently — even though the download page's hero already had a fallback for exactly this case. The asymmetry is what this fixes.What changes
public/public/<link rel="icon" type="image/svg+xml" href="/_eigen/icon/v1/mark.svg"><link rel="icon" href="/favicon.png">+ apple-touchIcon-192.pngThe mark is served by the worker, drawn in
site.primaryColor, and switches its neutral stroke for a dark tab strip. Apple's touch icon is omitted rather than pointed at a missing file, since it has no SVG support; iOS then derives one from the page, which beats a broken request.It is a placeholder, not a default. The moment
favicon.pngexists the engine links the game's own icons everywhere and stops serving its own, so the override needs no configuration.The probe split
hasWebBuildasks forindex.htmland still gates "Play on the web". The newhasAppIconsasks forfavicon.pngand gates every icon. These were one question, on the stated grounds thatflutter build webemits both together: true for a game that ships on the web, wrong for the case worth supporting.hasAppIconschecks the response's content type as well as its status, because the scaffold'ssingle-page-applicationfallback answers200 OKwithindex.htmlfor any missing asset once a web build exists. Status alone would read that as an icon and link a web page where an image belongs.Notes
run_worker_firstchange needed: underassets_navigation_prefers_asset_servingonly navigation requests bypass the Worker, and an icon fetch is a subresource. This is the same route mechanism the bundled fonts already use.public/, so a day-old copy would hide the very deploy that adds icons.immutable: its bytes carrysite.primaryColor.Verification
174 tests pass. Four are new, and they close the branch the suite previously carried as
KNOWN GAP: the other side of this branch is untested— including an Android-only game with icons and no web build, and the SPA-fallback false positive.🤖 Generated with Claude Code