feat(workout): complete mobile session flow

Make Workout Copilot behave like a finished phone-first session: rest/next state, progress, undo recovery, finish/export, replayable local log, and host proof controls tucked behind product states.

req: examples/001

req: local/001

req: local/003

req: local/004

req: host/002
This commit is contained in:
slhx agent
2026-06-11 23:15:55 +02:00
parent bf7560b7a8
commit a514237b09
7 changed files with 561 additions and 161 deletions
+9 -6
View File
@@ -1,10 +1,10 @@
# Now-first Workout Copilot example
This is the phone-first local-first product exemplar for hemx. It shows a
single useful loop: next action shown, user input accepted, a local command
recorded, a domain event projected, hemx UI updated, and the result exported or
replayed without storing DOM patches or UI update payloads as truth. req: examples/001
req: local/001 req: local/003 req: local/004
complete useful session: next action shown, set completed, rest/next state
entered, progress updated, mistakes undone, workout finished, and the result
exported or replayed without storing DOM patches or UI update payloads as truth.
req: examples/001 req: local/001 req: local/003 req: local/004
## Run
@@ -31,7 +31,9 @@ cargo test -p hemx-workout-example
The E2E test starts the real HTTP binary, loads the page, checks the shared
runtime asset, submits workout interactions, decodes hemx effect responses, and
replays exported events back into a projection. req: test/001 req: examples/001
replays exported events back into a projection. Unit tests cover rest/next,
finish, undo recovery, export replay, and host-result boundaries. req: test/001
req: examples/001
For the full repository gate:
@@ -57,7 +59,8 @@ ship. req: axum_integration/005 req: examples/005
## Boundaries proven
- Core workout logging works without network availability once the page/runtime
is loaded: commands/events/projections are app truth. req: local/001
is loaded: commands/events/projections are app truth, including rest/next,
finish, and undo recovery. req: local/001
- Browser/PWA export uses the host capability contract and the host result
returns through app code before UI effects. req: host/001 req: host/005
- Native-shell-shaped haptic acknowledgment uses the same host call/event path