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:
dirtydishes 2026-05-04 13:42:47 -04:00
parent eea2d74a3d
commit c0219233d3
8 changed files with 197 additions and 176 deletions

View 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("/");
});
});