Skip to content

Bug: Dashboard data doesn't load on initial page visit #3

@sidtheone

Description

@sidtheone

Description

On production (ecoticker.sidsinsights.com), the dashboard shows "No topics found" or "Loading..." on initial page visit. Data only appears after manually clicking the refresh button.

Environment

  • Production (Railway)
  • Custom domain: ecoticker.sidsinsights.com
  • Railway domain: ecoticker-production.up.railway.app

Steps to Reproduce

  1. Open the site in a new tab / hard refresh
  2. Dashboard may show empty state despite API returning 14 topics
  3. Clicking the refresh button loads data successfully

Investigation Notes

  • /api/topics returns 14 topics correctly (verified via curl)
  • CSP headers look correct (connect-src 'self')
  • SSR HTML contains "Loading..." (expected — client components hydrate on mount)
  • Client-side useEffect in TopicGrid.tsx should auto-fetch on mount
  • Possible causes: hydration issue, deployment warmup, JS loading race condition

Affected Components

  • src/components/TopicGrid.tsx — fetches /api/topics in useEffect
  • src/components/TickerBar.tsx — fetches /api/ticker in useEffect
  • src/components/BiggestMovers.tsx — fetches /api/movers in useEffect
  • src/components/InsightHeadline.tsx — fetches topics in useEffect

Status

Intermittent — occurred once during deployment, not yet consistently reproducible. Monitoring.

Labels

bug, production

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions