Add run tagging (DB column + migration + route + UI)
- Added tags VARCHAR(300) column to Run model - Added startup ALTER TABLE migration in app.py - New POST /run/<id>/set_tags route saves comma-separated tags - Tag badges + collapsible edit form in run_details.html header area Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -108,6 +108,28 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Tags -->
|
||||
<div class="mb-3 d-flex align-items-center gap-2 flex-wrap">
|
||||
{% if run.tags %}
|
||||
{% for tag in run.tags.split(',') %}
|
||||
<span class="badge bg-secondary fs-6">{{ tag }}</span>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<span class="text-muted small fst-italic">No tags</span>
|
||||
{% endif %}
|
||||
<button class="btn btn-sm btn-outline-secondary" data-bs-toggle="collapse" data-bs-target="#tagsForm">
|
||||
<i class="fas fa-tag me-1"></i>Edit Tags
|
||||
</button>
|
||||
<div class="collapse w-100" id="tagsForm">
|
||||
<form action="{{ url_for('run.set_tags', id=run.id) }}" method="POST" class="d-flex gap-2 mt-1">
|
||||
<input type="text" name="tags" class="form-control form-control-sm"
|
||||
value="{{ run.tags or '' }}"
|
||||
placeholder="comma-separated tags, e.g. dark-ending, v2, favourite">
|
||||
<button type="submit" class="btn btn-sm btn-primary">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Status Bar -->
|
||||
<div class="card shadow-sm mb-4">
|
||||
<div class="card-body">
|
||||
|
||||
Reference in New Issue
Block a user