Add central user-facing health item collector
Summary
Create a central, reusable backend collector for user-facing health and action items.
User problem
Today each page owns its own interpretation of backup, restore, repository, storage and migration state. This makes it hard to present one clear answer across the application: what needs attention?
Design proposal
This is mostly a backend/API foundation, but it should define the UI contract for action items.
Suggested item shape:
Severity: warning
Title: Restore test overdue
Subject: Photos - USB
Message: The planned restore test is overdue since 2026-07-26.
Action: Open Restore Tests
Target: restore-tests / job photos_usb
Visual direction for consumers:
- Use the same severity language everywhere: OK, Warning, Error.
- Keep messages short and human-readable.
- Always include a next step when possible.
- Hide raw technical details by default; expose them in detail pages/support views.
Implementation concept
Add a module such as health_items_api.py or extend the existing health API with a normalized collector.
The collector should inspect existing sources only:
- job metadata and latest backup status files
- restore-test plan and reports
- repository inventory and repository info refresh state
- storage profile status where already available without expensive probing
- notification profile configuration
- migration and setup state
The collector should return stable records:
{
"severity": "warning",
"category": "restore_test",
"subject_key": "photos_usb",
"subject_label": "Photos - USB",
"title": "Restore test overdue",
"message": "The planned restore test is overdue.",
"action_label": "Open Restore Tests",
"action_target": { "page": "restore-tests", "job_key": "photos_usb" }
}
Acceptance criteria
- A single backend API can return all current action items.
- Items have stable categories and severities.
- Items are safe for logs/support bundles and contain no secrets.
- The collector does not start Borg commands, mount storage or wake disks by itself.
- Dashboard issue #307 can consume this collector.
Follow-up usage
This issue is the foundation for dashboard action items and for reusing the same hints on detail pages.