From b0b691da9c83985a7f72722d38d66b64a1888bf6 Mon Sep 17 00:00:00 2001 From: Dennis Thiessen Date: Fri, 10 Jul 2026 15:31:41 +0200 Subject: [PATCH] Overview: regime to the nav bar, watchlist up top The market regime banner took a full-width row on the dashboard for ambient context. It is now a subtle status in the top bar (colored dot + "neutral regime", full headline and the longs/shorts caution in the tooltip) linking to /regime - matching the mockup's nav. The watchlist strip moves from the bottom of the dashboard (where it got lost) into the freed spot right under the hero: a slim chip row with today's move per symbol and the full-watchlist link. The empty state is a one-line hint instead of a callout box. Co-Authored-By: Claude Fable 5 --- frontend/src/components/layout/TopBar.tsx | 22 +++++++ frontend/src/pages/DashboardPage.tsx | 78 +++++++++-------------- 2 files changed, 51 insertions(+), 49 deletions(-) diff --git a/frontend/src/components/layout/TopBar.tsx b/frontend/src/components/layout/TopBar.tsx index 20dcde2..49b63f6 100644 --- a/frontend/src/components/layout/TopBar.tsx +++ b/frontend/src/components/layout/TopBar.tsx @@ -3,6 +3,8 @@ import { useQuery } from '@tanstack/react-query'; import { useAuthStore } from '../../stores/authStore'; import { check as healthCheck } from '../../api/health'; import { getRunningJobs } from '../../api/jobs'; +import { useMarketRegime } from '../../hooks/useMarketRegime'; +import { regimeDot, regimeHeadline } from '../../lib/regime'; import TickerSearch from './TickerSearch'; const navItems = [ @@ -41,6 +43,7 @@ export default function TopBar() { }); const running = jobs.data?.running ?? []; + const regime = useMarketRegime(); return (
@@ -73,6 +76,25 @@ export default function TopBar() {
+ {/* Market regime — ambient status; the full picture lives on /regime */} + {regime.data && ( + + + + {regime.data.label} regime + + + )} {/* Live background-job activity, condensed */} {running.length > 0 && ( j.label).join(' · ')}> diff --git a/frontend/src/pages/DashboardPage.tsx b/frontend/src/pages/DashboardPage.tsx index 8446b5c..0815b3e 100644 --- a/frontend/src/pages/DashboardPage.tsx +++ b/frontend/src/pages/DashboardPage.tsx @@ -6,8 +6,6 @@ import { useTrades } from '../hooks/useTrades'; import { useWatchlist } from '../hooks/useWatchlist'; import { usePaperTrades } from '../hooks/usePaperTrades'; import { useTickerNames } from '../hooks/useTickers'; -import { useMarketRegime } from '../hooks/useMarketRegime'; -import { regimeColor, regimeDot, regimeHeadline } from '../lib/regime'; import { Callout } from '../components/ui/Callout'; import { Section } from '../components/ui/Section'; import { OpenTradesPanel } from '../components/dashboard/OpenTradesPanel'; @@ -213,7 +211,6 @@ export default function DashboardPage() { const tickerNames = useTickerNames(); const activation = useActivation(); const openTrades = usePaperTrades('open'); - const regime = useMarketRegime(); const qualifiedSetups = useMemo( () => @@ -342,21 +339,35 @@ export default function DashboardPage() { )}
- {/* Market regime banner */} - {regime.data && ( -
- - Market regime: - - {regimeHeadline(regime.data)} - - {regime.data.label === 'bearish' && ( - — be cautious on new longs - )} - {regime.data.label === 'bullish' && ( - — shorts are counter-trend - )} -
+ {/* Watchlist — a slim glanceable strip right up top (regime moved to the nav bar) */} + {watchlist.data && ( + topWatchlist.length > 0 ? ( +
+ Watchlist + {topWatchlist.map((entry) => ( + + {entry.symbol} + + {entry.change_pct != null + ? `${entry.change_pct >= 0 ? '+' : ''}${entry.change_pct.toFixed(2)}%` + : '—'} + + + ))} + + Full watchlist → + +
+ ) : ( +

+ Watchlist + empty — open any ticker and tap ☆ to add it. +

+ ) )} {/* Focal setup */} @@ -496,37 +507,6 @@ export default function DashboardPage() { - {/* Watchlist — compact chips, drill into any ticker */} -
- {watchlist.isLoading && } - {watchlist.isError && Failed to load watchlist} - {watchlist.data && topWatchlist.length === 0 && ( - - Your watchlist is empty — open any ticker and tap “☆ Add to watchlist”. - - )} - {topWatchlist.length > 0 && ( -
- {topWatchlist.map((entry) => ( - - {entry.symbol} - - {entry.change_pct != null - ? `${entry.change_pct >= 0 ? '+' : ''}${entry.change_pct.toFixed(2)}%` - : '—'} - - - ))} - - Full watchlist → - -
- )} -
); }