Skip to content

feat: live mode, completion sheet and undo (UX-06, part B) - #210

Merged
bri-b-dev merged 1 commit into
mainfrom
b/live-session
Oct 10, 2026
Merged

bri-b-dev merged 1 commit into
mainfrom
b/live-session

Conversation

@bri-b-dev

Copy link
Copy Markdown
Owner

Summary

Completes UX-06.

  • Live mode (LiveSession.vue), shown when you press Starten: full screen, big timer (pause / reset, time bar, turns red when the preset is exceeded), big −/+ counters (72 px) next to the number field (inputmode="numeric"), bounds per metric (explicit range, streaks/counts start at 1, score vs par can go negative without a minus key), +1 Versuch for count-in-time drills, instructions on demand, screen stays on (Screen Wake Lock API; no plugin needed, silently skipped where unsupported, re-acquired when the page becomes visible again). Leaving with entered values asks first
  • Completion sheet (ResultSheet.vue) after every save (live and quick entry): result, level stars, "noch +2 bis ★★" (or "Höchste Stufe erreicht" / a hint to enter the HCP), best before and average of the last 5 with deltas, PB with confetti (not with reduced motion; the badge stays), note field, Nochmal / Nächster Drill / Fertig. Inside a guided session "Nächster Drill" advances the session ("Einheit abschließen" on the last step), otherwise it opens the shuffle
  • Undo: a toast "Ergebnis gespeichert - Rückgängig" for 5 s (toasts can now carry an action and a duration). Undoing removes the session, closes the sheet, and a guided-session step that was completed by it becomes pending again
  • Logic in src/session/summary.ts (pure, tested); the old "PB!" toast from the sessions store is gone (the sheet replaces it); removed the now unused SimpleTimer and isPersonalBest

Notes

  • No new dependency: keep-awake uses the web API instead of a Capacitor plugin. If it turns out unreliable in the Android WebView, @capacitor-community/keep-awake is the drop-in alternative
  • Start chunk 145.0 KB; tests 250 -> 284, lint 0 errors

Test plan

  • npm test, npm run lint, npm run typecheck, npm run build (local)
  • CI
  • Manual (phone): Starten -> screen does not dim while the live view is open; timer, +/- and keyboard; Speichern -> sheet; PB confetti and reduced-motion; Rückgängig within 5 s; Nochmal; inside a guided session Nächster Drill; Android back/Escape; VoiceOver/TalkBack on the sheet

🤖 Generated with Claude Code

- LiveSession: full-screen view with big timer (pause/reset, time bar), big +/- counters with
  metric-specific bounds, attempts counter, instructions on demand, screen kept awake (Wake Lock),
  confirmation before discarding entered values
- ResultSheet: result, level stars, distance to the next level, best and average of the last 5,
  PB with confetti (not with reduced motion), note, Nochmal / Nächster Drill / Fertig
- undo toast for 5 seconds (toasts can carry an action and a duration); undone sessions release
  their step in a guided session
- quick entry also ends in the sheet; the old "PB!" toast is replaced by the sheet
- removes the unused SimpleTimer and isPersonalBest util
- tests (284)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@bri-b-dev
bri-b-dev merged commit 36d52fa into main Oct 10, 2026
1 check passed
@bri-b-dev
bri-b-dev deleted the b/live-session branch October 10, 2026 19:46
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.

1 participant