Skip to content

Today's Highlight: daily-rotating insight on the home tab (v2.7.0)#34

Merged
Varnasr merged 1 commit into
mainfrom
claude/daily-highlight
May 29, 2026
Merged

Today's Highlight: daily-rotating insight on the home tab (v2.7.0)#34
Varnasr merged 1 commit into
mainfrom
claude/daily-highlight

Conversation

@Varnasr
Copy link
Copy Markdown
Owner

@Varnasr Varnasr commented May 29, 2026

Summary

Adds a Today's Highlight card at the top of the "What is This?" tab — a daily-rotating insight that surfaces one of 14 curated findings, with a CTA button that jumps straight to the relevant tab.

How rotation works

get todaysFeature() {
    const day = Math.floor(Date.now() / 86400000);
    return this.dailyFeatures[day % this.dailyFeatures.length];
}
  • Deterministic — same day = same highlight for every visitor globally (no localStorage state, no server, no API call)
  • Stable for the day — the highlight doesn't change if a user reloads
  • Self-cycling — 14 features rotate over a fortnight, then repeat from the top

14 curated highlights

Categories cover: headline numbers, regime comparison ("UPA vs NDA: nine indicators side by side"), latest releases (RSF 2026), the decoupling story, methodology, hidden CSV series (communal incidents, cess share), peer democracy trajectories, graduate unemployment, the Correlation Explorer, and policy next steps.

Each highlight links to the most relevant tab (Deep Analysis, Scenario Lab, Human Stories, Methodology, etc.) — so the home page becomes a daily-changing entry point that pulls new visitors deeper into the site.

Visual

A gradient-bordered card (indigo → blue → purple) with:

  • "TODAY'S HIGHLIGHT" pill + category label + ISO date
  • Bold headline
  • Short narrative
  • Indigo "Jump to" CTA button
  • Footnote: "Rotates daily · 14 total"

Test plan

  • Open "What is This?" tab — gradient card visible at the top
  • Today's date appears in the upper-right
  • CTA button text reads like the highlight (e.g. "View decoupling chart")
  • Clicking the CTA navigates to the named tab
  • Reload — same highlight (date-deterministic)
  • In DevTools console: Date.now = () => 86400000 * 5 then reload → highlight changes to index 5

Generated by Claude Code

A new gradient-bordered card at the top of "What is This?" surfaces
one of 14 curated highlights, deterministically rotated by date so
every visitor sees the same thing on the same day.

Each highlight has:
- Category badge (Headline number, Compare regimes, Try this, etc.)
- Bold title (the surprising stat or finding)
- Short narrative
- "Jump to" CTA that activates the relevant tab

Coverage: top 1% inequality, GDP-jobs decoupling, regime scorecard,
RSF 2026, Scenario Lab demo, methodology, communal incidents, cess
share, V-Dem peer comparison, graduate unemployment, CSV exports,
correlation explorer, formal employment decline, policy "what next".

Rotation key: Math.floor(Date.now() / 86400000) % dailyFeatures.length
-- so 14 highlights cycle through over a fortnight, then repeat.

Version 2.7.0; CITATION.cff matched; CHANGELOG entry.
@Varnasr Varnasr merged commit 08e694a into main May 29, 2026
1 check passed
@Varnasr Varnasr deleted the claude/daily-highlight branch May 29, 2026 08:07
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.

2 participants