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
|
|
@ -1,5 +1,6 @@
|
|||
import { describe, expect, it } from "bun:test";
|
||||
import {
|
||||
NAV_ITEMS,
|
||||
buildDefaultFlowFilters,
|
||||
classifierToneForFamily,
|
||||
deriveAlertDirection,
|
||||
|
|
@ -40,9 +41,9 @@ const makeAlert = (overrides: Record<string, unknown> = {}) =>
|
|||
}) as any;
|
||||
|
||||
describe("live manifest", () => {
|
||||
it("includes options on every live route", () => {
|
||||
it("includes options on home and tape", () => {
|
||||
const filters = buildDefaultFlowFilters();
|
||||
for (const pathname of ["/", "/tape", "/signals", "/charts", "/replay"]) {
|
||||
for (const pathname of ["/", "/tape"]) {
|
||||
expect(
|
||||
getLiveManifest(pathname, "SPY", 60000, filters).some(
|
||||
(subscription) => subscription.channel === "options"
|
||||
|
|
@ -61,17 +62,38 @@ describe("live manifest", () => {
|
|||
expect(tapeOptionsSubscriptions).toHaveLength(1);
|
||||
});
|
||||
|
||||
it("keeps option filters on baseline subscription", () => {
|
||||
it("keeps option filters on baseline subscription across page changes", () => {
|
||||
const filters = {
|
||||
...buildDefaultFlowFilters(),
|
||||
minNotional: 125_000
|
||||
};
|
||||
|
||||
const optionsSubscription = getLiveManifest("/signals", "SPY", 60000, filters).find(
|
||||
const homeOptionsSubscription = getLiveManifest("/", "SPY", 60000, filters).find(
|
||||
(subscription) => subscription.channel === "options"
|
||||
);
|
||||
const tapeOptionsSubscription = getLiveManifest("/tape", "SPY", 60000, filters).find(
|
||||
(subscription) => subscription.channel === "options"
|
||||
);
|
||||
|
||||
expect(optionsSubscription?.filters).toBe(filters);
|
||||
expect(homeOptionsSubscription?.filters).toBe(filters);
|
||||
expect(tapeOptionsSubscription?.filters).toBe(filters);
|
||||
});
|
||||
|
||||
it("applies global flow filters to flow subscriptions on home and tape", () => {
|
||||
const filters = {
|
||||
...buildDefaultFlowFilters(),
|
||||
minNotional: 50_000
|
||||
};
|
||||
|
||||
const homeFlowSubscription = getLiveManifest("/", "SPY", 60000, filters).find(
|
||||
(subscription) => subscription.channel === "flow"
|
||||
);
|
||||
const tapeFlowSubscription = getLiveManifest("/tape", "SPY", 60000, filters).find(
|
||||
(subscription) => subscription.channel === "flow"
|
||||
);
|
||||
|
||||
expect(homeFlowSubscription?.filters).toBe(filters);
|
||||
expect(tapeFlowSubscription?.filters).toBe(filters);
|
||||
});
|
||||
|
||||
it("includes scoped option and equity subscriptions", () => {
|
||||
|
|
@ -101,6 +123,15 @@ describe("live manifest", () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe("terminal navigation", () => {
|
||||
it("exposes only Home and Tape as top-level destinations", () => {
|
||||
expect(NAV_ITEMS).toEqual([
|
||||
{ href: "/", label: "Home" },
|
||||
{ href: "/tape", label: "Tape" }
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe("live tape pausable helpers", () => {
|
||||
it("queues new items while paused and flushes them on resume", () => {
|
||||
let state = reducePausableTapeData(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue