feat(workout): correct last set from local events

Add a recovery path for mistyped completed-set weight: append a typed correction event, replay it through the local projection, and make undo restore the previous session state.

req: examples/001

req: local/001

req: local/003

req: local/004
This commit is contained in:
slhx agent
2026-06-11 23:34:17 +02:00
parent 900ae9f51f
commit 1289106ed4
5 changed files with 130 additions and 6 deletions
+8
View File
@@ -174,6 +174,11 @@
gap: 0.55rem;
align-items: end;
}
.recovery-tools {
border-top: 1px dashed var(--line);
border-bottom: 1px dashed var(--line);
padding-block: 0.15rem;
}
.micro-form label,
.voice-strip label {
display: grid;
@@ -210,6 +215,9 @@
border-top: 1px dashed var(--line);
padding-block-start: 0.35rem;
}
.recovery-tools .micro-form {
margin-block-end: 0.55rem;
}
.host-proof p {
margin-block-end: 0.7rem;
font-size: 0.92rem;
+8 -1
View File
@@ -16,9 +16,16 @@
<button class="quiet-action" type="button" data-hemx-handle="skip_exercise">Skip exercise</button>
</div>
<form class="micro-form" data-hemx-handle="change_weight" method="post">
<label>Adjust weight <input name="kg" value="52.5" inputmode="decimal" aria-label="Weight in kilograms"></label>
<label>Adjust next weight <input name="kg" value="52.5" inputmode="decimal" aria-label="Weight in kilograms"></label>
<button type="submit">Save</button>
</form>
<details class="recovery-tools">
<summary>Fix last set</summary>
<form class="micro-form" data-hemx-handle="correct_last_set" method="post">
<label>Correct last set <input name="kg" value="24" inputmode="decimal" aria-label="Corrected last set weight in kilograms"></label>
<button type="submit">Correct</button>
</form>
</details>
<form class="voice-strip" data-hemx-handle="record_note" method="post">
<label>Session note <input name="text" value="left shoulder felt tight"></label>
<button type="submit">Record</button>