Skip to content

feat(ai-controllers): remove AiDigestController - #10089

Open
zone-live wants to merge 4 commits into
mainfrom
feat/remove-ai-digest-controller
Open

feat(ai-controllers): remove AiDigestController#10089
zone-live wants to merge 4 commits into
mainfrom
feat/remove-ai-digest-controller

Conversation

@zone-live

@zone-live zone-live commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Explanation

AiDigestController was leftover Engine glue after digest freshness moved to React Query: empty state, empty-id checks, and a passthrough to AiDigestService.

This PR deletes the controller and related messenger/state exports. AiDigestService remains the fetch+validate layer (GET, 404→null, Superstruct). Empty assetIdentifier / front-page id now throw on the service instead of the controller. Clients construct AiDigestService themselves and own cache/freshness.

References

  • TSA-1059
  • Follows #10020 (controller became a cache-free passthrough)
  • Mobile consumer PR will follow so you can point @metamask/ai-controllers at the preview build from this PR

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 requires consumer migration off messenger/controller wiring; runtime digest behavior is largely unchanged aside from where empty-id errors originate.

Overview
Breaking change: @metamask/ai-controllers drops AiDigestController and all Engine/messenger surface (actions, events, state helpers, auto-generated method action types). Digest HTTP fetch and Superstruct validation stay on AiDigestService; apps instantiate the service directly and handle caching/freshness (e.g. React Query).

Input validation for empty asset identifiers and front-page ids now throws in AiDigestService.searchDigest / fetchFrontPageItem instead of the removed controller, with matching service tests.

The package no longer depends on @metamask/base-controller or @metamask/messenger (tsconfig references, yarn lock, README dependency graph, and messenger CLI scripts removed accordingly).

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

Clients construct AiDigestService and own digest freshness; empty-id validation moves onto the service.
@zone-live
zone-live requested review from a team as code owners September 3, 2026 13:10
@zone-live
zone-live deployed to default-branch September 3, 2026 13:10 — with GitHub Actions Active
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