feat(gdelt-intel): tone/vol sparkline summary bar in GdeltIntelPanel (#2152)

* feat(gdelt-intel): add tone/vol sparkline summary bar to GdeltIntelPanel

Surfaces GDELT tone and volume timeline data (seeded by PR #2087) in the
existing intel panel. A compact summary bar appears between the topic tabs
and article list, showing:
- 14-day tone sparkline (red=negative, green=positive) + current value badge
- 14-day volume sparkline + last-point count
- Gracefully hidden when timeline data is unavailable

Changes:
- gdelt-intel.ts: add TopicTimeline type, fetchTopicTimeline() with 5-min
  client cache; reuses existing IntelligenceServiceClient
- GdeltIntelPanel.ts: fetch timeline in parallel with articles via
  Promise.all; renderTopicSummary() builds the bar using miniSparkline();
  cached timeline served immediately on tab switch
- main.css: .gdelt-topic-summary / .gdelt-trend-group / .gdelt-trend-value
  styles

* fix(gdelt-intel): add tone/vol sparkline info to panel ? tooltip (all 21 locales)

* fix(gdelt-intel): rename GDELT Intelligence → News Intelligence in panel tooltip (all 21 locales)
This commit is contained in:
Elie Habib
2026-03-23 20:59:28 +04:00
committed by GitHub
parent e4e129684b
commit 93ce10524c
24 changed files with 119 additions and 22 deletions

View File

@@ -12195,6 +12195,39 @@ a.prediction-link:hover {
overflow: hidden;
}
.gdelt-topic-summary {
display: flex;
align-items: center;
justify-content: space-between;
padding: 6px 12px;
background: var(--surface);
border-bottom: 1px solid var(--border);
gap: 12px;
flex-wrap: wrap;
}
.gdelt-trend-group {
display: flex;
align-items: center;
gap: 5px;
}
.gdelt-trend-label {
font-size: 10px;
color: var(--text-dim);
text-transform: uppercase;
letter-spacing: 0.3px;
}
.gdelt-trend-value {
font-size: 11px;
font-weight: 600;
color: var(--text-dim);
}
.gdelt-trend-value.positive { color: var(--success); }
.gdelt-trend-value.negative { color: var(--danger); }
/* Hotspot GDELT Context */
.hotspot-gdelt-context {
margin-top: 12px;