From 49aaa0cd3195d410fe629beeabc3481a5fbf59bc Mon Sep 17 00:00:00 2001 From: kaivalya Date: Sun, 5 Jul 2026 21:26:21 +0200 Subject: [PATCH] Add udpate modal (step 24) and control by audio cask (step 25) --- docs/decisions-log.md | 20 + docs/plan.md | 80 +- eslint.config.js | 2 + src/App.vue | 2 + src/components/AppUpdateDialog.vue | 85 ++ src/composables/useAppUpdate.js | 38 + src/composables/useMediaSession.js | 61 ++ src/composables/useSessionExecution.js | 12 + src/i18n/locales/da.json | 8 + src/i18n/locales/en.json | 8 + src/i18n/locales/fr.json | 8 + src/views/SessionExecuteView.vue | 93 ++- tests/test_step24_app_update.py | 176 +++++ tests/test_step25_media_session.py | 404 ++++++++++ tokscale-export-20260703-144634.json | 836 -------------------- vite.config.js | 2 +- website/content/blog/2026-06-20-ia.en.md | 6 +- website/content/blog/2026-06-20-ia.fr.md | 4 +- website/content/developers/technical.en.md | 68 +- website/content/docs/user-guide/index.en.md | 19 +- website/content/docs/user-guide/index.fr.md | 19 +- 21 files changed, 1055 insertions(+), 896 deletions(-) create mode 100644 src/components/AppUpdateDialog.vue create mode 100644 src/composables/useAppUpdate.js create mode 100644 src/composables/useMediaSession.js create mode 100644 tests/test_step24_app_update.py create mode 100644 tests/test_step25_media_session.py delete mode 100644 tokscale-export-20260703-144634.json diff --git a/docs/decisions-log.md b/docs/decisions-log.md index 97f03d7..af24811 100644 --- a/docs/decisions-log.md +++ b/docs/decisions-log.md @@ -2,6 +2,26 @@ Record of architectural and technical decisions made during development. +## 2026-07-05 — Headset / media-key control of session execution (Step 25) + +**Decision:** Added `useMediaSession.js`, wiring the Media Session API (`navigator.mediaSession`) into `SessionExecuteView` so headphone buttons, OS media keys, and lock-screen controls can drive a workout: play/pause toggles the active timer, next/previous step through the queue, and stop exits immediately. Hardware media keys are only routed to a page actively playing audio through a media element — the Web Audio beeps from Step 12 don't qualify — so `useMediaSession.js` also starts a tiny silent looping `