Cybersecurity-Projects/PROJECTS/advanced
CarterPerez-dev aa9a24bdd0 feat(monitor/frontend): dashboard lifecycle hook (snapshot bootstrap → WS → typed routing)
useDashboardLifecycle() orchestrates the three pieces that make the
dashboard alive:

1. Audio gesture unlock — unlockOnFirstGesture() on mount so playChime()
   is ready when Phase 6 wires alert triggers.
2. Snapshot-then-WS — useSnapshot()'s isSuccess gates createDashboardWS
   so we never open the WS before initial state is in TanStack cache
   (per spec §10.2 race resolution). After connect+setReady the server
   stops buffering and starts streaming deltas.
3. Globe ring eviction — every 5min calls useGlobeEvents.evict(now)
   so expired pulse rings drop off.

Topic routing (typed switch, no `as any` — every payload narrows to a
local interface that matches the verified backend shape):
  cve_new          → useCveStore.push
  kev_added        → useKevStore.push
  ransomware_victim → useRansomwareStore.push
  coinbase_price   → usePrices.pushTick (ISO ts → number, snake_case
                     volume_24h → camelCase)
  earthquake       → globe point + ring pulse (4s TTL)
  iss_position     → globe point (id='iss-current' so each tick replaces
                     the previous) + setQueryData(iss_position) so the
                     ISS panel sees the latest
  wiki_itn         → ticker push (source 'Wikipedia')
  gdelt_spike      → ticker push (source 'GDELT', headline includes
                     z-score and count)
  space_weather/internet_outage/bgp_hijack/scan_firehose → setQueryData
                     to merge into snapshot (panels read from there)
  heartbeat        → no-op (connection liveness only)

Small bug fix in browserDriver: WebSocket.send() throws when readyState
is CONNECTING. createDashboardWS.setReady() can be called before the
socket opens (we call it immediately after snapshot resolves), so the
inner sock.send is now guarded by a readyState===OPEN check. The
onOpen handler in createDashboardWS resends init when the socket
actually opens — belt-and-suspenders.

This is the load-bearing wiring per the plan. Panels stop rendering
single snapshot rows and start growing as WS events arrive.
2026-05-03 09:47:40 -04:00
..
ai-threat-detection Merge pull request #190 from CarterPerez-dev/dependabot/uv/PROJECTS/advanced/ai-threat-detection/backend/python-dotenv-1.2.2 2026-04-26 23:53:53 -04:00
api-rate-limiter chore(deps): bump python-multipart 2026-04-17 22:49:17 +00:00
bug-bounty-platform Merge remote-tracking branch 'origin/main' into chore/haskell-reverse-proxy-finish 2026-04-28 17:57:03 -04:00
encrypted-p2p-chat chore(deps): bump vite in /PROJECTS/advanced/encrypted-p2p-chat/frontend 2026-04-29 07:15:53 +00:00
haskell-reverse-proxy fix: extract Aenebris.Net.IP to dedupe SockAddr rendering (Finding 10) 2026-04-29 02:19:56 -04:00
honeypot-network Update README.md 2026-04-19 13:27:28 -04:00
monitor-the-situation-dashboard feat(monitor/frontend): dashboard lifecycle hook (snapshot bootstrap → WS → typed routing) 2026-05-03 09:47:40 -04:00