Skip to content

Add smart zoom visibility for dense map layers#2

Merged
koala73 merged 1 commit into
mainfrom
codex/add-smart-zoom-dependent-layer-visibility
Jan 10, 2026
Merged

Add smart zoom visibility for dense map layers#2
koala73 merged 1 commit into
mainfrom
codex/add-smart-zoom-dependent-layer-visibility

Conversation

@koala73

@koala73 koala73 commented Jan 9, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Dense global layers (military bases, nuclear sites, conflict zones, economic centers, earthquakes) create visual clutter at low zoom and need progressive disclosure.
  • The intent is to auto-hide or fade layers and labels by zoom level while preserving user manual toggles as overrides.
  • Provide subtle UI indicators when a layer is being auto-hidden so users understand why items disappear.

Description

  • Add LAYER_ZOOM_THRESHOLDS and layerZoomOverrides to MapComponent and evaluate layer visibility on zoom via a new updateZoomLayerVisibility() method called from applyTransform().
  • Respect manual toggles by setting an override when a user enables a layer below its minZoom, and toggle an auto-hidden class on the layer toggle button for visual feedback (logic in toggleLayer and enableLayer).
  • Emit data-layer-hidden-<layer> and data-labels-hidden-<layer> attributes on the .map-wrapper to control marker and label visibility, and add CSS transitions and .layer-toggle.auto-hidden styling in src/styles/main.css to fade/hide elements smoothly.
  • Keep existing label overlap logic (updateLabelVisibility) and integrate zoom-driven label/show-label thresholds (showLabels) for progressive disclosure.

Testing

  • Started the development server with npm run dev and Vite reported ready (server running); proxy network errors were logged but the server remained responsive. (succeeded)
  • Ran a headless Playwright script that navigated to the local dev site and saved a screenshot to verify visual behavior (navigation and screenshot completed successfully). (succeeded)

Codex Task

@vercel

vercel Bot commented Jan 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
worldmonitor Ready Ready Preview, Comment Jan 9, 2026 7:59pm

@koala73
koala73 merged commit e8328ad into main Jan 10, 2026
2 checks passed
@koala73
koala73 deleted the codex/add-smart-zoom-dependent-layer-visibility branch January 12, 2026 18:47
koala73 added a commit that referenced this pull request Jan 18, 2026
… freshness

Assessment & Documentation:
- Add docs/GEOPOLITICAL_ASSESSMENT.md with full platform analysis
- Strategic improvement roadmap with prioritized recommendations

Quick Win #1 - Data Freshness (intelligence gaps):
- Add getIntelligenceGaps() and getIntelligenceGapSummary() to data-freshness.ts
- Add human-readable messages explaining what analysts CAN'T see
- Add hasCriticalGaps() for alert integration

Quick Win #2 - Escalation Scores:
- Add escalationScore (1-5), escalationTrend, escalationIndicators to Hotspot type
- Update 11 major hotspots with scores (Sahel, Haiti, Horn of Africa, Moscow,
  Beijing, Kyiv, Taipei, Tehran, Tel Aviv, Pyongyang, Sana'a)

Quick Win #3 - Signal Context ("Why It Matters"):
- Add SIGNAL_CONTEXT with whyItMatters, actionableInsight, confidenceNote
- Add getSignalContext() helper for all 10 signal types
- Explains analytical significance of each signal type

Quick Win #4 - Historical Context:
- Add HistoricalContext interface with lastMajorEvent, precedentCount,
  cyclicalRisk fields
- Add whyItMatters field to Hotspot type
- Update major hotspots with historical precedents and geopolitical significance

Quick Win #5 - Propaganda Risk Flags:
- Add PropagandaRisk type and SourceRiskProfile interface
- Add SOURCE_PROPAGANDA_RISK mapping for state media (Xinhua, TASS, RT, CGTN)
- Add getSourcePropagandaRisk() and isStateAffiliatedSource() helpers
- Flag medium-risk state-affiliated sources (Al Jazeera, France 24, DW, etc.)
koala73 added a commit that referenced this pull request Feb 15, 2026
PopulationExposure: replace truncated 4-column table with two-line
card layout (full event name + population/radius meta row).
UCDP: move deaths to column #2 (Country → Deaths → Date → Actors).
@SebastienMelki SebastienMelki added area: map Map, globe, DeckGL visualization performance Performance optimization labels Feb 17, 2026
facusturla pushed a commit to facusturla/worldmonitor that referenced this pull request Feb 27, 2026
…ent-layer-visibility

Add smart zoom visibility for dense map layers
facusturla pushed a commit to facusturla/worldmonitor that referenced this pull request Feb 27, 2026
… freshness

Assessment & Documentation:
- Add docs/GEOPOLITICAL_ASSESSMENT.md with full platform analysis
- Strategic improvement roadmap with prioritized recommendations

Quick Win koala73#1 - Data Freshness (intelligence gaps):
- Add getIntelligenceGaps() and getIntelligenceGapSummary() to data-freshness.ts
- Add human-readable messages explaining what analysts CAN'T see
- Add hasCriticalGaps() for alert integration

Quick Win koala73#2 - Escalation Scores:
- Add escalationScore (1-5), escalationTrend, escalationIndicators to Hotspot type
- Update 11 major hotspots with scores (Sahel, Haiti, Horn of Africa, Moscow,
  Beijing, Kyiv, Taipei, Tehran, Tel Aviv, Pyongyang, Sana'a)

Quick Win koala73#3 - Signal Context ("Why It Matters"):
- Add SIGNAL_CONTEXT with whyItMatters, actionableInsight, confidenceNote
- Add getSignalContext() helper for all 10 signal types
- Explains analytical significance of each signal type

Quick Win koala73#4 - Historical Context:
- Add HistoricalContext interface with lastMajorEvent, precedentCount,
  cyclicalRisk fields
- Add whyItMatters field to Hotspot type
- Update major hotspots with historical precedents and geopolitical significance

Quick Win koala73#5 - Propaganda Risk Flags:
- Add PropagandaRisk type and SourceRiskProfile interface
- Add SOURCE_PROPAGANDA_RISK mapping for state media (Xinhua, TASS, RT, CGTN)
- Add getSourcePropagandaRisk() and isStateAffiliatedSource() helpers
- Flag medium-risk state-affiliated sources (Al Jazeera, France 24, DW, etc.)
facusturla pushed a commit to facusturla/worldmonitor that referenced this pull request Feb 27, 2026
PopulationExposure: replace truncated 4-column table with two-line
card layout (full event name + population/radius meta row).
UCDP: move deaths to column koala73#2 (Country → Deaths → Date → Actors).
henryurlo pushed a commit to henryurlo/worldmonitor that referenced this pull request Mar 8, 2026
…telligence

Add Peru (PE) as a Tier 1 curated country with dedicated feeds covering
news, economy, mining, trade, and politics. Peru is the world's koala73#2 copper
and koala73#2 silver producer, making it critical for commodity and economic
monitoring.

Changes:
- Add PE to CURATED_COUNTRIES with scoring keywords (BCRP, SUNAT, MINEM,
  major mines) and search aliases
- Add PE to TIER1_COUNTRIES and HOTSPOT_COUNTRY_MAP
- Add 12 Peru-specific feeds to latam panel: Gestión, El Comercio, RPP,
  La República, Andina (state news), AP Peru, Reuters Peru, and
  dedicated economy/mining/trade/politics feeds
- Add Peru mining feeds to commodity variant (mining-news, mining-companies)
- Register all Peru sources with proper tiers and types
- Add Peru sources to default enabled latam sources

https://claude.ai/code/session_01T5xiRMmpq3YmynZu5mjhtu
koala73 added a commit that referenced this pull request Apr 4, 2026
* feat(resilience): add shared statistical utilities

Port the resilience statistics helpers needed for country resilience scoring into server/_shared with a focused test suite.

Refs #2478

Validation:
- npx tsx --test tests/resilience-stats.test.mts
- npm run typecheck:api (fails on upstream main because server/__tests__/entitlement-check.test.ts imports vitest without the dependency in tsconfig.api scope)

* fix(resilience): harden stats utilities from review feedback

- cronbachAlpha: reject jagged rows (unequal row lengths → 0)
- CUSUM: simplify double-normalized slack to constant 0.5
- nrcForecast: use modelError-scaled probability instead of raw delta
- Add boundary test for nrcForecast at exactly 3 values
- Add test for cronbachAlpha jagged row guard

* fix(resilience): fix CUSUM changepoint location and nrcForecast horizon guard

detectChangepoints:
- Track onset index (where accumulation began) instead of detection index
- Reduce CUSUM slack from 0.5 to 0.25 to detect moderate step shifts
- Require onset >= 2 to filter false positives from initial-regime artifacts
- Tighten tests: assert exact count and onset range, add moderate shift case

nrcForecast:
- Return neutral empty result for non-positive horizonDays
- Add test covering horizon=0 and negative values

* fix(resilience): address Greptile review items #2-4

- Rename cronbachAlpha param `items` → `observations` (matches row layout)
- CI fallback uses ±max(5, 10%) so value=0 gets [0, 5] not [0, 0]
- probabilityDown rounds from already-rounded probabilityUp (sum=1 invariant)

* test(resilience): cover zero-value CI floor in short-history fallback

---------

Co-authored-by: Elie Habib <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: map Map, globe, DeckGL visualization codex performance Performance optimization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants