signalk-pypilot-newui 3.1.3 → 3.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,54 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.1.4 — 2026-10-14 — iOS "Add to Home Screen" PWA basics (issue #5)
4
+
5
+ Rev469. Patch bump: no code changes, just the HTML shell. Thanks to
6
+ [@eric-fitzsimon](https://github.com/eric-fitzsimon) for the detailed
7
+ report in [#5](https://github.com/Aitonos/signalk-pypilot-newui/issues/5):
8
+ on iOS, adding the webapp to the home screen worked the first launch,
9
+ then subsequent launches loaded the page but Tune gain sliders stayed
10
+ empty and Chart did not populate.
11
+
12
+ ### Added — PWA meta tags in the shell
13
+
14
+ ```html
15
+ <meta name="apple-mobile-web-app-capable" content="yes" />
16
+ <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
17
+ <meta name="apple-mobile-web-app-title" content="PyPilot" />
18
+ <meta name="mobile-web-app-capable" content="yes" />
19
+ <meta name="theme-color" content="#0a1220" />
20
+ <link rel="apple-touch-icon" href="icon.svg" />
21
+ ```
22
+
23
+ Previously the shell had none of these, so iOS treated the home-screen
24
+ bookmark as a half-baked WebView bookmark with a storage context
25
+ distinct from Safari and no explicit standalone contract.
26
+
27
+ ### Fixed — stale `app.js` cached indefinitely by iOS WebView
28
+
29
+ Added `Cache-Control: no-cache, no-store, must-revalidate` + legacy
30
+ `Pragma` / `Expires` HTTP-equiv metas to the shell. iOS Safari (both
31
+ browser and standalone WebView) was caching the first successful load
32
+ of `app.js` and ignoring the `?v=RevNNN` query bump that `deploy.ps1`
33
+ writes on every deploy. Result: user's bookmark served a stale JS
34
+ bundle for days, mismatching the backend API and leaving features
35
+ unpopulated. These metas force the WebView to re-fetch the shell on
36
+ every launch; the actual `app.js?v=RevNNN` request then matches the
37
+ current backend.
38
+
39
+ See `docs/_audit_ios_pwa_issue_5.md` for the full forensics.
40
+
41
+ ### Known limitations
42
+
43
+ - `apple-touch-icon` points to `icon.svg`. iOS prefers PNG for the
44
+ home-screen icon; with SVG only, iOS may use a page-screenshot
45
+ fallback. A proper PNG set is TODO for a future release.
46
+ - No Service Worker. Rev-A path only — if the Cache-Control metas do
47
+ not fully fix the issue on Eric's device, Rev-B/C/D will add a
48
+ `visibilitychange` reconnect handler, a standalone-mode banner with
49
+ "Reset app data" button, and eventually a proper SW. Not shipped
50
+ yet because they are not confirmed necessary.
51
+
3
52
  ## 3.1.3 — 2026-10-14 — Safety: offline-aware write gating + batched trace + AIS polish
4
53
 
5
54
  Rolls up Rev464 → Rev468 (5 revs) on top of 3.1.2. Patch bump: no
package/dist/index.js CHANGED
@@ -28,7 +28,7 @@ const trip_recorder_1 = require("./trip-recorder");
28
28
  const maneuver_trace_1 = require("./maneuver-trace");
29
29
  // Rev counter bumped on every build so the user can distinguish deploys
30
30
  // from the webapp header (feedback_revision_bump_each_build).
31
- const PLUGIN_REVISION = "Rev468";
31
+ const PLUGIN_REVISION = "Rev469";
32
32
  // Rev59: read package.json once at load time so /status can report the
33
33
  // npm package version alongside the internal Rev counter.
34
34
  // eslint-disable-next-line @typescript-eslint/no-require-imports
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signalk-pypilot-newui",
3
- "version": "3.1.3",
3
+ "version": "3.1.4",
4
4
  "description": "Signal K friendly UI for the pypilot autopilot, with first-class Signal K paths and Simple Switches so any downstream Signal K client can drive or monitor the pilot. Touch-first mobile visor + full pypilot data (servo, gains, calibration, tack, warnings). Coexists with pypilot-autopilot-provider.",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {
package/public/index.html CHANGED
@@ -5,6 +5,24 @@
5
5
  <meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover" />
6
6
  <title>PyPilot New-UI</title>
7
7
  <link rel="icon" href="icon.svg" type="image/svg+xml" />
8
+ <!-- Rev469 (issue #5, @eric-fitzsimon): iOS Add to Home Screen
9
+ support. Without these metas iOS creates a half-baked bookmark
10
+ whose WebView aggressively caches a stale app.js and desyncs
11
+ from the backend on subsequent launches. See
12
+ docs/_audit_ios_pwa_issue_5.md for the full analysis. -->
13
+ <meta name="apple-mobile-web-app-capable" content="yes" />
14
+ <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
15
+ <meta name="apple-mobile-web-app-title" content="PyPilot" />
16
+ <meta name="mobile-web-app-capable" content="yes" />
17
+ <meta name="theme-color" content="#0a1220" />
18
+ <link rel="apple-touch-icon" href="icon.svg" />
19
+ <!-- Rev469: force the standalone WebView to always re-fetch the
20
+ shell + app.js on launch. Without this, iOS caches the first
21
+ successful load indefinitely and ignores the `?v=RevNNN`
22
+ query bump that deploy.ps1 writes on every deploy. -->
23
+ <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
24
+ <meta http-equiv="Pragma" content="no-cache" />
25
+ <meta http-equiv="Expires" content="0" />
8
26
  <link rel="stylesheet" href="style.css" />
9
27
  </head>
10
28
  <body class="theme-dark">
@@ -2483,6 +2501,6 @@
2483
2501
  </div>
2484
2502
  </div>
2485
2503
 
2486
- <script src="app.js?v=Rev468"></script>
2504
+ <script src="app.js?v=Rev469"></script>
2487
2505
  </body>
2488
2506
  </html>