fix(android): serve icons locally during bubblewrap project generation - #144
Conversation
bubblewrap downloads icon URLs when scaffolding the Android project. The prod URL (app.fuzefront.com/icons/) is not yet live, causing 404 and build failure. Patch icon URLs to localhost:8080 and start a Python HTTP server serving frontend/public so bubblewrap can fetch the committed icon files instead. Co-Authored-By: Claude <noreply@anthropic.com>
CI failure: Playwright sign-in flow — root cause & fixRoot causeThe "Build, serve & register clock-app" step in curl -fsS -X POST http://localhost:3001/api/apps/register \
-H 'Content-Type: application/json' \
-d '{...}'The FixAfter the admin user is seeded (the preceding step), log in to obtain a JWT and pass it in the # Obtain a JWT token — /api/apps/register requires authentication.
TOKEN=$(curl -fsS -X POST http://localhost:3001/api/auth/login \
-H 'Content-Type: application/json' \
-d '{"email":"admin@fuzefront.dev","password":"admin123"}' \
| jq -r '.token')
# url = backend-reachable (drives the health check); remoteUrl = browser-reachable.
curl -fsS -X POST http://localhost:3001/api/apps/register \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $TOKEN" \
-d '{"name":"FuzeClock",...}'Why this is blockedI prepared this exact fix on branch Note: this failure is unrelated to the Android APK changes in PR #144 — it was a pre-existing breakage caused by the security hardening of the apps registration endpoint. |
CI Fix — Email Integration (MailHog) failureRoot cause: The Fix applied on branch
The Note: GitHub Actions is not permitted to create PRs in this repo, so the fix has been pushed to branch 🤖 Generated with Claude Code |
Summary
bubblewrap updatedownloads icon URLs when scaffolding the Android Gradle projecthttps://app.fuzefront.com/icons/pwa-512x512.pngreturns 404 (production PWA not yet deployed), causing build run feat(build): Implement comprehensive security scanning with GitHub Advanced Security #3 to fail withcli ERROR Failed to download icon ... Responded with status 404twa-manifest.jsontohttp://localhost:8080/icons/...and start a Python HTTP server servingfrontend/public(which contains the committed PNG files) for the duration of thebubblewrap updatecallWhat changed
.github/workflows/build-android-apk.yml— "Scaffold Android project from TWA manifest" step:bubblewrap update, patchiconUrl,maskableIconUrl, andmonochromeIconUrlintwa-manifest.jsontolocalhost:8080python3 -m http.server 8080 --directory ../frontend/publicin the backgroundbubblewrap update --skipPwaValidation(which now downloads icons from localhost)The committed icons in
frontend/public/icons/(pwa-512x512.png,pwa-maskable-512x512.png) are the same files that will eventually be served at the production URL, so the APK icons are correct.Test plan
build-android-apk.ymlrun Rename repository from FrontFuse to FuzeFront #4fuzefront-android-vNis uploaded (90-day retention)android-vNis created with the APK attachedGenerated by Claude Code