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:
2026-02-22 10:05:30 -05:00
parent af2050160e
commit 98a330c416
4 changed files with 48 additions and 0 deletions

View File

@@ -116,6 +116,14 @@ with app.app_context():
_log("System: Added 'last_heartbeat' column to Run table.")
except: pass
# Migration: Add 'tags' column if missing
try:
with db.engine.connect() as conn:
conn.execute(text("ALTER TABLE run ADD COLUMN tags VARCHAR(300)"))
conn.commit()
_log("System: Added 'tags' column to Run table.")
except: pass
# Reset all non-terminal runs on startup (running, queued, interrupted)
# The Huey consumer restarts with the app, so any in-flight tasks are gone.
try: