fix(housekeeping): complete retry command integration

This commit is contained in:
Simo committed 2026-09-03 21:14:15 +02:00
1 parent 4b0c8b82ce
commit 48096833ec
29 files changed
+68 -2

No files matched your search

@@ -1,10 +1,14 @@
import { renderToStaticMarkup } from "react-dom/server";
import { describe, expect, it } from "vitest";
import { describe, expect, it, vi } from "vitest";
import { PERMS } from "@/lib/permission-slugs";
import type { HousekeepingCapabilityContext } from "../../../foundation/contracts";
import { ok } from "../../../foundation/contracts";
import { ContentEditorialPage } from "./editorial";
vi.mock("next/navigation", () => ({
useRouter: () => ({ refresh: vi.fn() }),
}));
function context(granted: readonly string[]): HousekeepingCapabilityContext {
const permissions = new Set(granted);
return {
@@ -14,6 +14,10 @@ vi.mock("../queries/content-queries", () => ({
contentQuery: { run: vi.fn() },
}));
vi.mock("next/navigation", () => ({
useRouter: () => ({ refresh: vi.fn() }),
}));
const context: HousekeepingCapabilityContext = {
actor: { id: 42, username: "operator", rank: 7 },
isSuperAdmin: false,
@@ -1,5 +1,5 @@
import { renderToStaticMarkup } from "react-dom/server";
import { describe, expect, it } from "vitest";
import { describe, expect, it, vi } from "vitest";
import { PERMS } from "@/lib/permission-slugs";
import {
fail,
@@ -13,6 +13,10 @@ import type {
} from "../queries/content-queries";
import { ContentEventWorkflow } from "./event-workflow";
vi.mock("next/navigation", () => ({
useRouter: () => ({ refresh: vi.fn() }),
}));
function context(granted: readonly string[]): HousekeepingCapabilityContext {
const permissions = new Set(granted);
return {
@@ -33,6 +33,10 @@ vi.mock("react", async (importOriginal) => {
};
});
vi.mock("next/navigation", () => ({
useRouter: () => ({ refresh: vi.fn() }),
}));
vi.mock("@/actions/housekeeping-command", () => ({
executeHousekeepingCommand: vi.fn(),
}));
+2
View File
@@ -511,6 +511,7 @@
"rank": {
"create": "Rank create · Create",
"delete": "Rank delete · Delete",
"sync-retry": "Rank synchronization · Retry",
"update": "Rank update · Update"
}
},
@@ -553,6 +554,7 @@
"send-gift": "Rcon send Gift · Send Gift",
"set-motto": "Rcon set Motto · Set Motto",
"set-rank": "Rcon set Rank · Set Rank",
"set-rank-retry": "Rcon set Rank · Retry committed sync",
"update-catalog": "Rcon update Catalog · Update Catalog",
"update-navigator": "Rcon update Navigator · Update Navigator",
"update-word-filter": "Rcon update Word Filter · Update Word Filter"
+2
View File
@@ -3755,6 +3755,7 @@
"rank": {
"create": "Rank create · Create",
"delete": "Rank delete · Delete",
"sync-retry": "Rank synchronization · Retry",
"update": "Rank update · Update"
}
},
@@ -3797,6 +3798,7 @@
"send-gift": "Rcon send Gift · Send Gift",
"set-motto": "Rcon set Motto · Set Motto",
"set-rank": "Rcon set Rank · Set Rank",
"set-rank-retry": "Rcon set Rank · Retry committed sync",
"update-catalog": "Rcon update Catalog · Update Catalog",
"update-navigator": "Rcon update Navigator · Update Navigator",
"update-word-filter": "Rcon update Word Filter · Update Word Filter"
+2
View File
@@ -3755,6 +3755,7 @@
"rank": {
"create": "Rank create · Create",
"delete": "Rank delete · Delete",
"sync-retry": "Rank synchronization · Retry",
"update": "Rank update · Update"
}
},
@@ -3797,6 +3798,7 @@
"send-gift": "Rcon send Gift · Send Gift",
"set-motto": "Rcon set Motto · Set Motto",
"set-rank": "Rcon set Rank · Set Rank",
"set-rank-retry": "Rcon set Rank · Retry committed sync",
"update-catalog": "Rcon update Catalog · Update Catalog",
"update-navigator": "Rcon update Navigator · Update Navigator",
"update-word-filter": "Rcon update Word Filter · Update Word Filter"
+2
View File
@@ -3755,6 +3755,7 @@
"rank": {
"create": "Rank create · Create",
"delete": "Rank delete · Delete",
"sync-retry": "Rank synchronization · Retry",
"update": "Rank update · Update"
}
},
@@ -3797,6 +3798,7 @@
"send-gift": "Rcon send Gift · Send Gift",
"set-motto": "Rcon set Motto · Set Motto",
"set-rank": "Rcon set Rank · Set Rank",
"set-rank-retry": "Rcon set Rank · Retry committed sync",
"update-catalog": "Rcon update Catalog · Update Catalog",
"update-navigator": "Rcon update Navigator · Update Navigator",
"update-word-filter": "Rcon update Word Filter · Update Word Filter"
+2
View File
@@ -3756,6 +3756,7 @@
"rank": {
"create": "Rank create · Create",
"delete": "Rank delete · Delete",
"sync-retry": "Rank synchronization · Retry",
"update": "Rank update · Update"
}
},
@@ -3798,6 +3799,7 @@
"send-gift": "Rcon send Gift · Send Gift",
"set-motto": "Rcon set Motto · Set Motto",
"set-rank": "Rcon set Rank · Set Rank",
"set-rank-retry": "Rcon set Rank · Retry committed sync",
"update-catalog": "Rcon update Catalog · Update Catalog",
"update-navigator": "Rcon update Navigator · Update Navigator",
"update-word-filter": "Rcon update Word Filter · Update Word Filter"
+2
View File
@@ -3755,6 +3755,7 @@
"rank": {
"create": "Rank create · Create",
"delete": "Rank delete · Delete",
"sync-retry": "Rank synchronization · Retry",
"update": "Rank update · Update"
}
},
@@ -3797,6 +3798,7 @@
"send-gift": "Rcon send Gift · Send Gift",
"set-motto": "Rcon set Motto · Set Motto",
"set-rank": "Rcon set Rank · Set Rank",
"set-rank-retry": "Rcon set Rank · Retry committed sync",
"update-catalog": "Rcon update Catalog · Update Catalog",
"update-navigator": "Rcon update Navigator · Update Navigator",
"update-word-filter": "Rcon update Word Filter · Update Word Filter"
+2
View File
@@ -3768,6 +3768,7 @@
"rank": {
"create": "Rank create · Create",
"delete": "Rank delete · Delete",
"sync-retry": "Rank synchronization · Retry",
"update": "Rank update · Update"
}
},
@@ -3810,6 +3811,7 @@
"send-gift": "Rcon send Gift · Send Gift",
"set-motto": "Rcon set Motto · Set Motto",
"set-rank": "Rcon set Rank · Set Rank",
"set-rank-retry": "Rcon set Rank · Retry committed sync",
"update-catalog": "Rcon update Catalog · Update Catalog",
"update-navigator": "Rcon update Navigator · Update Navigator",
"update-word-filter": "Rcon update Word Filter · Update Word Filter"
+2
View File
@@ -3756,6 +3756,7 @@
"rank": {
"create": "Rank create · Create",
"delete": "Rank delete · Delete",
"sync-retry": "Rank synchronization · Retry",
"update": "Rank update · Update"
}
},
@@ -3798,6 +3799,7 @@
"send-gift": "Rcon send Gift · Send Gift",
"set-motto": "Rcon set Motto · Set Motto",
"set-rank": "Rcon set Rank · Set Rank",
"set-rank-retry": "Rcon set Rank · Retry committed sync",
"update-catalog": "Rcon update Catalog · Update Catalog",
"update-navigator": "Rcon update Navigator · Update Navigator",
"update-word-filter": "Rcon update Word Filter · Update Word Filter"
+2
View File
@@ -511,6 +511,7 @@
"rank": {
"create": "Rank create · Create",
"delete": "Rank delete · Delete",
"sync-retry": "Rank synchronization · Retry",
"update": "Rank update · Update"
}
},
@@ -553,6 +554,7 @@
"send-gift": "Rcon send Gift · Send Gift",
"set-motto": "Rcon set Motto · Set Motto",
"set-rank": "Rcon set Rank · Set Rank",
"set-rank-retry": "Rcon set Rank · Retry committed sync",
"update-catalog": "Rcon update Catalog · Update Catalog",
"update-navigator": "Rcon update Navigator · Update Navigator",
"update-word-filter": "Rcon update Word Filter · Update Word Filter"
+2
View File
@@ -3756,6 +3756,7 @@
"rank": {
"create": "Rank create · Create",
"delete": "Rank delete · Delete",
"sync-retry": "Rank synchronization · Retry",
"update": "Rank update · Update"
}
},
@@ -3798,6 +3799,7 @@
"send-gift": "Rcon send Gift · Send Gift",
"set-motto": "Rcon set Motto · Set Motto",
"set-rank": "Rcon set Rank · Set Rank",
"set-rank-retry": "Rcon set Rank · Retry committed sync",
"update-catalog": "Rcon update Catalog · Update Catalog",
"update-navigator": "Rcon update Navigator · Update Navigator",
"update-word-filter": "Rcon update Word Filter · Update Word Filter"
+2
View File
@@ -3755,6 +3755,7 @@
"rank": {
"create": "Rank create · Create",
"delete": "Rank delete · Delete",
"sync-retry": "Rank synchronization · Retry",
"update": "Rank update · Update"
}
},
@@ -3797,6 +3798,7 @@
"send-gift": "Rcon send Gift · Send Gift",
"set-motto": "Rcon set Motto · Set Motto",
"set-rank": "Rcon set Rank · Set Rank",
"set-rank-retry": "Rcon set Rank · Retry committed sync",
"update-catalog": "Rcon update Catalog · Update Catalog",
"update-navigator": "Rcon update Navigator · Update Navigator",
"update-word-filter": "Rcon update Word Filter · Update Word Filter"
+2
View File
@@ -3755,6 +3755,7 @@
"rank": {
"create": "Rank create · Create",
"delete": "Rank delete · Delete",
"sync-retry": "Rank synchronization · Retry",
"update": "Rank update · Update"
}
},
@@ -3797,6 +3798,7 @@
"send-gift": "Rcon send Gift · Send Gift",
"set-motto": "Rcon set Motto · Set Motto",
"set-rank": "Rcon set Rank · Set Rank",
"set-rank-retry": "Rcon set Rank · Retry committed sync",
"update-catalog": "Rcon update Catalog · Update Catalog",
"update-navigator": "Rcon update Navigator · Update Navigator",
"update-word-filter": "Rcon update Word Filter · Update Word Filter"
+2
View File
@@ -3765,6 +3765,7 @@
"rank": {
"create": "Rank create · Create",
"delete": "Rank delete · Delete",
"sync-retry": "Rank synchronization · Retry",
"update": "Rank update · Update"
}
},
@@ -3807,6 +3808,7 @@
"send-gift": "Rcon send Gift · Send Gift",
"set-motto": "Rcon set Motto · Set Motto",
"set-rank": "Rcon set Rank · Set Rank",
"set-rank-retry": "Rcon set Rank · Retry committed sync",
"update-catalog": "Rcon update Catalog · Update Catalog",
"update-navigator": "Rcon update Navigator · Update Navigator",
"update-word-filter": "Rcon update Word Filter · Update Word Filter"
+2
View File
@@ -511,6 +511,7 @@
"rank": {
"create": "Rank create · Create",
"delete": "Rank delete · Delete",
"sync-retry": "Rank synchronization · Retry",
"update": "Rank update · Update"
}
},
@@ -553,6 +554,7 @@
"send-gift": "Rcon send Gift · Send Gift",
"set-motto": "Rcon set Motto · Set Motto",
"set-rank": "Rcon set Rank · Set Rank",
"set-rank-retry": "Rcon set Rank · Retry committed sync",
"update-catalog": "Rcon update Catalog · Update Catalog",
"update-navigator": "Rcon update Navigator · Update Navigator",
"update-word-filter": "Rcon update Word Filter · Update Word Filter"
+2
View File
@@ -3670,6 +3670,7 @@
"rank": {
"create": "Rank create · Create",
"delete": "Rank delete · Delete",
"sync-retry": "Rank synchronization · Retry",
"update": "Rank update · Update"
}
},
@@ -3712,6 +3713,7 @@
"send-gift": "Rcon send Gift · Send Gift",
"set-motto": "Rcon set Motto · Set Motto",
"set-rank": "Rcon set Rank · Set Rank",
"set-rank-retry": "Rcon set Rank · Retry committed sync",
"update-catalog": "Rcon update Catalog · Update Catalog",
"update-navigator": "Rcon update Navigator · Update Navigator",
"update-word-filter": "Rcon update Word Filter · Update Word Filter"
+2
View File
@@ -3755,6 +3755,7 @@
"rank": {
"create": "Rank create · Create",
"delete": "Rank delete · Delete",
"sync-retry": "Rank synchronization · Retry",
"update": "Rank update · Update"
}
},
@@ -3797,6 +3798,7 @@
"send-gift": "Rcon send Gift · Send Gift",
"set-motto": "Rcon set Motto · Set Motto",
"set-rank": "Rcon set Rank · Set Rank",
"set-rank-retry": "Rcon set Rank · Retry committed sync",
"update-catalog": "Rcon update Catalog · Update Catalog",
"update-navigator": "Rcon update Navigator · Update Navigator",
"update-word-filter": "Rcon update Word Filter · Update Word Filter"
+2
View File
@@ -3756,6 +3756,7 @@
"rank": {
"create": "Rank create · Create",
"delete": "Rank delete · Delete",
"sync-retry": "Rank synchronization · Retry",
"update": "Rank update · Update"
}
},
@@ -3798,6 +3799,7 @@
"send-gift": "Rcon send Gift · Send Gift",
"set-motto": "Rcon set Motto · Set Motto",
"set-rank": "Rcon set Rank · Set Rank",
"set-rank-retry": "Rcon set Rank · Retry committed sync",
"update-catalog": "Rcon update Catalog · Update Catalog",
"update-navigator": "Rcon update Navigator · Update Navigator",
"update-word-filter": "Rcon update Word Filter · Update Word Filter"
+2
View File
@@ -3756,6 +3756,7 @@
"rank": {
"create": "Rank create · Create",
"delete": "Rank delete · Delete",
"sync-retry": "Rank synchronization · Retry",
"update": "Rank update · Update"
}
},
@@ -3798,6 +3799,7 @@
"send-gift": "Rcon send Gift · Send Gift",
"set-motto": "Rcon set Motto · Set Motto",
"set-rank": "Rcon set Rank · Set Rank",
"set-rank-retry": "Rcon set Rank · Retry committed sync",
"update-catalog": "Rcon update Catalog · Update Catalog",
"update-navigator": "Rcon update Navigator · Update Navigator",
"update-word-filter": "Rcon update Word Filter · Update Word Filter"
+2
View File
@@ -3755,6 +3755,7 @@
"rank": {
"create": "Rank create · Create",
"delete": "Rank delete · Delete",
"sync-retry": "Rank synchronization · Retry",
"update": "Rank update · Update"
}
},
@@ -3797,6 +3798,7 @@
"send-gift": "Rcon send Gift · Send Gift",
"set-motto": "Rcon set Motto · Set Motto",
"set-rank": "Rcon set Rank · Set Rank",
"set-rank-retry": "Rcon set Rank · Retry committed sync",
"update-catalog": "Rcon update Catalog · Update Catalog",
"update-navigator": "Rcon update Navigator · Update Navigator",
"update-word-filter": "Rcon update Word Filter · Update Word Filter"
+2
View File
@@ -3754,6 +3754,7 @@
"rank": {
"create": "Rank create · Create",
"delete": "Rank delete · Delete",
"sync-retry": "Rank synchronization · Retry",
"update": "Rank update · Update"
}
},
@@ -3796,6 +3797,7 @@
"send-gift": "Rcon send Gift · Send Gift",
"set-motto": "Rcon set Motto · Set Motto",
"set-rank": "Rcon set Rank · Set Rank",
"set-rank-retry": "Rcon set Rank · Retry committed sync",
"update-catalog": "Rcon update Catalog · Update Catalog",
"update-navigator": "Rcon update Navigator · Update Navigator",
"update-word-filter": "Rcon update Word Filter · Update Word Filter"
+2
View File
@@ -3755,6 +3755,7 @@
"rank": {
"create": "Rank create · Create",
"delete": "Rank delete · Delete",
"sync-retry": "Rank synchronization · Retry",
"update": "Rank update · Update"
}
},
@@ -3797,6 +3798,7 @@
"send-gift": "Rcon send Gift · Send Gift",
"set-motto": "Rcon set Motto · Set Motto",
"set-rank": "Rcon set Rank · Set Rank",
"set-rank-retry": "Rcon set Rank · Retry committed sync",
"update-catalog": "Rcon update Catalog · Update Catalog",
"update-navigator": "Rcon update Navigator · Update Navigator",
"update-word-filter": "Rcon update Word Filter · Update Word Filter"
+2
View File
@@ -3755,6 +3755,7 @@
"rank": {
"create": "Rank create · Create",
"delete": "Rank delete · Delete",
"sync-retry": "Rank synchronization · Retry",
"update": "Rank update · Update"
}
},
@@ -3797,6 +3798,7 @@
"send-gift": "Rcon send Gift · Send Gift",
"set-motto": "Rcon set Motto · Set Motto",
"set-rank": "Rcon set Rank · Set Rank",
"set-rank-retry": "Rcon set Rank · Retry committed sync",
"update-catalog": "Rcon update Catalog · Update Catalog",
"update-navigator": "Rcon update Navigator · Update Navigator",
"update-word-filter": "Rcon update Word Filter · Update Word Filter"
+2
View File
@@ -3755,6 +3755,7 @@
"rank": {
"create": "Rank create · Create",
"delete": "Rank delete · Delete",
"sync-retry": "Rank synchronization · Retry",
"update": "Rank update · Update"
}
},
@@ -3797,6 +3798,7 @@
"send-gift": "Rcon send Gift · Send Gift",
"set-motto": "Rcon set Motto · Set Motto",
"set-rank": "Rcon set Rank · Set Rank",
"set-rank-retry": "Rcon set Rank · Retry committed sync",
"update-catalog": "Rcon update Catalog · Update Catalog",
"update-navigator": "Rcon update Navigator · Update Navigator",
"update-word-filter": "Rcon update Word Filter · Update Word Filter"
+2
View File
@@ -3756,6 +3756,7 @@
"rank": {
"create": "Rank create · Create",
"delete": "Rank delete · Delete",
"sync-retry": "Rank synchronization · Retry",
"update": "Rank update · Update"
}
},
@@ -3798,6 +3799,7 @@
"send-gift": "Rcon send Gift · Send Gift",
"set-motto": "Rcon set Motto · Set Motto",
"set-rank": "Rcon set Rank · Set Rank",
"set-rank-retry": "Rcon set Rank · Retry committed sync",
"update-catalog": "Rcon update Catalog · Update Catalog",
"update-navigator": "Rcon update Navigator · Update Navigator",
"update-word-filter": "Rcon update Word Filter · Update Word Filter"
+2
View File
@@ -3755,6 +3755,7 @@
"rank": {
"create": "Rank create · Create",
"delete": "Rank delete · Delete",
"sync-retry": "Rank synchronization · Retry",
"update": "Rank update · Update"
}
},
@@ -3797,6 +3798,7 @@
"send-gift": "Rcon send Gift · Send Gift",
"set-motto": "Rcon set Motto · Set Motto",
"set-rank": "Rcon set Rank · Set Rank",
"set-rank-retry": "Rcon set Rank · Retry committed sync",
"update-catalog": "Rcon update Catalog · Update Catalog",
"update-navigator": "Rcon update Navigator · Update Navigator",
"update-word-filter": "Rcon update Word Filter · Update Word Filter"