Destroy community 4/9 — back up inside the dialog: every dataset's export in sequence, time left, confirm locked while it runs (DC2/DC3/DC3x) #1788

Closed
opened 2026-09-23 18:06:42 +00:00 by ben · 2 comments
Owner

Parent

#1784 (spec) — from #1781.

What to build

Create and download backup now in DC1 runs the existing per-dataset export (Backups → Export, P7-S6) for every dataset, one after another. It downloads each archive into the browser through the existing export-download route and writes a client-side manifest naming them. Size is shown before it starts; bytes done, rate and time left are shown while it runs.

Destroy is locked while the backup runs. A failed dataset is named with its reason and can be retried alone, or the operator can go on without it knowingly: a standing backup-missing line stays visible at confirm. The backup is a recommendation, never a gate. Each export is logged exactly as a Backups → Export is.

Acceptance criteria

  • DC1 backup-section shows backup-size (before starting), backup-contents, create-and-download-backup and sealed-copies-note (spec #1784 stories 11–12)
  • DC2: backup-progress with one row per dataset (downloaded, current or waiting; data-dataset keyed) and backup-remaining with bytes done / total, rate and time left (13)
  • while running, confirm-destroy stays disabled even with a matching word, and confirm-locked-note is shown (14)
  • cancel-backup stops the export in flight, keeps finished archives and returns to DC1; closing the dialog mid-backup does the same (15, 10)
  • DC3: backup-files lists the manifest plus one archive per dataset with names and sizes; the manifest names each dataset, archive, size and time taken; backup-unencrypted-note shown (16–17)
  • DC3x: the failed dataset carries backup-failed-dataset + backup-failure-reason while the others keep their state; retry-dataset re-exports only it; continue-without → DC1 with backup-missing naming the gap, still visible in DC4 (18–19)
  • no backup taken → the word still arms confirm, and the backup line reads "No backup taken"; DC6's backup-recap reflects what was actually downloaded (20)
  • each export shows in the activity log exactly as a Backups → Export does (21)
  • dashboard vitest with a fake backups client covering the sequence, a failure with retry, go on without, the lock and the cancel

Design contract: DDR 0274, flow docs/ux/flows/destroy-community.mermaid, frames docs/ux/wireframes/destroy-community/ — the data-field / data-action / data-status attributes are the element contract design-verify checks.

Blocked by

## Parent #1784 (spec) — from #1781. ## What to build **Create and download backup now** in DC1 runs the existing per-dataset export (Backups → Export, P7-S6) for every dataset, one after another. It downloads each archive into the browser through the existing export-download route and writes a client-side manifest naming them. Size is shown **before** it starts; bytes done, rate and time left are shown while it runs. Destroy is **locked while the backup runs**. A failed dataset is named with its reason and can be retried alone, or the operator can go on without it knowingly: a standing `backup-missing` line stays visible at confirm. The backup is a recommendation, never a gate. Each export is logged exactly as a Backups → Export is. ## Acceptance criteria - [ ] DC1 `backup-section` shows `backup-size` (before starting), `backup-contents`, `create-and-download-backup` and `sealed-copies-note` (spec #1784 stories 11–12) - [ ] DC2: `backup-progress` with one row per dataset (downloaded, current or waiting; `data-dataset` keyed) and `backup-remaining` with bytes done / total, rate and time left (13) - [ ] while running, `confirm-destroy` stays `disabled` even with a matching word, and `confirm-locked-note` is shown (14) - [ ] `cancel-backup` stops the export in flight, keeps finished archives and returns to DC1; closing the dialog mid-backup does the same (15, 10) - [ ] DC3: `backup-files` lists the manifest plus one archive per dataset with names and sizes; the manifest names each dataset, archive, size and time taken; `backup-unencrypted-note` shown (16–17) - [ ] DC3x: the failed dataset carries `backup-failed-dataset` + `backup-failure-reason` while the others keep their state; `retry-dataset` re-exports only it; `continue-without` → DC1 with `backup-missing` naming the gap, still visible in DC4 (18–19) - [ ] no backup taken → the word still arms confirm, and the backup line reads "No backup taken"; DC6's `backup-recap` reflects what was actually downloaded (20) - [ ] each export shows in the activity log exactly as a Backups → Export does (21) - [ ] dashboard vitest with a fake backups client covering the sequence, a failure with retry, go on without, the lock and the cancel Design contract: DDR 0274, flow `docs/ux/flows/destroy-community.mermaid`, frames `docs/ux/wireframes/destroy-community/` — the `data-field` / `data-action` / `data-status` attributes are the element contract `design-verify` checks. ## Blocked by - #1786

swarm-claim host=elitebook-distributed-server-03 run=30978
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=30978 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #1788 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1788,
  "status": "success",
  "commits": [
    "0f77870b"
  ],
  "changed_files": [
    "STATUS.md",
    "dashboard/src/bootstrap.ts",
    "dashboard/src/components/DashboardComposition.vue",
    "dashboard/src/components/shell/DestroyDialog.vue",
    "dashboard/src/components/shell/DestroyTerminal.vue",
    "dashboard/src/lib/dashboardNavigator.ts",
    "dashboard/src/lib/destroy.ts",
    "dashboard/tests/unit/destroy.test.ts"
  ],
  "tests": [
    {
      "command": "npx vitest run tests/unit/destroy.test.ts (dashboard)",
      "exit_code": 0
    },
    {
      "command": "npx vitest run (full dashboard suite, 1927 tests)",
      "exit_code": 0
    },
    {
      "command": "npx vue-tsc --noEmit (dashboard)",
      "exit_code": 0
    },
    {
      "command": "./node_modules/.bin/eslint . (root, the push TS gate)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "DC1 backup-section shows backup-size (before starting), backup-contents, create-and-download-backup and sealed-copies-note (11-12)": "DestroyDialog.vue backup-section idle state renders backup-size (backupSizeLine from preview, shown before start), backup-contents, create-and-download-backup, sealed-copies-note; asserted by destroy.test.ts 'DC1 offers the backup with size, contents and the sealed-copies note'",
    "DC2 backup-progress one row per dataset (downloaded/current/waiting; data-dataset keyed) and backup-remaining bytes done/total, rate and time left (13)": "DestroyDialog.vue running state renders backup-progress rows keyed by data-dataset with per-row status and backup-remaining (remainingLine: bytes done/total + rate + humanDuration time left); asserted by 'DC2 shows per-dataset progress and remaining, and LOCKS confirm while running'",
    "while running, confirm-destroy stays disabled even with a matching word, and confirm-locked-note is shown (14)": "armed computed returns false while backupPhase==='running'; confirm-destroy data-status='disabled'+disabled attr; confirm-locked-note rendered; asserted in the same DC2 test",
    "cancel-backup stops the export in flight, keeps finished archives and returns to DC1; closing the dialog mid-backup does the same (15,10)": "cancelBackup() sets cancelled + phase idle keeping completed[]; onUnmounted sets cancelled; asserted by 'cancel stops the sequence, keeps finished archives, and returns to DC1' (recap reflects the 1 kept archive)",
    "DC3 backup-files lists the manifest plus one archive per dataset with names and sizes; the manifest names each dataset, archive, size and time taken; backup-unencrypted-note shown (16-17)": "done state renders backup-files (manifest.name + one archive per completed dataset with humanBytes) + backup-unencrypted-note; buildBackupManifest builds the naming manifest; asserted by 'DC3 lists the manifest and one archive per dataset...' and the pure 'the manifest names each dataset, archive, size and time taken' unit test",
    "DC3x failed dataset carries backup-failed-dataset + backup-failure-reason while others keep state; retry-dataset re-exports only it; continue-without -> DC1 with backup-missing, still visible in DC4 (18-19)": "failed state marks the failed row data-field=backup-failed-dataset with backup-failure-reason, others keep status; startBackup re-run skips done rows; continueWithout adds missing[] rendered as backup-missing kept through the word/confirm; asserted by 'DC3x names the failed dataset...retry re-exports only it' and 'go on without a failed dataset keeps a standing backup-missing line through confirm'",
    "no backup taken -> the word still arms confirm, and the backup line reads No backup taken; DC6 backup-recap reflects what was downloaded (20)": "armed unaffected by no backup; onConfirm emits backupRecapLine(completed,total); DestroyTerminal backup-recap reads navigator.backupRecap; asserted by 'no backup taken -> the word still arms and the recap reads No backup taken' and 'DC6 backup-recap reflects what the dialog downloaded'",
    "each export shows in the activity log exactly as a Backups -> Export does (21)": "the sequence drives the SAME BackupExportClient (deps.backups.exportClient) whose export() returns ExportResult.logged=true; asserted by 'DC3 lists the manifest...each export is logged' checking backup.exported == all dataset ids through the shared seam",
    "dashboard vitest with a fake backups client covering the sequence, a failure with retry, go on without, the lock and the cancel": "destroy.test.ts adds a ManualExportClient fake and 10 cases covering the full sequence, DC2 lock, cancel, failure+retry, continue-without, no-backup recap, DC6 recap wiring, and pure manifest/recap tests; 32/32 pass"
  },
  "summary": "The Destroy community dialog now runs the in-dialog backup (DC2/DC3/DC3x): every dataset's P7-S6 export in sequence with per-dataset progress and time left, confirm locked while it runs, a self-naming manifest, per-dataset failure with retry or go-on-without, and a DC6 recap of what actually downloaded.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1788 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1788, "status": "success", "commits": [ "0f77870b" ], "changed_files": [ "STATUS.md", "dashboard/src/bootstrap.ts", "dashboard/src/components/DashboardComposition.vue", "dashboard/src/components/shell/DestroyDialog.vue", "dashboard/src/components/shell/DestroyTerminal.vue", "dashboard/src/lib/dashboardNavigator.ts", "dashboard/src/lib/destroy.ts", "dashboard/tests/unit/destroy.test.ts" ], "tests": [ { "command": "npx vitest run tests/unit/destroy.test.ts (dashboard)", "exit_code": 0 }, { "command": "npx vitest run (full dashboard suite, 1927 tests)", "exit_code": 0 }, { "command": "npx vue-tsc --noEmit (dashboard)", "exit_code": 0 }, { "command": "./node_modules/.bin/eslint . (root, the push TS gate)", "exit_code": 0 } ], "criteria": { "DC1 backup-section shows backup-size (before starting), backup-contents, create-and-download-backup and sealed-copies-note (11-12)": "DestroyDialog.vue backup-section idle state renders backup-size (backupSizeLine from preview, shown before start), backup-contents, create-and-download-backup, sealed-copies-note; asserted by destroy.test.ts 'DC1 offers the backup with size, contents and the sealed-copies note'", "DC2 backup-progress one row per dataset (downloaded/current/waiting; data-dataset keyed) and backup-remaining bytes done/total, rate and time left (13)": "DestroyDialog.vue running state renders backup-progress rows keyed by data-dataset with per-row status and backup-remaining (remainingLine: bytes done/total + rate + humanDuration time left); asserted by 'DC2 shows per-dataset progress and remaining, and LOCKS confirm while running'", "while running, confirm-destroy stays disabled even with a matching word, and confirm-locked-note is shown (14)": "armed computed returns false while backupPhase==='running'; confirm-destroy data-status='disabled'+disabled attr; confirm-locked-note rendered; asserted in the same DC2 test", "cancel-backup stops the export in flight, keeps finished archives and returns to DC1; closing the dialog mid-backup does the same (15,10)": "cancelBackup() sets cancelled + phase idle keeping completed[]; onUnmounted sets cancelled; asserted by 'cancel stops the sequence, keeps finished archives, and returns to DC1' (recap reflects the 1 kept archive)", "DC3 backup-files lists the manifest plus one archive per dataset with names and sizes; the manifest names each dataset, archive, size and time taken; backup-unencrypted-note shown (16-17)": "done state renders backup-files (manifest.name + one archive per completed dataset with humanBytes) + backup-unencrypted-note; buildBackupManifest builds the naming manifest; asserted by 'DC3 lists the manifest and one archive per dataset...' and the pure 'the manifest names each dataset, archive, size and time taken' unit test", "DC3x failed dataset carries backup-failed-dataset + backup-failure-reason while others keep state; retry-dataset re-exports only it; continue-without -> DC1 with backup-missing, still visible in DC4 (18-19)": "failed state marks the failed row data-field=backup-failed-dataset with backup-failure-reason, others keep status; startBackup re-run skips done rows; continueWithout adds missing[] rendered as backup-missing kept through the word/confirm; asserted by 'DC3x names the failed dataset...retry re-exports only it' and 'go on without a failed dataset keeps a standing backup-missing line through confirm'", "no backup taken -> the word still arms confirm, and the backup line reads No backup taken; DC6 backup-recap reflects what was downloaded (20)": "armed unaffected by no backup; onConfirm emits backupRecapLine(completed,total); DestroyTerminal backup-recap reads navigator.backupRecap; asserted by 'no backup taken -> the word still arms and the recap reads No backup taken' and 'DC6 backup-recap reflects what the dialog downloaded'", "each export shows in the activity log exactly as a Backups -> Export does (21)": "the sequence drives the SAME BackupExportClient (deps.backups.exportClient) whose export() returns ExportResult.logged=true; asserted by 'DC3 lists the manifest...each export is logged' checking backup.exported == all dataset ids through the shared seam", "dashboard vitest with a fake backups client covering the sequence, a failure with retry, go on without, the lock and the cancel": "destroy.test.ts adds a ManualExportClient fake and 10 cases covering the full sequence, DC2 lock, cancel, failure+retry, continue-without, no-backup recap, DC6 recap wiring, and pure manifest/recap tests; 32/32 pass" }, "summary": "The Destroy community dialog now runs the in-dialog backup (DC2/DC3/DC3x): every dataset's P7-S6 export in sequence with per-dataset progress and time left, confirm locked while it runs, a self-naming manifest, per-dataset failure with retry or go-on-without, and a DC6 recap of what actually downloaded.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#1788
No description provided.