Clearable notifications with failure detail¶
Motivation¶
"Mark all read" only cleared the unread badge, so completed and failed items
continued to occupy the dropdown with no way to remove them. Failed items also
showed only a machine classification such as cluster_lifecycle_interrupted,
even when the job state contained a human-readable reason and remediation.
User-facing change¶
- "Clear all" hides every notification currently in the dropdown. It does not delete BLAST or warmup job history; jobs remain available from their normal history and result surfaces.
- Failed notifications show the machine error code plus the sanitised detail recorded by the failing task.
- If a read/clear preference cannot be saved, the action now reports a retryable error instead of briefly changing the UI and then letting the old state return.
API and storage diff¶
POST /api/notifications/clearstores a per-usercleared_before_atcutoff in the existingnotifseentable and returns the new cutoff.- Seen and clear actions update independent marker fields with Azure Table
MERGE, so concurrent requests cannot erase or reorder each other's state. - Feed assembly keeps the payload-free summary scan, then batch-fetches only the
visible failed rows to extract
payload.error. The detail is truncated and passed through the shared output sanitiser before it enters the response. error_detailis additive and optional for backward-compatible clients.
Validation evidence¶
uv run pytest -q api/tests/test_notifications.pyuv run ruff check apicd web && npm test -- --runcd web && npm run build