Skip to content

fix: InsightsPanel exits loading state on finance/tech variants#1068

Merged
koala73 merged 1 commit intomainfrom
fix/insights-panel-spinning
Mar 5, 2026
Merged

fix: InsightsPanel exits loading state on finance/tech variants#1068
koala73 merged 1 commit intomainfrom
fix/insights-panel-spinning

Conversation

@koala73
Copy link
Owner

@koala73 koala73 commented Mar 5, 2026

Summary

  • InsightsPanel on finance.worldmonitor.app and tech.worldmonitor.app stayed spinning indefinitely
  • Root cause: updateInsights() was only called when latestClusters.length > 0 — these variants often produce zero clusters, so the panel never transitioned out of showLoading()
  • Removed the length guard so updateInsights always fires (it already handles empty arrays gracefully)
  • Added updateInsights([]) in the clustering catch block so errors also clear the spinner

Test plan

  • Verify finance.worldmonitor.app InsightsPanel shows content or "waiting for data" instead of spinning
  • Verify tech.worldmonitor.app InsightsPanel behaves the same
  • Verify www.worldmonitor.app InsightsPanel still works normally
  • Verify no TypeScript errors (npx tsc --noEmit passes)

The InsightsPanel on finance/tech variants stayed spinning indefinitely
because updateInsights was only called when latestClusters.length > 0.
When clustering produced zero results (common for non-geopolitical
variants), the panel never transitioned out of showLoading().

- Remove the length > 0 guard so updateInsights always fires
- Call updateInsights([]) in catch block so clustering errors also
  clear the loading spinner
@vercel
Copy link

vercel bot commented Mar 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
worldmonitor Ready Ready Preview, Comment Mar 5, 2026 6:23pm

Request Review

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@koala73 koala73 merged commit 863b3d5 into main Mar 5, 2026
3 checks passed
aldoyh pushed a commit to aldoyh/worldmonitor that referenced this pull request Mar 6, 2026
…#1068)

The InsightsPanel on finance/tech variants stayed spinning indefinitely
because updateInsights was only called when latestClusters.length > 0.
When clustering produced zero results (common for non-geopolitical
variants), the panel never transitioned out of showLoading().

- Remove the length > 0 guard so updateInsights always fires
- Call updateInsights([]) in catch block so clustering errors also
  clear the loading spinner
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