Skip to content

refactor!: Update SnapInsightsController to use SnapController:getRunnableSnaps#3915

Merged
Mrtenz merged 3 commits intocontroller-refactorsfrom
mrtenz/snap-insights-controller-refactor
Mar 24, 2026
Merged

refactor!: Update SnapInsightsController to use SnapController:getRunnableSnaps#3915
Mrtenz merged 3 commits intocontroller-refactorsfrom
mrtenz/snap-insights-controller-refactor

Conversation

@Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Mar 24, 2026

This updates SnapInsightsController to use SnapController:getRunnableSnaps instead of SnapController:getAllSnaps.


Note

Medium Risk
Introduces a breaking change to SnapInsightsController's messenger dependencies by switching from SnapController:getAllSnaps to SnapController:getRunnableSnaps, which could affect clients/wiring and which snaps are queried for insights.

Overview
SnapInsightsController now queries Snaps via SnapController:getRunnableSnaps instead of fetching all Snaps and filtering locally, updating its allowed action types accordingly.

Tests and controller test-utils were updated to delegate/mock getRunnableSnaps, and the SignatureController state-change event type was renamed/propagated to SignatureControllerStateChangeEvent. The changelog documents the breaking dependency update, and insights/index.ts now uses explicit type/value exports instead of export *.

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

@Mrtenz Mrtenz marked this pull request as ready for review March 24, 2026 09:45
@Mrtenz Mrtenz requested a review from a team as a code owner March 24, 2026 09:45
@@ -1 +1,6 @@
export * from './SnapInsightsController';
export type {
SnapInsight,
Copy link
Member

Choose a reason for hiding this comment

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

Is this type used anywhere?

Copy link
Member Author

Choose a reason for hiding this comment

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

Part of state, so makes sense to me to export it.

@Mrtenz Mrtenz merged commit 2b92751 into controller-refactors Mar 24, 2026
124 checks passed
@Mrtenz Mrtenz deleted the mrtenz/snap-insights-controller-refactor branch March 24, 2026 09:52
@codecov
Copy link

codecov bot commented Mar 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (controller-refactors@254591e). Learn more about missing BASE report.

Additional details and impacted files
@@                   Coverage Diff                   @@
##             controller-refactors    #3915   +/-   ##
=======================================================
  Coverage                        ?   98.55%           
=======================================================
  Files                           ?      425           
  Lines                           ?    12333           
  Branches                        ?     1935           
=======================================================
  Hits                            ?    12155           
  Misses                          ?      178           
  Partials                        ?        0           

☔ 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.

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