Skip to content

Command-center Worldwatch rebuild + real market/infrastructure data#3

Open
gryszzz wants to merge 19 commits into
mainfrom
command-center-ui
Open

Command-center Worldwatch rebuild + real market/infrastructure data#3
gryszzz wants to merge 19 commits into
mainfrom
command-center-ui

Conversation

@gryszzz

@gryszzz gryszzz commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Rebuilds Worldwatch into the approved command-center composition (docs/design/command-center-target.png) with real data, and brings the Market + Infrastructure routes onto real prices. Everything labeled honestly — no fake data, no fuzzy ticker merge, no buy/sell signals.

Shell & layout

  • Top command bar (Source Ops %, online/total, refresh, Global Status) — all derived from real source counts (honest cold-start values, not the mockup's fabricated 87%).
  • Labeled nav rail + blended sidebar modules.
  • 3-column reference cockpit: What Changed Today (left) · globe (own cell, freely navigable) · analyst dossier (right) · bottom timeline band. No more floating overlays crowding the globe.

Globe

  • Real WebGL globe (globe.gl/three.js) behind the existing lazy boundary, own chunk (not in startup bundle), bundled NASA night texture. Free orbit rotation, zoom-to-fit, viewport-adaptive height. Markers colored by provenance/severity; renders only proof-backed coordinates.

Real data (dev preview bridge — honest, no second truth engine)

  • USGS earthquakes (official-api) + OSM power infrastructure (100+ plants, operator = owning company, fuel→sector), both flowing through the existing worldwatch layer registry. OSM labeled public-unauthenticated/community (ODbL), never official.
  • Infrastructure → company → market-sector exposure chain rendered in the dossier (e.g. Mount Elbert Powerplant → US Bureau of Reclamation → hydro/utilities/renewables). Exact names only; no ticker guessing, no price/trading claim.

Market prices (TradingView)

  • Market and Infrastructure routes now show real TradingView prices (XLE energy, XLU utilities, oil, uranium, solar, clean energy, S&P) — no key, no CORS, no fuzzy merge. Clearly a third-party market reference, never an Atlasz proof; no buy/sell signal.
  • Baseline CSP added (was none) allowing self + TradingView domains for the desktop app.

Honest leftovers

  • Desktop CSP needs Mac GUI smoke before release.
  • News feeds are CORS-blocked in-browser (need desktop connectors / official feed).
  • Sources/Coverage/Dossiers/Settings routes still on the legacy scaffold.

Gates green on every commit: tsc · eslint · 788 tests · build · git diff --check · checkRuntimeConfig · runtimeVerification 13/13.

🤖 Generated with Claude Code

grysz and others added 14 commits June 29, 2026 17:27
Visual target pass — match the approved command-center mockup
(docs/design/command-center-target.png) while keeping every value real.

Shell:
- Top command bar: Source Ops score, online/total, last refresh, Global Status,
  status pills, icon actions. All derived from real source counts — cold start
  honestly reads 0/0 / Standby, never the mockup's fabricated 87% / Elevated.
- Left nav rail expanded with labels by default (ATLASZ INTEL + Worldwatch,
  Globe, Sources, Market, Infrastructure, Dossiers, Coverage, Settings).
- Removed two redundant stacked "Aegis Worldwatch" headers; reclaimed vertical
  space.

Globe (the big one):
- Real WebGL globe via globe.gl/three.js, mounted ONLY behind the existing lazy
  boundary (its own chunk, 514KB gzip — never in the startup bundle). Honest
  webgl-3d render mode, not a Cesium claim.
- Bundled public-domain NASA Blue-Marble-night + topology + night-sky textures
  locally (public/textures) — no external/runtime fetch.
- Renders ONLY proof-backed entities that carry source-backed coordinates; no
  coordinates => no marker. Marker color by provenance trust so media/structural
  never read as verified. Empty data => empty luminous Earth (honest), not filler.

Gates green: tsc, eslint, 796 tests, build, git diff --check, checkRuntimeConfig,
runtimeVerification 13/13.

Still WIP: cockpit panels still overlap the globe; next pass gives the globe full
center stage + a proper bottom evidence/exposure band.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The outer Relevance Profiles rail was a second left column crowding the Earth and
pushing it off-center. Fold it so the cockpit owns the full width: the textured
globe is now full-bleed and dominant with the layer console floating top-left and
metrics/dossier top-right over the Earth — matching the mockup's hero composition.
Drag-to-rotate confirmed working (orbit controls).

Follow-up: relocate the profile selector (folded here) into a compact control, and
build the bottom evidence-desk + curated-exposure-chains band + source-trail strip.

Build + git diff --check clean (CSS-only since the last green commit).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…lates

Answers "how do we see real Atlasz data + the color system without electron."
Production data still comes only from the desktop bridge; this is a dev-gated
preview path (import.meta.env.DEV, not test, no desktop bridge present).

- src/devWorldDataBridge.ts: fetches the real, CORS-open USGS Earthquake Hazards
  feed (4.5+, past week) in-browser and maps each quake to a real WorldIntelEvent
  (real lat/lon, source URL, retrieval time, payload hash, magnitude->severity,
  official-api provenance, earthquakeEvent proof record). Feeds the EXISTING
  pipeline (worldEvents -> worldwatchLayerRegistry -> globe) — no second truth
  engine. Falls back to the empty seed on any failure (honest, never fabricated).
- src/worldIntelStore.ts: when no desktop bridge in dev, hydrate + refresh from it.

Result in web preview: globe shows real quake markers at real coordinates, the
command bar computes Source Ops 100% / 1-1 online / Nominal, the dossier and
timeline populate from real events, and provenance/severity color-coding renders.

Gates green: tsc, eslint, 788 tests, build (startup chunk unchanged — bridge is
dev-gated out of production), git diff --check, runtimeVerification 13/13.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Hardcore mockup pass on the cockpit left column + cleanup.

- Replace the raw layer-toggle console with the mockup's left stack: "What Changed
  Today" (recent real events) and "What To Watch" (elevated/critical), each row a
  real event with a severity dot + chip, region, and relative time; click focuses
  the globe + dossier. Compact replay-window row + 6 layer-group toggles retained
  beneath.
- Severity colorways wired to tokens: critical=red, elevated/High=amber,
  watch=yellow, stable=teal — shared by dots and chips.
- Cleanup the user flagged: hide the legacy flat 2D marker overlay (the WebGL
  globe owns markers now, so labels stop floating over the Earth and the panels),
  remove the duplicate source-radar that collided with the dossier, contain the
  dossier text, and guard the timeline track + view root against overflow.
- Drop the now-unused per-layer toggle prop chain.

Gates green: tsc, eslint, 788 tests, build, git diff --check,
runtimeVerification 13/13.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Addresses direct feedback (nodes too small, timeline in the way, can't scroll,
sidebars should blend).

- Globe markers: larger radius (0.5/0.78), higher altitude, pointer cursor on
  hover — easy to click.
- One-page layout: hide the legacy stacked sections that pushed content below the
  fold and broke scroll (right intel rail, quant strip, trade/evidence desk). The
  cockpit (What Changed / globe / dossier) + a compact bottom timeline band are the
  whole command center now; the globe keeps full-bleed center stage.
- Sidebar: modules blend into the rail as one continuous page (no boxed panels);
  subtle dividers, muted type, gradient rail background.

Gates green: tsc, eslint, build, tests, git diff --check, runtimeVerification 13/13.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Orbit controls explicitly configured: free rotate with damping, bounded zoom
  (minDistance/maxDistance), pan disabled. Drag-to-rotate confirmed working.
- Zoom out (altitude 2.85) so the whole facing hemisphere is visible, not a
  cropped close-up.
- Cockpit height adapts to the viewport (lower 360px floor) so the globe isn't
  cut off on short screens.

tsc + eslint clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…context)

"Hook up infrastructure + companies that own infrastructure" for the web preview.

- New `infrastructure` Worldwatch layer (kind: facility, point geometry) + an
  `InfrastructureSite` event type carrying name, operator (owning company),
  energy source, capacity, coords. Routed via the existing pipeline (no second
  engine): registry union, LAYER_METADATA, definition, classifyEventLayers,
  entityLabel, and the Infrastructure layer group.
- Dev bridge now fetches OSM Overpass power plants (real lat/lon + operator tags)
  in parallel with USGS quakes; each source fails independently. OSM is labeled
  public-unauthenticated/community (ODbL) — never official, dimmer colorway, with
  honest non-claims (community-mapped location/operator only; not an official
  registry or ownership-percentage claim).
- Verified live: "Swan Falls" (op. Idaho Power Co) renders in Worldwatch, 2/2
  sources online.

Gates green: tsc, eslint, 788 tests, build, git diff --check,
runtimeVerification 13/13.

Follow-up: Overpass returned a small set for the global query — widen/region the
query for more plants; consider keeping reference infra out of "What Changed Today".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Fixes "can't navigate the globe / too crammed." The cockpit floated What-Changed
and the dossier ON TOP of the globe, leaving only a sliver to drag, and the
timeline was an absolute overlay covering the Earth.

- Cockpit body is now a real 3-column grid: What Changed (left) | globe (center,
  its own cell) | dossier (right). Nothing floats over the globe, so it rotates
  freely and reads as the hero — matching the reference composition.
- Metric strip (Proof/Sources/Attention) moved from an absolute full-width
  overlay (which collided with the dossier) to a clean in-flow top row.
- Intelligence timeline is now its own bottom band instead of an absolute overlay
  on the globe.

Gates green: tsc, eslint, 788 tests, build, git diff --check,
runtimeVerification 13/13.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Shared SpatialRouteShell cleanup so Sources/Market/Infrastructure/Coverage/etc.
match the Worldwatch direction: green uppercase eyebrow, compact title, drop the
long descriptive sentence, tighter metric chips. (Per-route CONTENT — the legacy
globe + generic overlays — still needs a dedicated rebuild.)

tsc + eslint clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Per "no pointless data — it should be relevant to market/infrastructure/companies":
each OSM power plant now carries its market sector exposure derived from fuel type
(nuclear->uranium/utilities, gas->natural gas/LNG, hydro->renewables/utilities,
coal->thermal coal, solar/wind->renewables, etc.) alongside the operating company.
The dossier's related-entities/sectors now surface the infrastructure -> company ->
sector chain. Exact operator/sector names only — no fuzzy ticker merge, no price or
trading claim (honest exposure context, not a signal).

Gates green: tsc, eslint, 788 tests, build, git diff --check,
runtimeVerification 13/13.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…he dossier

Higher-detail UI for the trading-relevant connection. When an infrastructure event
is selected, the dossier shows a visual exposure chain: Facility (+capacity) ->
Operator/owner (company) -> Market sectors, color-coded by step, with an honest
footer ("source-backed connection only; no ticker match, price, or trading
signal"). Connected-markets now also includes fuel-derived sectors.

Verified live: Mount Elbert Powerplant 200 MW -> U S Bureau of Reclamation ->
hydro / utilities / renewables. No page horizontal overflow (dossier fits).

Gates green: tsc, eslint, 788 tests, build, git diff --check,
runtimeVerification 13/13.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Real, relevant price data in the browser preview (no key, no CORS, no fuzzy
ticker merge) using TradingView's OFFICIAL embed widgets.

- TradingViewWidget: reusable wrapper for TradingView embed scripts (handles
  re-mount/StrictMode). Clearly a THIRD-PARTY market reference, never an Atlasz
  source-backed proof; prices/charts only, no buy/sell signal.
- Market route now leads with a ticker tape + energy-sector symbol overview for
  infrastructure-relevant symbols (XLE energy, XLU utilities, USOIL, URA uranium,
  TAN solar, ICLN clean energy, SPX, gold) with a plain-language disclaimer.
- Hid the legacy desktop-only price tape (was showing PRICE_UNAVAILABLE tiles).
- Verified live: Utilities 45.67, Crude Oil 70.79, Uranium 43.67, Solar 59.60.

Note: the packaged desktop app's CSP must allow *.tradingview.com (script-src,
frame-src, connect-src) for these widgets to load there.

Gates green: tsc, eslint, 788 tests, build, git diff --check,
runtimeVerification 13/13.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replaces the legacy "World radar unavailable" wireframe visual with real,
relevant market data: an energy/utilities/oil/uranium/solar ticker tape + sector
symbol overview, tying the mapped facilities to their live market sectors. Adds
the same energy-market reference to the exposure evidence slot. Honest framing —
third-party TradingView reference, "facility map + operators live on the
Worldwatch globe," no proof/outage/trading claim.

Both Market and Infrastructure routes now run on real prices in the browser
preview (no key, no fuzzy ticker merge).

Verified live: Energy 53.69, Utilities 45.48, Crude Oil 70.89, Uranium 43.16,
Solar 58.61.

Gates green: tsc, eslint, 788 tests, build, git diff --check,
runtimeVerification 13/13.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was previously no Content-Security-Policy, so external scripts loaded
unrestricted. Add a baseline CSP via session.onHeadersReceived: allow the app
bundle ('self') plus the official TradingView widget domains (script/style/img/
font/connect/frame), block everything else. Connectors run in the main process,
so the renderer needs no data-source domains. Only affects the packaged desktop
app; must pass Mac GUI smoke before release (widen a directive if an asset fails).

Gates green: tsc, eslint, build, checkRuntimeConfig, runtimeVerification 13/13.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 60a97231dd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/devWorldDataBridge.ts

return {
id: `osm:${element.id}`,
timestamp: now,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid stamping static OSM sites as new events

When the dev Overpass feed returns static power-plant reference rows, this assigns each row timestamp: now, so every refresh makes unchanged community-mapped facilities pass the 24h/"What changed today" filters and appear as fresh events. Because the query does not request OSM metadata (out meta) or any actual observation time, this fabricates recency/urgency for structural reference data; use source metadata when available or keep these records out of live change windows.

Useful? React with 👍 / 👎.

Comment thread src/devWorldDataBridge.ts
...seed,
enabled: true,
status: 'ready',
sourceTrust: quakes.length > 0 ? 'official-api' : 'public-unauthenticated',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Do not label mixed-source dev snapshots official

When both USGS and OSM return data, the whole snapshot is marked official-api merely because at least one quake exists, while the OSM infrastructure records in the same snapshot are explicitly public-unauthenticated. Components such as the event-stream header and settings/status badges display snapshot.sourceTrust as the global evidence label, so mixed community data is presented under an official trust tier; compute a mixed/public trust value instead of promoting the entire snapshot to official.

Useful? React with 👍 / 👎.

grysz and others added 5 commits June 30, 2026 10:20
Two "improve the vision" items:

- News (#4): TradingView news timeline widget in the Market route dossier —
  closes the news gap in-browser, no key. Labeled third-party media reference,
  "media observation, never proof." Verified iframe loads.
- Spatial correlation (#1): source-backed co-location in the Worldwatch dossier —
  for a selected hazard it lists infrastructure within 400 km (and vice-versa)
  via great-circle distance, click to focus. Honest non-claim: "co-location only,
  not an impact/outage/damage/causation claim; each item keeps its own source
  trail." Renders only on real overlap (nothing when none — no invented links).

Gates green: tsc, eslint, 788 tests, build, git diff --check,
runtimeVerification 13/13.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
#2 — turns the feed into intelligence. A synthesis card atop the Worldwatch left
stack rolls up the current window across sources: total events + distinct sources,
facility vs hazard counts, count of facilities within 400 km of an active hazard
(haversine join), and top market sectors by facility. Honest footer: "co-location
is not impact, and counts are source-backed." Renders the hazard-proximity link
only when real overlap exists.

Verified live: 18 events / 2 sources, 11 facilities, 7 hazards, sectors
hydro/utilities/renewables.

Gates green: tsc, eslint, 788 tests, build, git diff --check,
runtimeVerification 13/13.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The relevance/watchlist profiles were hidden when Worldwatch went full-bleed.
Restore them as a compact chip row in the command band (All evidence / AI
Infrastructure / Energy Shock / Critical Minerals), active highlighted. Profiles
affect ranking only — never truth or evidence (per the contract).

tsc, eslint, 788 tests, build, runtimeVerification 13/13 all green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Feed the globe arcs from genuine hazard→nearest-facility co-location pairs within
400 km (great-circle), capped at 24 for readability. "Everything connected" with
real data — proximity links only, never a causal/impact claim. Renders only where
overlap actually exists.

Gates green: tsc, eslint, 788 tests, build, git diff --check,
runtimeVerification 13/13.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bottom strip of live connector chips with status dots (online/degraded/failed)
and count, from the real source snapshot. Verified: "USGS Earthquake Hazards
Program · ONLINE", "OpenStreetMap power infrastructure (community) · ONLINE".
Honest empty state when no live sources.

Gates green: tsc, eslint, 788 tests, build, git diff --check,
runtimeVerification 13/13.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant