Skip to content

fix(dashboard): replace news pulse with recent activity + trend hover tooltip#55

Merged
nullhack merged 5 commits into
mainfrom
fix/dashboard-tabs-and-trend-tooltip
Jul 23, 2026
Merged

fix(dashboard): replace news pulse with recent activity + trend hover tooltip#55
nullhack merged 5 commits into
mainfrom
fix/dashboard-tabs-and-trend-tooltip

Conversation

@nullhack

Copy link
Copy Markdown
Owner

Summary

Three dashboard changes in response to feedback that the News pulse tab was not useful and the trend chart labels took too much space.

1. Default tab reverted to Active watchlist

app.js was setting STATE.tab = "news" on init, overriding the HTML default. Fixed to "watchlist".

2. News pulse tab → Recent activity (48h)

Removed: News pulse tab — showed a flat list of ALL cumulative news (783 items) grouped by incident type, no temporal structure. Redundant with the per-incident drawer.

Added: Recent activity (48h) tab — chronological feed of what changed in the last 48 hours:

  • NEW badge: incidents first reported in the window
  • LOG badge: new log entries written in the window
  • NEWS badge: news bursts grouped per incident per day

Each row links to the incident drawer. Summary line shows event counts and the cutoff date.

3. Trend chart: legend labels → hover tooltip

Removed: The inline legend that enumerated all disease pathogen names (up to 17) with totals/peaks, consuming significant chart vertical space.

Added: Hover tooltip overlay on both trend panels (geophysical + disease). Moving the cursor shows:

  • The date at the hovered x position
  • All active series (color swatch + name + value) at that date
  • A vertical tracker line on the chart

Only series with non-zero totals in the selected window are plotted and listed in the tooltip, keeping it concise.

Test plan

  • node --check dashboard/app.js — syntax OK
  • DOM id references in app.js all resolve to ids in index.html
  • Dashboard generation pipeline runs clean (generate_dashboard_data.py)
  • Local preview server serves all assets (index.html, app.js, data/.json, data/agg/.json, vendor/world-110m.json)
  • Verified 14 recent-activity events exist in the 48h window for 2026-07-23 digest
  • All required incident fields present in JSON (first_reported_date, logs, news, etc.)

No Python source changes — frontend only (3 files: app.js, index.html, styles.css).

… tooltip

Three changes to the dashboard:

1. Default tab reverted to 'Active watchlist' (was 'news pulse' via
   STATE.tab override at app.js init). HTML already had watchlist as
   tab--active; the JS was silently overriding it.

2. News pulse tab removed. It showed a flat list of ALL cumulative news
   (783 items) grouped by incident type with no temporal structure —
   redundant with the per-incident drawer and not useful for monitoring.

   Replaced with 'Recent activity' (48h) tab: a chronological feed of
   what changed in the last 48 hours — new incidents (NEW badge), new
   logs written (LOG badge), and news bursts grouped per incident per
   day (NEWS badge). Each row links to the incident drawer. Summary
   line shows counts by kind and the cutoff date.

3. Trend chart legends removed. The disease panel enumerated up to 17
   pathogen names with totals and peaks, consuming significant chart
   vertical space. Replaced with a hover tooltip overlay: moving the
   cursor over either trend panel (geophysical or disease) shows a
   positioned HTML tooltip with the date and all active series values
   at that x position, plus a vertical tracker line. Only series with
   non-zero totals in the window are plotted and listed in the tooltip.

Files changed:
- dashboard/index.html: tab buttons, panels, trend panel structure
- dashboard/app.js: renderTrendPanel rewrite (tooltip), renderRecentActivity
  (new), renderNewsPulse removed, STATE.tab default, STATE.newsOpen removed,
  stale 'news' tab references in KPI click handlers updated to 'watchlist'
- dashboard/styles.css: trend-tooltip + recent-feed styles, news-pulse
  styles removed
nullhack added 4 commits July 23, 2026 03:17
Tooltip rows were in series-volume order (largest cumulative total first).
Now sorted by the actual count at the hovered date, descending — so the
tallest line on the chart at that x position is listed first.
Replace the cramped news-summary flex layout with a dedicated
recent-summary style: total count + cutoff date + 3 colored stat
chips (NEW/LOG/NEWS with counts). Drops the verbose parenthetical
text and the redundant explanation line.
- Remove the KPI sidebar (aside.card--kpi-side) — redundant with the
  top severity/type/region filter chips.
- Drop renderKPIs(), applyKpiAction(), STATE.kpiSel and all #kpis event
  wiring from app.js.
- Remove .card--kpi-side / .kpi-axis / .kpis--pair / .card--kpi-side .kpi
  CSS (kept base .kpi* rules for any reuse).
- Reorder HTML so map (span 6, left) precedes trend (span 6, right).
- Stack the two trend panels vertically (.trend-grid 1fr) inside the
  now-narrower span-6 trend card.
- Update responsive breakpoints to drop the kpi-side rules.
@nullhack
nullhack merged commit 29494d1 into main Jul 23, 2026
@nullhack
nullhack deleted the fix/dashboard-tabs-and-trend-tooltip branch July 23, 2026 07:46
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