fix(frontend): gate app boot on ConfigStore.hasLoaded to avoid loader deadlock#7785
Conversation
ConfigStore.model is never populated (getAllFlags() returns nothing at the point config-store assigns it), so the provider always started in the loading state even when the store had already finished loading. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The SDK's onChange can fire between the constructor reading the store and componentDidMount subscribing to it. In E2E mode realtime, events and analytics are disabled, so the missed event left the app on the boot loader indefinitely. Re-read the store after subscribing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Docker builds report
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7785 +/- ##
=======================================
Coverage 98.57% 98.57%
=======================================
Files 1460 1460
Lines 56459 56459
=======================================
Hits 55652 55652
Misses 807 807 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
|
Visual Regression19 screenshots compared. See report for details. |
2e8b274 to
a6bb897
Compare
Changes
Fixes the intermittent E2E failure blocking the production deploy gate: the app booting into a permanent loader.
ConfigProviderderivedisLoadingfromConfigStore.model, which is never populated, so it always started loading and relied on the store's one-shotchangeevent to release it. If the Flagsmith SDK'sonChangefired beforecomponentDidMountsubscribed, that event was lost — and with realtime/events disabled in E2E, nothing recovered it, so the app stuck on the loader.ConfigStore.hasLoadedinstead ofmodel.How did you test this code?
Forced the race (delayed the subscription so
onChangealways lands in the gap) and loaded/loginon 15 fresh contexts: main 15/15 stuck on the loader, this fix 0/15.