diff --git a/internal/progress/tracker.go b/internal/progress/tracker.go index 37678b7..71c3d2f 100644 --- a/internal/progress/tracker.go +++ b/internal/progress/tracker.go @@ -186,6 +186,20 @@ func (t *Tracker) Finish() { t.save() } +// Annotate attaches a short plain note to a phase and saves it at once. It is for a +// remark the reader should see although nothing failed. Durations and counts only: a note +// is shown on a page about a private recording. +func (t *Tracker) Annotate(key, note string) { + t.mu.Lock() + defer t.mu.Unlock() + s := t.find(key) + if s == nil { + return + } + s.Note = note + t.save() +} + // Heartbeat stamps the job's row every beatEvery and logs which phase is still running // every stillEvery, until ctx ends. It runs on its own, independent of any engine call: // a heartbeat that stopped means the process is gone, not that a request is slow.