fitness-web/app/templates/workout_detail.html
Jacob Hinkle 5584022a23 Single-container AI coach with agent API endpoints and UI polish
- Merge opencode-serve into the web container via entrypoint script
- Add /api/agent/* JSON endpoints for workouts, sets, checkins
- Rewrite fitness-trainer.md to use API instead of markdown files
- Pass recent workouts and check-ins as chat context to the coach
- Show current training phase on dashboard
- Clarify check-ins as morning check-ins (calories/steps = yesterday)
- Add NixOS deployment section to README
- Make all check-in fields explicitly optional in UI
2026-06-29 10:50:01 -04:00

85 lines
2.1 KiB
HTML

{% extends "base.html" %}
{% block title %}{{ workout.name }}{% endblock %}
{% block content %}
<h1>{{ workout.name }}</h1>
<p><strong>Date:</strong> {{ workout.date }} | <strong>Status:</strong> {{ workout.status }}</p>
{% if phase %}
<p><strong>Phase:</strong> {{ phase.name }}</p>
{% endif %}
{% if workout.notes %}
<p>{{ workout.notes }}</p>
{% endif %}
<h2>Sets</h2>
{% if sets %}
<table>
<thead>
<tr>
<th>Exercise</th>
<th>Set</th>
<th>Reps</th>
<th>Weight</th>
<th>RPE</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
{% for s in sets %}
<tr>
<td>{{ s.exercise }}</td>
<td>{{ s.set_number }}</td>
<td>{{ s.reps or '—' }}</td>
<td>{{ s.weight or '—' }}</td>
<td>{{ s.rpe or '—' }}</td>
<td>{{ s.notes or '' }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>No sets logged yet.</p>
{% endif %}
<h3>Add Set</h3>
<form method="post" action="/workouts/{{ workout.id }}/add-set" class="set-row">
<label>
Exercise
<input type="text" name="exercise" required list="exercise-list">
<datalist id="exercise-list">
{% for s in sets %}
<option value="{{ s.exercise }}">
{% endfor %}
</datalist>
</label>
<label>
Set #
<input type="number" name="set_number" required min="1">
</label>
<label>
Reps
<input type="number" name="reps" min="1">
</label>
<label>
Weight
<input type="number" name="weight" step="0.5">
</label>
<label>
RPE
<input type="number" name="rpe" min="1" max="10" step="0.5">
</label>
<label>
Notes
<input type="text" name="notes">
</label>
<button type="submit">Add</button>
</form>
{% if workout.status == "plan" %}
<form method="post" action="/workouts/{{ workout.id }}/complete">
<button type="submit" class="secondary">Mark Complete</button>
</form>
{% endif %}
<a href="/workouts">Back to Workouts</a>
{% endblock %}