fix(admin): say what actually ages a stored account copy out

The backups page stated "Retention: 90 days", from a constant whose
comment said it matched a backup-prune job. There is no such job: nothing
deletes a stored copy by age. The weekly copy is replaced in place, one
per account; the copy taken before "Delete all data" is deleted by the
account-deletion purge when the grace window ends; an uploaded copy stays
until its account is erased.

The list now carries preWipeCopyDays (the grace window, 0 when no such
copy is taken) instead of retentionDays, and the page says exactly the
three facts above, in every language.

Also drops a re-export of the JSON import row limit nothing imports.
This commit is contained in:
Marc-André Bombeck committed 2026-10-25 14:28:07 +01:00
1 parent 459b5baa9d
commit 694befd635
17 files changed
+62 -37

No files matched your search

@@ -49,7 +49,7 @@ vi.mock("@tanstack/react-query", () => ({
createdAt: "2026-09-01T03:00:00.000Z",
},
],
retentionDays: 30,
preWipeCopyDays: 14,
schedule: {
lastSuccessAt: "2026-09-01T03:00:00.000Z",
lastSuccessAgeDays: 2,
@@ -19,7 +19,7 @@ const healthySchedule = {
const mocks = vi.hoisted(() => ({
// Mutable so one file can render both a healthy schedule and a broken one;
// the query mock reads it on every render.
queryData: { rows: [], retentionDays: 30 } as Record<string, unknown>,
queryData: { rows: [], preWipeCopyDays: 14 } as Record<string, unknown>,
}));
/**
@@ -80,7 +80,7 @@ primeLocales("de");
function render(locale: "en" | "de" = "en") {
mocks.queryData = {
rows: [],
retentionDays: 30,
preWipeCopyDays: 14,
schedule: healthySchedule,
};
return renderToStaticMarkup(
@@ -159,7 +159,7 @@ describe("BackupsSection — empty state", () => {
*/
describe("BackupsSection — schedule health", () => {
function withSchedule(schedule: Record<string, unknown>) {
mocks.queryData = { rows: [], retentionDays: 30, schedule };
mocks.queryData = { rows: [], preWipeCopyDays: 14, schedule };
return renderToStaticMarkup(
<I18nProvider initialLocale="en">
<BackupsSection />
@@ -203,7 +203,7 @@ describe("BackupsSection — schedule health", () => {
});
it("survives a response that predates the schedule field", () => {
mocks.queryData = { rows: [], retentionDays: 30 };
mocks.queryData = { rows: [], preWipeCopyDays: 14 };
expect(() =>
renderToStaticMarkup(
<I18nProvider initialLocale="en">
@@ -36,7 +36,7 @@ function render(data: BackupsList["offhost"] | null): string {
? null
: ({
rows: [],
retentionDays: 90,
preWipeCopyDays: 14,
schedule: null,
offhost: data,
} as unknown as BackupsList),
+5 -3
View File
@@ -197,9 +197,11 @@ export function BackupsSection() {
<BackupRowsCards rows={rows} {...rowActions} />
<p className="text-muted-foreground mt-2 text-xs">
{t("admin.section.backups.retentionLabel", {
days: data!.retentionDays,
})}
{data!.preWipeCopyDays > 0
? t("admin.section.backups.retentionNote", {
days: data!.preWipeCopyDays,
})
: t("admin.section.backups.retentionNoteNoGrace")}
</p>
</div>
)}