Show worker execution details on task detail page in web UI:
Data to Display
- Amp Thread URL - link to the amp thread that worked on this task
- Execution Time - how long the worker ran
- Cost - token/API cost if available from amp
- Retry Count - current attempt number (from retry_context)
- Last Activity - most recent status update timestamp
Schema Additions (task_activity table)
- amp_thread_url TEXT
- started_at TIMESTAMP
- completed_at TIMESTAMP
- cost_cents INTEGER (or TEXT for flexibility)
- tokens_used INTEGER
UI Location
On task detail page, add 'Execution Details' section:
- Show for tasks that have been worked on (have activity records)
- Amp thread as clickable link
- Duration formatted nicely (e.g., '2m 34s')
- Cost formatted (e.g., '$0.12')
Integration with HTMX (t-151)
- This section can auto-refresh while task is InProgress
- Use hx-get='/partials/task/:id/metrics' hx-trigger='every 5s'