Simplify web terminal routes and home layout
- Redirect legacy signals/charts/replay pages to home - Trim nav and update live subscriptions for home and tape - Refresh terminal topbar and layout behavior
This commit is contained in:
parent
eea2d74a3d
commit
c0219233d3
8 changed files with 197 additions and 176 deletions
31
apps/web/app/routes.test.ts
Normal file
31
apps/web/app/routes.test.ts
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import { beforeEach, describe, expect, it, mock } from "bun:test";
|
||||
|
||||
const redirect = mock((path: string) => {
|
||||
throw new Error(`NEXT_REDIRECT:${path}`);
|
||||
});
|
||||
|
||||
mock.module("next/navigation", () => ({ redirect }));
|
||||
|
||||
describe("legacy page redirects", () => {
|
||||
beforeEach(() => {
|
||||
redirect.mockClear();
|
||||
});
|
||||
|
||||
it("redirects /signals to home", async () => {
|
||||
const mod = await import("./signals/page");
|
||||
expect(() => mod.default()).toThrow("NEXT_REDIRECT:/");
|
||||
expect(redirect).toHaveBeenCalledWith("/");
|
||||
});
|
||||
|
||||
it("redirects /charts to home", async () => {
|
||||
const mod = await import("./charts/page");
|
||||
expect(() => mod.default()).toThrow("NEXT_REDIRECT:/");
|
||||
expect(redirect).toHaveBeenCalledWith("/");
|
||||
});
|
||||
|
||||
it("redirects /replay to home", async () => {
|
||||
const mod = await import("./replay/page");
|
||||
expect(() => mod.default()).toThrow("NEXT_REDIRECT:/");
|
||||
expect(redirect).toHaveBeenCalledWith("/");
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue