← Back to Pull requests

fix(utsav): keep the festivals home upcoming list current #72

Closed
unknown closed this pull request without merging on Nov 27, 2026 18:12 UTC
View on GitHub
unknown unknown commented on Nov 25, 2026 15:43 UTC
Author

Why

getUpcomingFestivals already rolls a festival to nextDateISO once its 2026 date has passed (see #71). The encyclopedia helper upcomingUtsavs did not, so after 24 November 2026 it returned an empty list. The festivals home page also called it with a frozen 2026-09-08 date, so in late November "Coming next" still led with Ganesh Chaturthi (14 September) and other days that had already passed.

What changed

  • upcomingUtsavs now uses nextDateISO (and nextSummary when present) after dateISO has passed, same idea as the panchanga reminders.

  • Festival home calls upcomingUtsavs(new Date(), 4) and the heading no longer hard-codes 2026.

  • Tests: from 25 November 2026 the list has four future dates, starts at Makar Sankranti 2027-01-15, and rolled summaries do not keep a 2026 year.

  • <!-- devin-review-badge-begin -->

    ---

    <a href="https://app.devin.ai/review/mangeshraut712/hindai/pull/72" target="_blank"><picture><source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4" alt="Devin Review"></picture></a>
    <!-- devin-review-badge-end -->

    <!-- CURSOR_SUMMARY -->
    ---

    [!NOTE]

    Low Risk

    Festival calendar display logic only; no auth or data persistence. Small hydration edge cases are covered by tests.

    > Overview

    Fixes the festivals home "Coming next" list staying wrong after late 2026 by aligning upcomingUtsavs with the panchanga behavior: once a festival's dateISO has passed, entries roll to nextDateISO (and nextSummary when set) before filtering and sorting.

    > The home page no longer hard-codes a September 2026 anchor or embeds the list inline. It builds with upcomingUtsavs(new Date(), 4) for static HTML, delegates rendering to a new client UpcomingFestivals component, and after mount swaps to a visitor-clock list via visibleUpcoming so hydration stays matched while the UI updates between deploys. The section title drops the fixed "2026" wording; formatCivil moves to shared upcoming.ts.

    > Tests cover rollover past the 2026 catalog, summary year cleanup, stale build-time lists, and hydration-safe visibleUpcoming behavior.

    > <sup>Reviewed by Cursor Bugbot for commit 99909301a63e628554beef4aa7815068c7303df3. Bugbot is set up for automated code reviews on this repo. Configure here.</sup>

    <!-- /CURSOR_SUMMARY -->

    Diff: 314 lines (+235 / -79) across 3 files Reviewer: mangeshraut712 Review duration: 3028m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 314 lines diff across 3 files
    0.45
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.344
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #72"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 45.3% (MEDIUM) · Higher = larger blast radius
    45.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.9% · Safe to merge
    17.9%