Files
hemx/examples/workout/templates/workout.heml
T
slhx agent d5b74496ab feat(examples): add workout replay e2e
Wrap the workout page with the shared runtime, add export replay over command/event truth, and cover the running HTTP app with an end-to-end test that exercises runtime asset loading and product interactions.

req: examples/001

req: local/001

req: local/003

req: local/004

req: host/001
2026-06-11 21:02:50 +02:00

38 lines
1.7 KiB
Plaintext

<main data-hemx-root="workout" class="workout-app">
<section class="hero">
<p class="eyebrow">Now-first Workout Copilot</p>
<h1 data-hemx-slot="next_action">{+ self.next_action +}</h1>
<p data-hemx-slot="status">{+ self.status +}</p>
</section>
<section class="actions" aria-label="Current workout action">
<button type="button" data-hemx-handle="complete_set">Complete set</button>
<form data-hemx-handle="change_weight" method="post">
<label>Weight <input name="kg" value="52.5" inputmode="decimal"></label>
<button type="submit">Update weight</button>
</form>
<button type="button" data-hemx-handle="skip_exercise">Skip exercise</button>
<form data-hemx-handle="record_note" method="post">
<label>Voice note <input name="text" value="left shoulder felt tight"></label>
<button type="submit">Record dictated note</button>
</form>
</section>
<section class="local-truth">
<h2>Private event log</h2>
<pre data-hemx-slot="event_log">{+ self.event_log +}</pre>
<h3>Replay export</h3>
<pre data-hemx-slot="export_payload">{+ self.export_payload +}</pre>
<button type="button" data-hemx-handle="replay_export">Replay exported log</button>
</section>
<section class="host">
<h2>Export host boundary</h2>
<p data-hemx-slot="host_status">{+ self.host_status +}</p>
<button type="button" data-hemx-handle="export_log">Export via browser/PWA share</button>
<button type="button" data-hemx-handle="record_share_result">Record share completed</button>
<button type="button" data-hemx-handle="request_native_haptic">Request native haptic</button>
<button type="button" data-hemx-handle="record_native_haptic_ack">Record haptic acknowledged</button>
</section>
</main>