Skip to content

Conversation

@m4dm4rtig4n
Copy link
Contributor

Summary

Fixes the Simulator page not displaying cached data on first load due to a race condition. The initialization now waits for energy offers/providers to load before attempting auto-launch, preventing the empty state from showing when cached data is actually available.

Changes

  • Added isLoading flags to energy providers and offers queries
  • Modified initialization effect to wait for data queries before marking initialization complete
  • Added explicit check to prevent auto-launch while queries are still loading

Testing

Users with cached consumption data should now see the simulator automatically populate with results on first page load without needing to refresh.

The simulator was not displaying cached data on first load due to a race condition where the initialization timeout completed before energy offers/providers queries finished loading. Now the initialization properly waits for these queries to complete before attempting auto-launch.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Copilot AI review requested due to automatic review settings December 5, 2025 08:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@m4dm4rtig4n m4dm4rtig4n merged commit 0526630 into main Dec 5, 2025
15 of 19 checks passed
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