Files
hemx/examples/workout/templates/workout.heml
T
slhx agent e76a564add feat(examples): add native-shell workout host path
Extend the workout exemplar with a native-shell haptic request and acknowledgment path that validates the host manifest and returns through app code without owning workout state.

req: host/001

req: host/002

req: host/004

req: host/005

req: examples/001
2026-06-11 20:43:14 +02:00

35 lines
1.6 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>
</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>