feat(watch): a QR code of the viewer's address, set at build time #46

Merged
dawid merged 2 commits from viewer-qr into main 2026-11-18 06:39:52 +00:00
Owner

The watch's Viewers screen (after the last marker) now shows a QR code of the viewer's address, so a phone's camera opens the viewer straight from the watch. Start or a tap there still opens the viewers' menu. The address is set at build time.

  • tools/generate-viewer-address.mjs writes watch/source/ViewerAddress.mc: the origin, the relay Link calls (ViewerAddress.RELAY, was Link.RELAY) and the QR code, for WRISTMARK_ORIGIN or the default https://wristmark.apps.ciepiela.org. QR by qrcode 1.5.4 (MIT, viewer dev dependency), in upper case for alphanumeric mode: version 2, 25×25, level M. Decoded with jsQR for the default and another origin.
  • tools/build-watch.sh: with WRISTMARK_ORIGIN set, writes the file for it and puts the committed one back after the build (tried with a stub compiler).
  • tools/build-app-web.sh: the Android app's relay at WRISTMARK_ORIGIN when set.
  • release.yml: the repository variable WRISTMARK_ORIGIN (unset: the default) for the watch package and the APK; Node and the viewer's packages installed before the watch build.
  • MarkerView: the marker's layout moved into layout(dc, cells, quiet, line) (same results for the marker) and reused for the code, two modules of white around it; "Start: pair" below, "Viewer" above on round displays. On 416 px: 10 px modules, 250 px code.
  • CI's checks job: generate-viewer-address.mjs --check (the committed default).
  • Docs: docs/watch.md (The Viewers screen, The viewer's address), user guide, docs/android.md, docs/ci.md.

Device test: scan the Viewers screen with a phone's camera.

The watch's Viewers screen (after the last marker) now shows a QR code of the viewer's address, so a phone's camera opens the viewer straight from the watch. Start or a tap there still opens the viewers' menu. The address is set at build time. - `tools/generate-viewer-address.mjs` writes `watch/source/ViewerAddress.mc`: the origin, the relay `Link` calls (`ViewerAddress.RELAY`, was `Link.RELAY`) and the QR code, for `WRISTMARK_ORIGIN` or the default `https://wristmark.apps.ciepiela.org`. QR by `qrcode` 1.5.4 (MIT, viewer dev dependency), in upper case for alphanumeric mode: version 2, 25×25, level M. Decoded with jsQR for the default and another origin. - `tools/build-watch.sh`: with `WRISTMARK_ORIGIN` set, writes the file for it and puts the committed one back after the build (tried with a stub compiler). - `tools/build-app-web.sh`: the Android app's relay at `WRISTMARK_ORIGIN` when set. - `release.yml`: the repository variable `WRISTMARK_ORIGIN` (unset: the default) for the watch package and the APK; Node and the viewer's packages installed before the watch build. - `MarkerView`: the marker's layout moved into `layout(dc, cells, quiet, line)` (same results for the marker) and reused for the code, two modules of white around it; "Start: pair" below, "Viewer" above on round displays. On 416 px: 10 px modules, 250 px code. - CI's checks job: `generate-viewer-address.mjs --check` (the committed default). - Docs: `docs/watch.md` (*The Viewers screen*, *The viewer's address*), user guide, `docs/android.md`, `docs/ci.md`. Device test: scan the Viewers screen with a phone's camera.
feat(watch): the Viewers screen shows the QR code of the viewer's address
All checks were successful
CI / checks (pull_request) Successful in 36s
CI / e2e (pull_request) Successful in 1m44s
CI / relay (pull_request) Successful in 1m32s
CI / image (pull_request) Successful in 56s
CI / android (pull_request) Successful in 2m8s
CI / watch (pull_request) Successful in 2m49s
440ec57266
tools/generate-viewer-qr.mjs writes watch/source/ViewerQr.mc from Link.RELAY's origin with the
qrcode package (a dev dependency of the viewer): upper case in alphanumeric mode, version 2,
25 modules, level M. MarkerView draws it with the marker's layout (now MarkerView.layout) and
two modules of white; CI's checks job fails when it is stale.
dawid changed title from feat(watch): the Viewers screen shows the QR code of the viewer's address to feat(watch): a QR code of the viewer's address, set at build time 2026-11-18 06:17:07 +00:00
feat: the viewer's address set at build time (WRISTMARK_ORIGIN)
All checks were successful
CI / checks (pull_request) Successful in 36s
CI / e2e (pull_request) Successful in 1m46s
CI / relay (pull_request) Successful in 1m30s
CI / image (pull_request) Successful in 56s
CI / android (pull_request) Successful in 2m5s
CI / watch (pull_request) Successful in 2m48s
bbd701079b
watch/source/ViewerAddress.mc (was ViewerQr.mc) holds the origin, the relay Link calls and the
QR code, written by tools/generate-viewer-address.mjs for WRISTMARK_ORIGIN or the default.
tools/build-watch.sh writes it for a set origin and puts the committed file back;
tools/build-app-web.sh points the Android app's relay at it; the release takes the
repository variable WRISTMARK_ORIGIN.
dawid merged commit 149b959324 into main 2026-11-18 06:39:52 +00:00
dawid deleted branch viewer-qr 2026-11-18 06:39:52 +00:00
Sign in to join this conversation.
No description provided.