feat(workout): recover common session failures
Make the workout exemplar recover cleanly from invalid edits, accidental double-advance, replay parse failures, and denied or timed-out host export results while keeping local events as truth. req: examples/001 req: local/001 req: local/003 req: local/004 req: host/002 req: host/005
This commit is contained in:
@@ -2,8 +2,9 @@
|
||||
|
||||
This is the phone-first local-first product exemplar for hemx. It shows a
|
||||
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.
|
||||
entered, progress updated, mistakes undone, workout finished, and invalid input,
|
||||
replay failure, or host denial recovered without storing DOM patches or UI update
|
||||
payloads as truth.
|
||||
req: examples/001 req: local/001 req: local/003 req: local/004
|
||||
|
||||
## Run
|
||||
@@ -32,8 +33,8 @@ 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. Unit tests cover rest/next,
|
||||
finish, undo recovery, export replay, and host-result boundaries. req: test/001
|
||||
req: examples/001
|
||||
finish, undo recovery, invalid input, replay failure, export replay, and
|
||||
host-result boundaries. req: test/001 req: examples/001
|
||||
|
||||
For the full repository gate:
|
||||
|
||||
@@ -60,7 +61,7 @@ ship. req: axum_integration/005 req: examples/005
|
||||
|
||||
- Core workout logging works without network availability once the page/runtime
|
||||
is loaded: commands/events/projections are app truth, including rest/next,
|
||||
finish, and undo recovery. req: local/001
|
||||
finish, invalid input, replay failure, 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
|
||||
|
||||
Reference in New Issue
Block a user