pub fn task_notification(
label: &str,
outcome: &TaskOutcome,
) -> (NotificationLevel, String)Expand description
NC.2: how a finished background task reads.
Pure, so the wording is tested without a bus. The label is an imperative phrase naming its object (“push main → origin/main”); the outcome is appended here, in one place, so every producer reads the same way:
| Outcome | Level | Text |
|---|---|---|
| succeeded | Success | label — summary, or just label |
| stopped | Warn | label stopped — message |
| failed | Error | label failed — message |
Success needs no “finished” — the check says it — and the icon does
not stand alone for the other two: the word is what *messages*
keeps, and what a reader without colour sees.