Skip to content

[Feature Branch] Notifications Experiment V2 - #7045

Open
cooltey wants to merge 31 commits into
mainfrom
notificationsExperimentV2_design
Open

cooltey wants to merge 31 commits into
mainfrom
notificationsExperimentV2_design

Conversation

@cooltey

@cooltey cooltey commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

@cooltey cooltey added the WIP Work in progress label Oct 21, 2026
cooltey and others added 23 commits October 22, 2026 15:54
…the week. (#7047)

* Helper class for getting the weekly most read article

* Optimize the helper class
* Restore commit

* Update for the exp 2

* Update test name
…ia/apps-android-wikipedia into notificationsExperimentV2_design
* update notification category with weekly most read

* remove comment
…tion (#7090)

* Add permission check for the eligible check

* More clean up from v1

* Put some other logic for the notification

* Some more implementation

* Update title and helper

* Change extras for events

* Add deny list

* Add more abtest logic and also additional logic to make sure the
notifications are sent

* Update to "trending" for instrumentation

* Address code review comments

* use articleTitle instead
@cooltey
cooltey requested a balanced review from Copilot November 5, 2026 19:15

Copilot AI 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.

🟡 Changes recommended

Redirect handling can select non-articles or the wrong top-ranked article, while swallowed transient pageview failures can prevent retries and lose the weekly notification.

3 open issues
What changed in this PR

Replaces the recommended-reading-list notification experiment with a weekly most-read experiment, using aggregated pageviews and the existing Top Read screen.

Changes:

  • Adds weekly notification scheduling, background fetching, and article ranking.
  • Updates experiment eligibility, remote configuration, developer controls, and notification analytics.
  • Removes V1 reading-list behavior and restores configurable update frequency.
File Description
app/​src/​test/​java/​org/​wikipedia/​readinglist/​recommended/​RecommendedReadingListNotificationManagerTest.kt Removes the existing weekly scheduling tests.
app/​src/​main/​res/​xml/​developer_preferences.xml Switches developer controls to weekly most-read notifications.
app/​src/​main/​res/​values/​strings.xml Adds notification and channel text for V2.
app/​src/​main/​res/​values/​preference_keys.xml Replaces V1 preference keys with V2 keys.
app/​src/​main/​res/​values-qq/​strings.xml Updates notification localization documentation.
app/​src/​main/​java/​org/​wikipedia/​settings/​RemoteConfig.kt Adds V2 enablement and language settings.
app/​src/​main/​java/​org/​wikipedia/​settings/​Prefs.kt Stores V2 scheduling preferences and removes V1 overrides.
app/​src/​main/​java/​org/​wikipedia/​settings/​dev/​playground/​NotificationsExperimentTimePickerDialog.kt Returns selected trigger times through a callback.
app/​src/​main/​java/​org/​wikipedia/​settings/​dev/​DeveloperSettingsPreferenceLoader.kt Connects the time picker to V2 scheduling.
app/​src/​main/​java/​org/​wikipedia/​readinglist/​recommended/​RecommendedReadingListSettingsViewModel.kt Removes experiment-specific frequency visibility state.
app/​src/​main/​java/​org/​wikipedia/​readinglist/​recommended/​RecommendedReadingListSettingsScreen.kt Always displays update-frequency controls when enabled.
app/​src/​main/​java/​org/​wikipedia/​readinglist/​recommended/​RecommendedReadingListNotificationManager.kt Removes V1 notification scheduling and messaging.
app/​src/​main/​java/​org/​wikipedia/​readinglist/​recommended/​RecommendedReadingListHelper.kt Removes experiment-specific seed article handling.
app/​src/​main/​java/​org/​wikipedia/​notifications/​NotificationPollBroadcastReceiver.kt Handles weekly alarms and restores them after reboot.
app/​src/​main/​java/​org/​wikipedia/​notifications/​NotificationCategory.kt Adds the weekly most-read notification channel.
app/​src/​main/​java/​org/​wikipedia/​notifications/​experiment/​WeeklyMostReadNotificationWorker.kt Adds network-constrained background delivery with retries.
app/​src/​main/​java/​org/​wikipedia/​notifications/​experiment/​NotificationsExperimentHelper.kt Implements scheduling, pageview aggregation, filtering, and notification delivery.
app/​src/​main/​java/​org/​wikipedia/​notifications/​experiment/​NotificationsExperimentAbTest.kt Switches experiment identity and eligibility to V2.
app/​src/​main/​java/​org/​wikipedia/​feed/​topread/​TopReadFragment.kt Leaves screen-title selection to the activity.
app/​src/​main/​java/​org/​wikipedia/​feed/​topread/​TopReadArticlesActivity.kt Supports notification navigation and a weekly title.
app/​src/​main/​java/​org/​wikipedia/​dataclient/​RestService.kt Adds the daily top-pageviews endpoint.
app/​src/​main/​java/​org/​wikipedia/​dataclient/​restbase/​TopPageViews.kt Models the top-pageviews response.
app/​src/​main/​java/​org/​wikipedia/​activity/​BaseActivity.kt Schedules V2 notifications and records trending notification opens.

Review effort: Balanced

cooltey and others added 3 commits November 5, 2026 14:35
- Only skip a day of page views on 404, so other failures reach
  WeeklyMostReadNotificationWorker and it can retry.
- Rank each article by the best rank among its own title and every
  requested title that redirects to it, instead of only the last redirect.
- After redirects are resolved, drop pages outside the article namespace
  and the main page, which namespace aliases or redirects can lead to.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WIP Work in progress

Development

Successfully merging this pull request may close these issues.

3 participants