diff --git a/src/app/ase-next/page.tsx b/src/app/ase-next/page.tsx index 7ff08c60..9cf4442a 100644 --- a/src/app/ase-next/page.tsx +++ b/src/app/ase-next/page.tsx @@ -14,5 +14,10 @@ export default async function AdminNextPage() { if (!firstVisibleDomain) notFound(); - redirect(toHousekeepingHref(firstVisibleDomain.canonicalHref, "preview")); + const previewHref = toHousekeepingHref( + firstVisibleDomain.canonicalHref, + "preview", + ); + + redirect(previewHref === "/ase-next" ? "/ase-next/operations" : previewHref); } diff --git a/src/features/housekeeping/foundation/preview-route-contract.test.ts b/src/features/housekeeping/foundation/preview-route-contract.test.ts index f3ad2a55..67061d98 100644 --- a/src/features/housekeeping/foundation/preview-route-contract.test.ts +++ b/src/features/housekeeping/foundation/preview-route-contract.test.ts @@ -407,13 +407,15 @@ describe("/ase-next first visible domain", () => { vi.clearAllMocks(); }); - it("redirects an administrator to Operations in locked registry order", async () => { + it("redirects an administrator away from the Operations preview root", async () => { routeMocks.getHousekeepingCapabilityContext.mockResolvedValue( capabilityContext([PERMS.ADMIN_DASHBOARD, PERMS.USERS_VIEW]), ); - await expect(AdminNextPage()).rejects.toThrow("NEXT_REDIRECT:/ase-next"); - expect(routeMocks.redirect).toHaveBeenCalledWith("/ase-next"); + await expect(AdminNextPage()).rejects.toThrow( + "NEXT_REDIRECT:/ase-next/operations", + ); + expect(routeMocks.redirect).toHaveBeenCalledWith("/ase-next/operations"); expect(routeMocks.getHousekeepingCapabilityContext).toHaveBeenCalledTimes( 1, ); diff --git a/src/features/housekeeping/migration/content.test.ts b/src/features/housekeeping/migration/content.test.ts index 69c56fab..178471c9 100644 --- a/src/features/housekeeping/migration/content.test.ts +++ b/src/features/housekeeping/migration/content.test.ts @@ -31,8 +31,7 @@ describe("contentMigrationEntries", () => { expect( contentMigrationEntries.every( (row) => - row.targetPath === null || - row.targetPath.startsWith("/admin/content/"), + row.targetPath === null || row.targetPath.startsWith("/ase/content/"), ), ).toBe(true); }); @@ -45,23 +44,23 @@ describe("contentMigrationEntries", () => { ).toEqual([ { legacyPath: "/admin/articles/:id", - targetPath: "/admin/content/editorial/articles/:id", + targetPath: "/ase/content/editorial/articles/:id", }, { legacyPath: "/admin/ads/:id", - targetPath: "/admin/content/media/ads/:id", + targetPath: "/ase/content/media/ads/:id", }, { legacyPath: "/admin/events/:id", - targetPath: "/admin/content/engagement/events/:id", + targetPath: "/ase/content/engagement/events/:id", }, { legacyPath: "/admin/polls/:id", - targetPath: "/admin/content/engagement/polls/:id", + targetPath: "/ase/content/engagement/polls/:id", }, { legacyPath: "/admin/help-questions/:id", - targetPath: "/admin/content/help/questions/:id", + targetPath: "/ase/content/help/questions/:id", }, ]); }); diff --git a/src/features/housekeeping/migration/economy.test.ts b/src/features/housekeeping/migration/economy.test.ts index e93e9e76..ae195ac0 100644 --- a/src/features/housekeeping/migration/economy.test.ts +++ b/src/features/housekeeping/migration/economy.test.ts @@ -27,8 +27,7 @@ describe("economyMigrationEntries", () => { expect( economyMigrationEntries.every( (row) => - row.targetPath === null || - row.targetPath.startsWith("/admin/economy/"), + row.targetPath === null || row.targetPath.startsWith("/ase/economy/"), ), ).toBe(true); }); diff --git a/src/features/housekeeping/migration/hotel.test.ts b/src/features/housekeeping/migration/hotel.test.ts index 9fa43e8a..cc613798 100644 --- a/src/features/housekeeping/migration/hotel.test.ts +++ b/src/features/housekeeping/migration/hotel.test.ts @@ -22,7 +22,7 @@ describe("hotelMigrationEntries", () => { expect( hotelMigrationEntries.every( (row) => - row.targetPath === null || row.targetPath.startsWith("/admin/hotel/"), + row.targetPath === null || row.targetPath.startsWith("/ase/hotel/"), ), ).toBe(true); }); @@ -39,27 +39,27 @@ describe("hotelMigrationEntries", () => { ).toEqual([ { legacyPath: "/admin/rooms", - targetPath: "/admin/hotel/rooms", + targetPath: "/ase/hotel/rooms", decision: "REBUILD", }, { legacyPath: "/admin/rooms/:id", - targetPath: "/admin/hotel/rooms/:id", + targetPath: "/ase/hotel/rooms/:id", decision: "MERGE", }, { legacyPath: "/admin/rooms/:id/furni", - targetPath: "/admin/hotel/rooms/:id/furni", + targetPath: "/ase/hotel/rooms/:id/furni", decision: "REBUILD", }, { legacyPath: "/admin/rooms/edit/:id", - targetPath: "/admin/hotel/rooms/:id", + targetPath: "/ase/hotel/rooms/:id", decision: "MERGE", }, { legacyPath: "/admin/rooms/show/:id", - targetPath: "/admin/hotel/rooms/:id", + targetPath: "/ase/hotel/rooms/:id", decision: "MERGE", }, ]); diff --git a/src/features/housekeeping/migration/operations.test.ts b/src/features/housekeeping/migration/operations.test.ts index a50c8cd3..e410f588 100644 --- a/src/features/housekeeping/migration/operations.test.ts +++ b/src/features/housekeeping/migration/operations.test.ts @@ -10,7 +10,7 @@ describe("operationsMigrationEntries", () => { legacyPath: "/admin", sourceFile: "src/app/admin/page.tsx", targetDomain: "operations", - targetPath: "/admin/work", + targetPath: "/ase", decision: "REBUILD", capabilities: { read: [PERMS.ADMIN_DASHBOARD], mutate: [] }, dependencies: { diff --git a/src/features/housekeeping/migration/people.test.ts b/src/features/housekeeping/migration/people.test.ts index a6950113..d9bdea1b 100644 --- a/src/features/housekeeping/migration/people.test.ts +++ b/src/features/housekeeping/migration/people.test.ts @@ -29,7 +29,7 @@ describe("peopleMigrationEntries", () => { expect(modRows).toHaveLength(13); expect(modRows.every((row) => row.decision === "MERGE")).toBe(true); expect( - modRows.every((row) => row.targetPath?.startsWith("/admin/people/")), + modRows.every((row) => row.targetPath?.startsWith("/ase/people/")), ).toBe(true); }); diff --git a/src/features/housekeeping/migration/system.test.ts b/src/features/housekeeping/migration/system.test.ts index da8b3244..cf299f9f 100644 --- a/src/features/housekeeping/migration/system.test.ts +++ b/src/features/housekeeping/migration/system.test.ts @@ -50,7 +50,7 @@ describe("systemMigrationEntries", () => { expect(systemMigrationEntries).toContainEqual( expect.objectContaining({ legacyPath: "/admin/permissions", - targetPath: "/admin/system/access/permissions", + targetPath: "/ase/system/access/permissions", decision: expect.not.stringMatching("REMOVE"), }), ); @@ -75,10 +75,10 @@ describe("systemMigrationEntries", () => { it("uses only the approved System target roots", () => { const allowedRoots = [ - "/admin/system/access", - "/admin/system/configuration", - "/admin/system/observability", - "/admin/system/operations", + "/ase/system/access", + "/ase/system/configuration", + "/ase/system/observability", + "/ase/system/operations", ]; expect(