From 71ea453b82ef13c31525b5e6825dac0c11758008 Mon Sep 17 00:00:00 2001 From: CarterPerez-dev Date: Sun, 3 May 2026 09:34:58 -0400 Subject: [PATCH] feat(monitor/frontend): BTC panel (hero price + glyph-based change indicator, no color direction) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reads from the existing usePrices store (latest tick + 60-min history). Seeds latest from snapshot.coinbase_price on mount, converting the ISO ts string and snake_case volume_24h to the store's number-ts and camelCase volume24h shapes (verified against live snapshot). Hero price uses --type-num-xl mono with tabular-nums — the dashboard's biggest single number by design. Color stays --fg-1 regardless of direction. The 1H change row uses △ / ▽ glyph + sign for direction (not green/red) per the ethos no-branded-color-per-metric rule. Compute is (last - first) / first * 100 over the 60 minute-bar closes. Stale indicator goes amber when last tick > 60s ago (Coinbase WS expects sub-second updates; 60s of silence = real staleness). 24H change is deferred — would need backend snapshot to send 24h of minute bars; the store caps at 60. Plan said both 1H and 24H but 24H isn't computable from the available data yet. Showing only 1H is honest — the missing row would be permanent "—" otherwise. Sparkline is the 60-minute close ladder. Renders null while history is shorter than 2 points (Sparkline primitive's own contract). Empty panel surface is fine — operator UI doesn't onboard. Plan 5 Task 18 Design QA: hero is the largest single number, price color stays --fg-1, change row uses glyph + sign (no color), sparkline is single-stroke currentColor with no fill or axes, no animated count-up on price change. --- .../src/pages/dashboard/Dashboard.tsx | 5 +- .../src/pages/panels/BTCPanel.module.scss | 59 +++++++++ .../frontend/src/pages/panels/BTCPanel.tsx | 122 ++++++++++++++++++ 3 files changed, 185 insertions(+), 1 deletion(-) create mode 100644 PROJECTS/advanced/monitor-the-situation-dashboard/frontend/src/pages/panels/BTCPanel.module.scss create mode 100644 PROJECTS/advanced/monitor-the-situation-dashboard/frontend/src/pages/panels/BTCPanel.tsx diff --git a/PROJECTS/advanced/monitor-the-situation-dashboard/frontend/src/pages/dashboard/Dashboard.tsx b/PROJECTS/advanced/monitor-the-situation-dashboard/frontend/src/pages/dashboard/Dashboard.tsx index 37657844..6e2841b9 100644 --- a/PROJECTS/advanced/monitor-the-situation-dashboard/frontend/src/pages/dashboard/Dashboard.tsx +++ b/PROJECTS/advanced/monitor-the-situation-dashboard/frontend/src/pages/dashboard/Dashboard.tsx @@ -2,6 +2,7 @@ // Dashboard.tsx import { Globe } from '@/pages/globe/Globe' +import { BTCPanel } from '@/pages/panels/BTCPanel' import { CVEVelocityPanel } from '@/pages/panels/CVEVelocityPanel' import { DShieldPanel } from '@/pages/panels/DShieldPanel' import { KEVPanel } from '@/pages/panels/KEVPanel' @@ -26,7 +27,9 @@ export function Dashboard(): React.ReactElement {
-