| ListsFeed.sys.mjs |
Class for the Lists widget, which manages the updates to the lists widget
and syncs with PersistentCache
|
4511 |
- |
| PictureOfTheDayFeed.sys.mjs |
Picture of the Day widget - data flow overview
Fetch / render:
Once per day this feed fetches the picture from Merino (via
TemporaryMerinoClientShim), stores it in PersistentCache, maps the payload
onto our internal shape with normalize(), and broadcasts it into the Redux
store, where PictureOfTheDay.jsx renders it. The Merino backend refreshes the
picture on a daily cron (around midnight PST); when a fresh image is not
available it serves the previous day's picture rather than nothing, so the
client can legitimately receive the same picture across days. Whether the
widget runs at all is gated by isEnabled() (isWidgetEnabled: widgets container
on, the widget addable / trainhop-enabled, and the user's enabled pref).
Set as wallpaper:
The "Set wallpaper" CTA - shown only when the feature gate pref
(widgets.pictureOfTheDay.setAsWallpaper.enabled, or its trainhopConfig
override) is on AND newtabWallpapers.enabled + customWallpaper.enabled are on
- dispatches WIDGETS_PICTURE_SET_WALLPAPER. setWallpaper() then fetches the
image, derives a theme, applies it as the custom wallpaper (newtabWallpapers.*),
and records the picture's published date in
widgets.pictureOfTheDay.wallpaperActive.
State reset:
The JSX shows the "already set" checkmark only while wallpaperActive equals the
current picture's published date, so a new day's picture re-offers the CTA on
its own. wallpaperActive is also cleared when the user switches to a non-custom
wallpaper (onPrefChangedAction) or replaces the custom wallpaper with a
different image (onWallpaperUpload). Toggling wallpapers off in the Content
section does not clear it (the picture stays selected) - the JSX just hides the
checkmark while newtabWallpapers.user.enabled is off and shows it again on.
Two distinct prefs: setAsWallpaper.enabled is the config gate (does the CTA
exist); wallpaperActive stores the published date of the picture that is the
active wallpaper ("" = none).
|
13990 |
- |
| PrivacyFeed.sys.mjs |
Feed for the Privacy widget. Runs in the parent process and reads the daily
tracker-blocked count straight from PrivacyMetricsService (same process, so
no IPC), broadcasting it to the Redux store on startup and each SYSTEM_TICK.
|
4925 |
- |
| SportsFeed.sys.mjs |
Manages persistent state for the Sports widget (selected teams and widget
state), syncing with PersistentCache so state survives page refreshes.
Also fetches teams and match data from the Merino WCS endpoints.
|
47859 |
- |
| StocksFeed.sys.mjs |
Periodically fetches the default-ETF stock snapshots from Merino for HNT and
mirrors them into the `Stocks` Redux slice.
|
6533 |
- |
| TimerFeed.sys.mjs |
Class for the Timer widget, which manages the changes to the Timer widget
and syncs with PersistentCache
|
5212 |
- |