Phase 6/9: Cut over dashboard, widgets, History, Reports, and overdue state to job_id
Parent: #447
Depends on: Phase 5/9
Delivery branch: codex/issue-447-immutable-job-ids
Delivery model: This phase is committed to the shared #447 integration branch and the single draft pull request against main. It is not merged or released independently.
Objective
Convert all status-derived read models and user-facing operational summaries to job_id. The configured job inventory becomes authoritative, historical descriptors remain visible, and editing a job can no longer create duplicate dashboard identities or split its reports.
Dashboard
- Start from configured canonical jobs keyed by
job_id. - Overlay latest completed status, active runtime state, schedule, repository and restore-proof data by ID.
- Show exactly one card per configured job.
- Do not create active cards or counters from orphaned historical status files.
- Where unambiguous, show the latest migrated legacy status until the first ID-native run, with an appropriate indicator.
- Ensure active runtime state takes display precedence over the last completed run.
Widgets
- Rebuild the Unraid dashboard widget cache from ID-based canonical data.
- Convert the Homepage widget API and any persistent widget state to IDs.
- Preserve friendly display labels and bounded diagnostic descriptors.
- Ensure widget counts and in-app dashboard counts follow the same configured-job authority rule.
History and Reports
- Group and filter time series by
job_id. - Keep the current job name for navigation.
- Retain run-time name, archive prefix, repository and location snapshots on historical rows.
- Keep one continuous report when name, prefix, repository or storage changes.
- Preserve deleted-job history without adding the job to the active inventory.
- Show ambiguous or orphaned records as unassigned legacy history rather than attaching them by guesswork.
- Convert weekly repository snapshots and merge same-job/same-period values deterministically.
- Update report mail joins to IDs.
Overdue state
- Join configured jobs, schedules and latest statuses by
job_id. - Preserve due markers during migration.
- Prevent false overdue or duplicate reminder behavior after descriptor changes.
Regression scenario
The config to pfsense Type ID fixture must result in:
- one configured job card;
- the previous successful status associated with that same job when unambiguous;
- one continuous History and Reports identity;
- no separate
configandpfsenseactive dashboard locations; - preserved historical labels for the old run.
Tests
- one card and consistent counters per configured ID;
- edits across every mutable descriptor;
- legacy status continuity and first ID-native run precedence;
- deleted and unassigned history behavior;
- weekly snapshot conversion without duplicates;
- report mail and overdue joins;
- Unraid and Homepage widget cache behavior;
- German and English labels for migration/legacy indicators.
Test-channel policy
Do not publish a test-channel version yet. Restore workflows, transfer/lifecycle handling and startup migration activation are still incomplete.
Acceptance criteria
- Dashboard and widgets never split a job after an edit.
- History and Reports remain continuous by ID.
- Historical descriptors remain accurate.
- Orphaned legacy records cannot affect current job counters.
- Overdue and report-mail logic use the same canonical identity.
Implemented on the shared #447 integration branch in commit cb2734ea460c1b07b2f371bb73ab298dddaf9199, draft PR #480.
- Configured UUIDs now define dashboard and widget inventory and exclusive active counts. Running state wins over previous outcomes; never-run and disabled jobs are represented explicitly. Historical files cannot create active ghost jobs.
- History and reports select full IDs, show current names for navigation and keep original payload descriptors. Deleted/unassigned history remains accessible.
- Weekly observations merge provenance, retain conflicting values and refuse implicit legacy conversion. Growth requires the same known repository.
- Restore proof joins UUID payloads and the current repository/prefix history; name and current-prefix edits preserve valid proof. Report mail and overdue reminders remain attached to the UUID without resetting deduplication.
- Homepage active IDs, canonical Unraid cache generation and DE/EN presentation are covered by regression tests and executable frontend checks.
Latest phase-6 commit: cb2734ea460c1b07b2f371bb73ab298dddaf9199.
- 97 focused status, weekly-snapshot, history, report, mail, widget and frontend tests passed across the combined run and targeted reruns. The obsolete browser-merge icon assertion was updated for the shared canonical projection.
- 61 runtime, notification, cancellation and activity-log tests passed. This includes real Borg 1.4.5 backups in normal and RAM activity modes, exact archive names, persisted UUID status, completed-run log reconnect and manual retention.
- Empty Borg repository initialization took 52.43 seconds on this workspace's filesystem. The real-Borg fixture deadlines were extended after two 30-second setup timeouts; both complete backup cases then passed.
- A supplementary broad migration audit completed 323 tests without failures before it was stopped during unchanged migration-writer tests. It was not the final source preflight; affected runtime tests were completed separately.
- Real local HTTP routing, token authorization, UUID selectors, invalid identity rejection, DE/EN assets, canonical widget refresh and completed log access passed. Executable Node tests and synthetic browser previews covered both languages.
- Changed Python/JavaScript/JSON syntax and git whitespace checks passed. PHP CLI is unavailable here; installed-Unraid PHP and manual acceptance remain part of the integrated candidate.
No test-channel package or stable release was created. This is the approved integration checkpoint; #477 continues Browse & Restore, #478 handles transfer and lifecycle, and #479 owns guarded activation, final preflight and the first maintainer-test candidate. The issue remains open until integrated acceptance.