Skip to content

feat: implement rich notification setting config using AUS#30106

Merged
baptiste-marchand merged 30 commits into
mainfrom
GE-13-integrating-AUS-with-notification-setting
May 20, 2026
Merged

feat: implement rich notification setting config using AUS#30106
baptiste-marchand merged 30 commits into
mainfrom
GE-13-integrating-AUS-with-notification-setting

Conversation

@baptiste-marchand

@baptiste-marchand baptiste-marchand commented May 13, 2026

Copy link
Copy Markdown
Contributor

Description

Revamps the notifications settings UX into section-based configuration (wallet activity, perps, Social AI, marketing) with a new NotificationSettingsSection screen and updated navigators to route into it.

Changelog

CHANGELOG entry: Revamp notification settings and enrich them with several sections

Related issues

Core PR: MetaMask/core#8784
Fixes: https://consensyssoftware.atlassian.net/browse/GE-13

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2026-05-15.at.17.16.52.mov
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2026-05-15.at.17.17.52.mov

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Medium Risk
Moderate risk: refactors notifications settings/navigation and introduces new AUS-backed preference read/merge/write logic, which could affect persistence and toggle behavior if the storage contract or caching assumptions are wrong.

Overview
Revamps notification settings into a section-based UI (wallet activity, perps, Social AI, marketing) with a new NotificationSettingsSection screen for per-section push/in-app toggles and extra content (wallet-activity account selection + marketing disclaimer + embedded Social AI preferences).

Switches preference sourcing/persistence to Authenticated User Storage (AUS) via a new useNotificationStoragePreferences hook (shared query key, optimistic cache updates, read-merge-write PUT, and refetch-on-failure), and updates Social AI preferences to reuse this shared storage flow.

Updates navigation and headers to support the new section route (Routes.SETTINGS.NOTIFICATION_SETTINGS_SECTION), modernizes the notifications list header UI, and removes legacy/developer-only pieces (e.g., resetNotifications, SettingsNotification, and the Social Leaderboard NotificationPreferencesView) while adjusting tests accordingly.

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

@github-actions

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@baptiste-marchand baptiste-marchand changed the title Ge 13 integrating aus with notification setting feat: implement rich notification setting config using AUS May 15, 2026
@baptiste-marchand baptiste-marchand force-pushed the GE-13-integrating-AUS-with-notification-setting branch from e017e79 to 8993554 Compare May 15, 2026 15:04
@baptiste-marchand baptiste-marchand marked this pull request as ready for review May 15, 2026 15:05
@baptiste-marchand baptiste-marchand requested a review from a team as a code owner May 15, 2026 15:05
@socket-security

socket-security Bot commented May 15, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​metamask/​authenticated-user-storage@​2.0.07310010092100
Updatednpm/​@​metamask/​notification-services-controller@​23.1.0 ⏵ 24.1.09810088 +197100

View full report

Comment thread app/components/Views/Notifications/index.test.tsx Outdated
Comment thread app/components/Views/Settings/NotificationsSettings/index.tsx Outdated
title={strings('app_settings.notifications_opts.marketing_title')}
status={getStatusText(preferences?.marketing)}
iconName={IconName.Campaign}
onPress={() =>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

question: For the marketing section, should the In-app toggle also keep the existing feature-announcement controller flag in sync?

It looks like core still gates product-announcement notifications on NotificationServicesController.state.isFeatureAnnouncementsEnabled here:
https://github.com/MetaMask/core/blob/main/packages/notification-services-controller/src/NotificationServicesController/NotificationServicesController.ts#L1260-L1263

Turning off Marketing > In-app updates AUS but I think it still might allow Contentful productAnnouncement items in the notification list.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes let's discuss what we should do about it

item={item}
evmAddress={evmAddress}
icon={accountAvatarType}
disabledSwitch={shouldDisableSwitches}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thought (non-blocking): the social AI section disables the secondary options when push notifications is disabled. Should we do something similar here? If the user does not have wallet push or in-app notifications on, then we disable the accounts options.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I agree. However I prefer doing it in a follow up PR, because the behavior you're proposing would still not be aligned with the social AI section, which relies only on the push toggle to disable their section.

We should align with the social AI team if we can apply the same logic to both

samir-acle
samir-acle previously approved these changes May 15, 2026

@samir-acle samir-acle left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Works great. LGTM

@baptiste-marchand

Copy link
Copy Markdown
Contributor Author

@metamaskbot update-mobile-fixture

@github-actions

Copy link
Copy Markdown
Contributor

🔄 Fixture update started. Running workflow from branch GE-13-integrating-AUS-with-notification-setting. View workflow runs

@github-actions

Copy link
Copy Markdown
Contributor

E2E fixture update failed.\n\nCommon causes:\n- CI workflow is still running — wait for 'Build iOS Apps' to complete\n- CI workflow was skipped — ensure your PR has iOS-impacting changes or use skip-smart-e2e-selection label\n- iOS build failed — check the CI workflow for errors\n\nView logs and retry

@baptiste-marchand

Copy link
Copy Markdown
Contributor Author

@metamaskbot update-mobile-fixture

@github-actions

Copy link
Copy Markdown
Contributor

🔄 Fixture update started. Running workflow from branch GE-13-integrating-AUS-with-notification-setting. View workflow runs

@github-actions

Copy link
Copy Markdown
Contributor

E2E fixture update failed.\n\nCommon causes:\n- CI workflow is still running — wait for 'Build iOS Apps' to complete\n- CI workflow was skipped — ensure your PR has iOS-impacting changes or use skip-smart-e2e-selection label\n- iOS build failed — check the CI workflow for errors\n\nView logs and retry

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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 cff91f7. Configure here.

PatrykLucka
PatrykLucka previously approved these changes May 20, 2026
oilnam
oilnam previously approved these changes May 20, 2026
@baptiste-marchand baptiste-marchand dismissed stale reviews from oilnam and PatrykLucka via afee7a6 May 20, 2026 10:20
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAccounts, SmokeConfirmations, SmokeIdentity, SmokeNetworkAbstractions, SmokeNetworkExpansion, SmokeSwap, SmokeStake, SmokeWalletPlatform, SmokeMoney, SmokePerps, SmokeMultiChainAPI, SmokePredictions, SmokeSeedlessOnboarding, SmokeBrowser, SmokeSnaps
  • Selected Performance tags: @PerformanceAccountList, @PerformanceOnboarding, @PerformanceLogin, @PerformanceSwaps, @PerformanceLaunch, @PerformanceAssetLoading, @PerformancePredict, @PerformancePreps
  • Risk Level: high
  • AI Confidence: 100%
click to see 🤖 AI reasoning details

E2E Test Selection:
Hard rule (controller-version-update): @MetaMask controller package version updated in package.json: @metamask/notification-services-controller. Running all tests.

Performance Test Selection:
Hard rule (controller-version-update): @MetaMask controller package version updated in package.json: @metamask/notification-services-controller. Running all tests.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

@christopherferreira9 christopherferreira9 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good for QA

@baptiste-marchand baptiste-marchand added this pull request to the merge queue May 20, 2026
Merged via the queue into main with commit 10b62c6 May 20, 2026
264 of 279 checks passed
@baptiste-marchand baptiste-marchand deleted the GE-13-integrating-AUS-with-notification-setting branch May 20, 2026 13:12
@github-actions github-actions Bot locked and limited conversation to collaborators May 20, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.79.0 Issue or pull request that will be included in release 7.79.0 label May 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.79.0 Issue or pull request that will be included in release 7.79.0 size-XL team-engagement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants