Commit graph

18 commits

Author SHA1 Message Date
David 270ff24c60 Fix some issue at first load and cache issue
Some checks failed
CI / Lint & Format (push) Has been cancelled
CI / Build (push) Has been cancelled
CI / Tests (${{ matrix.browser }}) (chromium) (push) Has been cancelled
CI / Tests (${{ matrix.browser }}) (firefox) (push) Has been cancelled
2026-07-26 13:03:09 +02:00
David 63f2f2ba24 Add last manual check update date
Some checks are pending
CI / Lint & Format (push) Waiting to run
CI / Build (push) Waiting to run
CI / Tests (${{ matrix.browser }}) (chromium) (push) Waiting to run
CI / Tests (${{ matrix.browser }}) (firefox) (push) Waiting to run
2026-07-24 09:35:48 +02:00
David b325415e6a Pass all to done and manual update done
Some checks are pending
CI / Lint & Format (push) Waiting to run
CI / Build (push) Waiting to run
CI / Tests (${{ matrix.browser }}) (chromium) (push) Waiting to run
CI / Tests (${{ matrix.browser }}) (firefox) (push) Waiting to run
2026-07-24 09:08:57 +02:00
David efeeb164b8 F10-F12: Documentation sweep + Prettier pass
Some checks are pending
CI / Lint & Format (push) Waiting to run
CI / Build (push) Waiting to run
CI / Tests (${{ matrix.browser }}) (chromium) (push) Waiting to run
CI / Tests (${{ matrix.browser }}) (firefox) (push) Waiting to run
- plan.md: overview now lists English, French & Danish; status header
  tracks the remediation work; date-formatting note updated to Intl
- AGENTS.md: Build & Run section now lists lint, lint:fix, the test/
  test:* scripts and the site scripts
- technical docs (EN/FR): date formatting section rewritten for the
  Intl-based formatter (incl. Danish column), streak definition notes
  only completed logs count
- user guide (EN/FR): delete sections mention the new usage counts in
  the confirmation dialogs
- decision log entries for F1/F3/F4 landed with their fixes
- npm run format over the touched markdown/code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 15:50:28 +02:00
David 0bc20f81d8 F9: Small polish batch
- getYouTubeId also recognizes /embed/<id> and /shorts/<id> URLs (test
  renders all three variants as thumbnails on the exercise detail view)
- useListNavigation JSDoc: itemCount is a Ref<number>, not a number
- collectionRepository.getAll: N+1 per-collection count queries folded
  into one LEFT JOIN ... GROUP BY

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 15:45:39 +02:00
David 166cf87e95 F8: Date formatting uses Intl per app language
formatDate special-cased only French, so Danish users saw US
mm/dd/yyyy; formatDateTime mixed a manual French format with
toLocaleString() (OS-locale dependent) for everyone else. Both now use
Intl.DateTimeFormat with a fixed app-language -> BCP-47 map (en-US,
fr-FR, da-DK — same mapping as useSpeech), 2-digit day/month so output
stays deterministic per language: en 03/15/2026, fr 15/03/2026,
da 15.03.2026. Adds a Danish format test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 15:41:51 +02:00
David e3847edae1 F7: Deduplicate the four CRUD composables
useExercises/useCombos/useSessions/useCollections were the same 54
lines with a different repository (~160 duplicated lines). They are now
one-liners over a createCrudComposable(repository, itemsKey) factory;
the returned API is identical so no call site changes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 15:39:50 +02:00
David a6b4723ac6 F4: Delete confirms show usage; no more session_item orphans
session_item.item_id is polymorphic (no FK), so deleting an exercise or
combo used in a session left orphaned rows that the INNER JOIN in
getItems silently hid. Exercise/combo deletes now also remove their
session_item rows in one transaction. Delete confirmations on the
exercise/combo/session detail views now include usage counts (sessions/
combos using an exercise, sessions using a combo, collections containing
a session) via new count helpers and deleteConfirmUsage keys (EN/FR/DA).
Confirm stays informative, not blocking, consistent with the existing
history warning.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 15:30:52 +02:00
David f324ffb2cb F6: HTML export icon fetch respects BASE_URL
fetchIconAsBase64 fetched '/icon.svg', which 404s on subdirectory
deploys even though Vite is configured with base: './'. It now resolves
the icon against import.meta.env.BASE_URL like database.js already does
for the wasm file. Subdirectory deploys should be spot-checked with
npm run preview under a subpath.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 15:24:41 +02:00
David 1a3f294b31 F5: renameSuffix runs as a single transaction
The 5 sequential UPDATEs could half-rename the database if a renamed
title collided with an existing one (UNIQUE constraint) mid-way. They
now go through db.batch(), which rolls back on error. SettingsView
shows a translated error (new import.suffixRenameFailed key, EN/FR/DA)
instead of the raw constraint message. Test seeds a colliding title and
asserts the rename fails with nothing renamed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 15:23:31 +02:00
David c5ee817ebb F3: DB restore keeps the live schema_version stamp
Restoring a backup copied the backup's schema_version into the live DB.
Once SCHEMA_VERSION moves past 1, restoring an older backup (already
adapted to the current schema by the migration scripts) would leave an
old stamp, so the next launch re-runs migrations against an
already-adapted schema and blocks the app. schema_version is now
excluded from the restore copy; the live stamp is correct by
construction. Regression test tampers a backup's stamp and asserts the
live one survives.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 15:14:08 +02:00
David 7e9c825af3 F1: Same-user re-import skips existing execution logs
Logs whose id already exists locally were re-inserted as-is, producing a
PRIMARY KEY violation per log that surfaced as errors in the import
report. They are now counted as skipped (execution logs are immutable
history — skip is always the right resolution). Adds the missing
regression test: re-import a full export without deleting anything.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 15:09:19 +02:00
David cd8636546a F2: Streak no longer counts aborted sessions
getDistinctSessionDays() now filters on status = 'completed' like every
other stat query, so starting and immediately exiting a session does not
extend the streak. Adds a regression test (completed today + aborted
yesterday => streak 1).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 15:04:24 +02:00
David 1424029eae Step 26 to announce exercise
Some checks are pending
CI / Lint & Format (push) Waiting to run
CI / Build (push) Waiting to run
CI / Tests (${{ matrix.browser }}) (chromium) (push) Waiting to run
CI / Tests (${{ matrix.browser }}) (firefox) (push) Waiting to run
2026-07-06 15:33:33 +02:00
David 49aaa0cd31 Add udpate modal (step 24) and control by audio cask (step 25)
Some checks are pending
CI / Lint & Format (push) Waiting to run
CI / Build (push) Waiting to run
CI / Tests (${{ matrix.browser }}) (chromium) (push) Waiting to run
CI / Tests (${{ matrix.browser }}) (firefox) (push) Waiting to run
2026-07-05 21:26:21 +02:00
David b69fae1edc Add installation modal dialog
Some checks are pending
CI / Lint & Format (push) Waiting to run
CI / Build (push) Waiting to run
CI / Tests (${{ matrix.browser }}) (chromium) (push) Waiting to run
CI / Tests (${{ matrix.browser }}) (firefox) (push) Waiting to run
2026-07-04 15:06:03 +02:00
David 8a96f28246 Fix alternate tag in detail view
Some checks are pending
CI / Lint & Format (push) Waiting to run
CI / Build (push) Waiting to run
CI / Tests (${{ matrix.browser }}) (chromium) (push) Waiting to run
CI / Tests (${{ matrix.browser }}) (firefox) (push) Waiting to run
2026-07-03 16:41:27 +02:00
David 352a3d5e88 Initial commit
Some checks are pending
CI / Lint & Format (push) Waiting to run
CI / Build (push) Waiting to run
CI / Tests (${{ matrix.browser }}) (chromium) (push) Waiting to run
CI / Tests (${{ matrix.browser }}) (firefox) (push) Waiting to run
2026-06-18 13:06:57 +02:00