Skip to content

Conversation

@FrederikBolding
Copy link
Member

@FrederikBolding FrederikBolding commented Dec 16, 2025

Adds a lazily populated isReady state property that is populated as a side-effect of ensureCanUsePlatform (renamed from assertCanUsePlatform).


Note

Introduces isReady to SnapController state, lazily populated via new #ensureCanUsePlatform, and updates flows/tests accordingly.

  • State/Metadata:
    • Add state.isReady (default false); include in includeInStateLogs and includeInDebugSnapshot; not persisted/used in UI.
  • Platform readiness:
    • Replace #assertCanUsePlatform with #ensureCanUsePlatform that waits onboarding, sets isReady based on disableSnaps, and asserts availability.
    • Call #ensureCanUsePlatform in init(), updateRegistry(), startSnap(), installSnaps(), #updateSnap(), and handleRequest().
    • Reset isReady to false in clearState().
  • Tests:
    • Add test verifying SnapController:init sets isReady.
    • Update expectations to include isReady in debug/state logs and post-clearState state, and minor timing adjustments.

Written by Cursor Bugbot for commit 2df985d. This will update automatically on new commits. Configure here.

@codecov
Copy link

codecov bot commented Dec 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.30%. Comparing base (1e95bcd) to head (2df985d).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3778   +/-   ##
=======================================
  Coverage   98.29%   98.30%           
=======================================
  Files         420      420           
  Lines       12232    12238    +6     
  Branches     1897     1898    +1     
=======================================
+ Hits        12024    12030    +6     
  Misses        208      208           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@FrederikBolding FrederikBolding changed the title wip: Add isReady state property feat: Add isReady state property Dec 16, 2025
@FrederikBolding FrederikBolding marked this pull request as ready for review December 17, 2025 08:46
@FrederikBolding FrederikBolding requested a review from a team as a code owner December 17, 2025 08:46
Copy link
Contributor

@cryptodev-2s cryptodev-2s left a comment

Choose a reason for hiding this comment

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

LGTM!

@FrederikBolding FrederikBolding added this pull request to the merge queue Dec 17, 2025
Merged via the queue into main with commit dd973e4 Dec 17, 2025
124 checks passed
@FrederikBolding FrederikBolding deleted the fb/is-ready-state branch December 17, 2025 12:48
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.

4 participants