Skip to content

refactor!: move BlockTrackerPollingController to user-operation-controller - #9882

Open
mikesposito wants to merge 9 commits into
mainfrom
me/refactor/block-polling-tracker
Open

refactor!: move BlockTrackerPollingController to user-operation-controller#9882
mikesposito wants to merge 9 commits into
mainfrom
me/refactor/block-polling-tracker

Conversation

@mikesposito

@mikesposito mikesposito commented Aug 14, 2026

Copy link
Copy Markdown
Member

Explanation

BlockTrackerPollingController is being removed from @metamask/polling-controller so that the package doesn't need to depend on @metamask/network-controller.

The only consumer of the removed class is @metamask/user-operation-controller, so it has been moved there (unexported) to leave the consumer unchanged.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Medium Risk
Breaking public API removal may affect downstream packages; in-repo usage is confined to user-operation-controller with a straight import swap.

Overview
Breaking: @metamask/polling-controller no longer ships BlockTrackerPollingController / BlockTrackerPollingControllerOnly and drops its @metamask/network-controller dependency (tsconfig and package graph updated accordingly).

The block-tracker polling mixin now lives inside @metamask/user-operation-controller as a local module; PendingUserOperationTracker imports it from there instead of from @metamask/polling-controller. That implementation pulls shared polling primitives (AbstractPollingControllerBaseMixin, getKey, and related types) from the polling package’s new public exports, so behavior for the sole in-repo consumer should stay the same.

Docs/changelog and README dependency edges reflect the split; polling-controller eslint suppressions for the removed test file are dropped, and user-operation-controller coverage thresholds are relaxed slightly.

Reviewed by Cursor Bugbot for commit 21b92ae. Bugbot is set up for automated code reviews on this repo. Configure here.

@mikesposito
mikesposito requested review from a team as code owners August 14, 2026 14:19
@mikesposito
mikesposito deployed to default-branch August 14, 2026 14:19 — with GitHub Actions Active
Comment thread packages/polling-controller/CHANGELOG.md Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 86cba3b. Configure here.

Comment thread packages/polling-controller/package.json
Comment thread packages/polling-controller/CHANGELOG.md Outdated
Comment thread packages/polling-controller/CHANGELOG.md
@mikesposito
mikesposito force-pushed the me/refactor/block-polling-tracker branch from a07fc87 to f3e9d36 Compare August 14, 2026 14:39
mikesposito and others added 2 commits August 14, 2026 16:40
Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
@mikesposito

Copy link
Copy Markdown
Member Author

Adding the no-changelog label as user-operation-controller has no visible consumer change

mcmire
mcmire previously approved these changes Aug 14, 2026

@mcmire mcmire left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@matthewwalsh0
matthewwalsh0 requested a review from jpuri August 14, 2026 15:01
jpuri
jpuri previously approved these changes Aug 14, 2026
@mikesposito
mikesposito dismissed stale reviews from jpuri and mcmire via 566b453 August 14, 2026 15:12
@mikesposito
mikesposito enabled auto-merge August 14, 2026 15:22
Comment thread eslint-suppressions.json
Comment on lines -1619 to -1626
"packages/polling-controller/src/BlockTrackerPollingController.test.ts": {
"@typescript-eslint/explicit-function-return-type": {
"count": 2
},
"no-restricted-syntax": {
"count": 1
}
},

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We might want to add 1 instance of explicit-function-return-type back, but for the user-operation-controller package. (If we're going to remove this package anyway, we don't need to fix this lint violation right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants