Skip to content

Make MelodyMath installable and document the Google Play path - #1000

Merged
Swissystem7 merged 4 commits into
masterfrom
cursor/installable-pwa-0854
Nov 17, 2026
Merged

Swissystem7 merged 4 commits into
masterfrom
cursor/installable-pwa-0854

Conversation

@Swissystem7

Copy link
Copy Markdown
Owner

Summary

The manifest, service worker, and icons were already in the repo, and src/lib/core.js added the manifest link only after JavaScript ran. The HTML itself did not link the manifest, and iOS never received the Apple web-app tags, so the live site was not a proper installable app.

This links the manifest, Apple touch icon, theme color, and iOS standalone tags from every entry page, and registers the service worker with the site-root scope. On GitHub Pages that scope is /MelodyMath/. Hebrew lang="he" and dir="rtl" are unchanged, and no visible copy or colors of the pages were edited. The offline cache is now melodymath-offline-v53: the shell installs even if one later file 404s, and a navigation that cannot reach the network falls back to the cached page, then index.html. Cached files still refresh in the background so a fix shows up on the next visit without mixing a new page with an old script.

The GitHub release v1.0.0-android is not a Play build. MelodyMath.apk (uploaded 2026-10-12) is a debug-signed Kotlin WebView shell (com.swissystem.melodymath, Android Gradle Plugin 8.5.2) that loads file:///android_asset/www/index.html. It is not Capacitor and not a Trusted Web Activity. The bundled site matches commit 27f66919302fb81cee74168a45df8feec3356bff (service worker melodymath-offline-v15), not current master. The Android project was never committed, and Play will not accept the Android debug certificate.

docs/android-release.md and android/twa-manifest.json are the Bubblewrap path (CLI 1.27.0, targetSdkVersion 36). No keystore, Play account, or listing is included. .well-known/assetlinks.json.example is only a template: Play reads asset links from https://swissystem7.github.io/.well-known/assetlinks.json, which is the user site repo, not this project.

Installability

Lighthouse 12.8.2 no longer has a PWA category (asking for it returns an empty report). The check below is Chrome's own installability API, which is what that category used to report.

Against a local server of this branch:

  • http://127.0.0.1:8090/MelodyMath/index.html (the GitHub Pages path shape): Page.getInstallabilityErrors is empty. The manifest parses with no errors. The service worker scope is http://127.0.0.1:8090/MelodyMath/, the script is .../MelodyMath/sw.js, state activated, and it controls the page.
  • The same check at the site root (http://127.0.0.1:8080/index.html) is clean, with scope /.
  • An offline reload of the start URL still shows the Hebrew RTL home page (lang=he, dir=rtl).
  • npm test: 2107 tests, 2089 passed, 0 failed.

Owner steps still required

Full commands are in docs/android-release.md.

  • Google Play. Play Console is a US$25 one-time registration fee (Get started with Play Console). Create a new upload keystore locally (do not reuse the debug key that signed the old APK), then from android/ run npx @bubblewrap/cli@1.27.0 update --skipVersionUpgrade and build. Upload app-release-bundle.aab. Package id com.swissystem.melodymath is permanent. First appVersionCode is 1.
  • Asset links, before review. Publish the real SHA-256 list at https://swissystem7.github.io/.well-known/assetlinks.json in the repo swissystem7/swissystem7.github.io. With Play App Signing, that fingerprint is the app signing certificate from Play Console, not only the upload key. The maskable icon URL must be live on Pages before bubblewrap update fetches it.
  • Listing decisions. New personal accounts may have to run a closed test (12 testers for 14 days) before production. Organization accounts differ and can require a D-U-N-S number. The product is elementary practice, so a listing that includes children has to meet the Families policy. Privacy policy URL: https://swissystem7.github.io/MelodyMath/privacy.html. Data safety should match that page.
  • iOS. Safari → Share → Add to Home Screen is the install path, with no Apple fee. The App Store is US$99 per year, and a WebView wrapper of this site is likely to fail Guideline 4.2. No Capacitor or Xcode project is added.

node tools/pr-size.js reports 548 lines, over the auto-merger's 400-line ceiling. This PR is not for auto-merge.

Open PRs that also touch sw.js, index.html, or the manifest: #954, #953, #952.

Open in Web Open in Cursor 

…y path.

Link the manifest, Apple touch icon, and theme color from every entry page, register the service worker at the site-root scope, and keep the offline cache versioned so one missing file cannot block installation. Add Bubblewrap config and release steps without keys or a store listing.

Co-authored-by: Aviran Swissa <swissa.aviran@s.afeka.ac.il>
Comment thread test/pwa.test.js Fixed
Comment thread test/pwa.test.js Fixed
@codecov

codecov Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

cursoragent and others added 3 commits November 17, 2026 07:16
Keep master's precache list and move the offline cache to v102, one
past master's v101, because the shell still installs with addAll while
the rest of the list is best-effort. Maskable icons, manifest links,
and the Play path docs stay.

Co-authored-by: Aviran Swissa <swissa.aviran@s.afeka.ac.il>
CodeQL js/incomplete-sanitization flagged prefix.replace(/[.]/g, '\\.')
because a backslash in the path was left unescaped before the string was
compiled as a regular expression. Read the href from the link tag instead.

Run installSharedChrome against a document double so the new meta tags
and the service-worker scope are executed and counted by patch coverage.

Co-authored-by: Aviran Swissa <swissa.aviran@s.afeka.ac.il>
@Swissystem7
Swissystem7 merged commit 0f0fb85 into master Nov 17, 2026
5 checks passed
@Swissystem7
Swissystem7 deleted the cursor/installable-pwa-0854 branch November 17, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants