Skip to content

refactor: Simplify RPC handling in SnapController #3397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

FrederikBolding
Copy link
Member

@FrederikBolding FrederikBolding commented May 15, 2025

Stop storing an RPC handler in the runtime for Snaps, instead just move the handler code directly to handleRequest. Also removes the RequestQueue previously used during the Snap starting up, instead we let as many requests as needed wait for startPromise. This simplifies RPC request routing significantly.

Recommend reviewing this with whitespace changes not displayed 😄

@FrederikBolding FrederikBolding force-pushed the fb/simplify-controller-rpc branch from f5a49ff to 9f713d1 Compare May 16, 2025 08:33
Copy link

codecov bot commented May 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.13%. Comparing base (4acb5c3) to head (dff1689).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3397      +/-   ##
==========================================
+ Coverage   98.12%   98.13%   +0.01%     
==========================================
  Files         399      398       -1     
  Lines       10961    10924      -37     
  Branches     1725     1716       -9     
==========================================
- Hits        10755    10720      -35     
+ Misses        206      204       -2     

☔ 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 force-pushed the fb/simplify-controller-rpc branch from 9f713d1 to dff1689 Compare May 21, 2025 10:02
@FrederikBolding FrederikBolding marked this pull request as ready for review May 21, 2025 10:02
@FrederikBolding FrederikBolding requested a review from a team as a code owner May 21, 2025 10:02
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