From c2b5fa7b2ec016bef0b0b7bf51d0765c2586915a Mon Sep 17 00:00:00 2001 From: Ivo Oskamp Date: Fri, 20 Mar 2026 13:01:05 +0100 Subject: [PATCH] Cove: historical run backfill, run detail popup, and docs update - cove_importer.py: add _backfill_colorbar_runs() to reconstruct up to 27 days of history from the D09F08 28-day colorbar when a new run is created; idempotent via external_id deduplication - routes_cove.py: add GET /cove/run//detail endpoint returning structured Cove account info and per-datasource objects for popups - routes_run_checks.py: add cove_summary to run payload for cove_api runs with readable datasource labels; hide mail section for Cove runs - routes_jobs.py: add source_type to history_rows dict - job_detail.html: Cove run rows clickable; JS routes to cove_run_detail; Cove summary panel added, mail section hidden for Cove runs - run_checks.html: Cove summary panel added; JS handles cove_summary - technical-notes-codex.md: document new route, popup behaviour, and historical backfill Co-Authored-By: Claude Sonnet 4.6 --- docs/technical-notes-codex.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/technical-notes-codex.md b/docs/technical-notes-codex.md index c1c7e36..e01a6b8 100644 --- a/docs/technical-notes-codex.md +++ b/docs/technical-notes-codex.md @@ -287,9 +287,22 @@ Settings → Integrations → Cove section: | `/cove/accounts` | GET | Inbox-style page: unmatched + matched accounts | | `/cove/accounts//link` | POST | `action=create` or `action=link` | | `/cove/accounts//unlink` | POST | Removes job link, puts account back in unmatched | +| `/cove/run//detail` | GET | JSON: structured Cove run details for job detail popup | | `/settings/cove/test-connection` | POST | AJAX: verify credentials, save partner_id | | `/settings/cove/run-now` | POST | Manual import trigger | +### Job Detail Popup (Cove runs) +Cove run rows in the job detail history table are clickable even without a mail message: +- Row has `data-source-type="cove_api"` and `data-run-id` +- JS detects `source_type === "cove_api"` and fetches `/cove/run//detail` instead of `inbox_message_detail` +- Response includes: `meta` (account name as subject, backup_software, run_at as received_at), `cove_summary` (account, computer, customer, datasources, last run, status), `objects` (per-datasource run_object_links) +- Mail section hidden entirely; Cove summary panel shown instead + +### Run Checks Popup (Cove runs) +- `routes_run_checks.py` returns `cove_summary` in the run payload for `source_type="cove_api"` runs +- Includes: account_name, computer_name, customer_name, readable datasource labels, last_run_at, status +- `run_checks.html` shows the Cove summary panel and hides the mail section + ### Migrations - `migrate_cove_integration()` — adds 8 columns to `system_settings`, `cove_account_id` to `jobs`, `source_type` + `external_id` to `job_runs`, dedup index on `job_runs.external_id` - `migrate_cove_accounts_table()` — creates `cove_accounts` table with indexes