refactor(admin): remove legacy menu editor

This commit is contained in:
Simo committed 2026-09-05 20:08:19 +02:00
1 parent 98b0009206
commit 667637f8da
12 files changed
+13 -461

No files matched your search

@@ -612,8 +612,8 @@ describe("housekeeping foundation completion contracts", () => {
HOUSEKEEPING_MIGRATION_MATRIX,
);
expect(HOUSEKEEPING_MIGRATION_MATRIX).toHaveLength(139);
expect(discovered).toHaveLength(139);
expect(HOUSEKEEPING_MIGRATION_MATRIX).toHaveLength(138);
expect(discovered).toHaveLength(138);
expect(issues).toEqual([]);
});
});
@@ -29,7 +29,7 @@ describe("discoverLegacyPages", () => {
it("discovers the exact legacy administration inventory", () => {
const pages = discoverLegacyPages();
expect(pages).toHaveLength(139);
expect(pages).toHaveLength(138);
expect(pages).toContainEqual({
surface: "admin",
legacyPath: "/admin/users/:id/edit",
@@ -4,10 +4,10 @@ import { HOUSEKEEPING_MIGRATION_MATRIX } from "./matrix";
import { validateMigrationEntries } from "./validate-matrix";
describe("HOUSEKEEPING_MIGRATION_MATRIX", () => {
it("covers all 139 legacy pages exactly once", () => {
it("covers all 138 legacy pages exactly once", () => {
const discovered = discoverLegacyPages();
expect(HOUSEKEEPING_MIGRATION_MATRIX).toHaveLength(139);
expect(HOUSEKEEPING_MIGRATION_MATRIX).toHaveLength(138);
expect(
validateMigrationEntries(discovered, HOUSEKEEPING_MIGRATION_MATRIX),
).toEqual([]);
@@ -13,14 +13,13 @@ const SYSTEM_PREFIXES = [
"/admin/housekeeping",
"/admin/logs",
"/admin/maintenance",
"/admin/menu",
"/admin/permissions",
"/admin/settings",
] as const;
describe("systemMigrationEntries", () => {
it("covers all 20 System pages exactly once", () => {
expect(systemMigrationEntries).toHaveLength(20);
it("covers all 19 System pages exactly once", () => {
expect(systemMigrationEntries).toHaveLength(19);
expect(
validateMigrationEntries(
ownedLegacyPages(SYSTEM_PREFIXES),
@@ -37,11 +36,6 @@ describe("systemMigrationEntries", () => {
decision: "REMOVE",
targetPath: null,
}),
expect.objectContaining({
legacyPath: "/admin/menu",
decision: "REMOVE",
targetPath: null,
}),
]),
);
});
@@ -346,28 +346,6 @@ export const systemMigrationEntries: readonly MigrationEntry[] = [
accessibility: "PARTIAL",
notes: ["Maintenance changes global login availability and splash content"],
}),
plannedSystemEntry({
surface: "admin",
legacyPath: "/admin/menu",
sourceFile: "src/app/admin/menu/page.tsx",
targetPath: null,
decision: "REMOVE",
capabilities: {
read: [PERMS.SETTINGS_VIEW],
mutate: [PERMS.SETTINGS_EDIT],
},
dependencies: {
queries: ["ADMIN_NAV_GROUPS", "siteSettings.get"],
mutations: ["saveAdminNavConfig", "siteSettings.update"],
},
auditRequirement: "PRIVILEGED_MUTATION",
localization: "PARTIAL",
accessibility: "PARTIAL",
requiredTests: ["integration", "e2e"],
notes: [
"Remove the manual legacy menu editor because foundation manifests own navigation",
],
}),
plannedSystemEntry({
surface: "admin",
legacyPath: "/admin/permissions",