Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(e2e): cover all nine top-level redirects, not seven\n\nAppRoutes.tsx declares nine top-level <Navigate> routes (lines 75, 141, 142,\n170, 184, 188, 202, 215, 238). The first version of this spec covered seven --\n/accounts (the pre-merge chat alias) and /feedback (moved into Settings) were\nsimply missed.\n\nAdd both, and a count tripwire so the next addition to the route table shows up\nas a failure here rather than as silence.\n

M3gA-Mindef9ecc52bda3
diff --git a/app/test/playwright/specs/route-redirect-history.spec.ts b/app/test/playwright/specs/route-redirect-history.spec.ts
index a212bfd5f8..16f59746df 100644
--- a/app/test/playwright/specs/route-redirect-history.spec.ts
+++ b/app/test/playwright/specs/route-redirect-history.spec.ts
@@ -44,8 +44,19 @@ const REDIRECTS: ReadonlyArray<readonly [string, string]> = [
['/home', '/chat'],
['/activity', '/settings/notifications'],
['/intelligence', '/settings/notifications'],
+ // The retired unified-chat aliases. `/accounts` predates the /chat merge;
+ // `/feedback` moved into Settings.
+ ['/accounts', '/chat'],
+ ['/feedback', '/settings/feedback'],
];
+// Guard against this list silently falling behind the route table: every
+// top-level `<Navigate>` in AppRoutes.tsx should appear above. There are nine
+// (AppRoutes.tsx lines 75, 141, 142, 170, 184, 188, 202, 215, 238) and the
+// first version of this spec covered seven — the two chat/settings aliases
+// were simply missed. A count assertion is a cheap tripwire for the next one.
+const EXPECTED_TOP_LEVEL_REDIRECTS = 9;
+
test.describe('Retired routes redirect without trapping the Back button', () => {
test.beforeEach(async ({ page }) => {
await bootAuthenticatedPage(page, 'pw-redirect-history-user', '/brain');
@@ -75,6 +86,10 @@ test.describe('Retired routes redirect without trapping the Back button', () =>
await expect.poll(() => hash(page), { timeout: 10_000 }).toMatch(/^#\/brain/);
});
}
+
+ test('this spec covers every top-level redirect the route table declares', () => {
+ expect(REDIRECTS).toHaveLength(EXPECTED_TOP_LEVEL_REDIRECTS);
+ });
});
test.describe('The /channels redirect carries its tab selector through a real navigation', () => {