Newtab stories can come back on if were previously turned off
Categories
(Firefox :: New Tab Page, defect, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr140 | --- | unaffected |
| firefox-esr153 | --- | unaffected |
| firefox155 | --- | unaffected |
| firefox156 | --- | wontfix |
| firefox157 | --- | fix-optional |
People
(Reporter: thecount, Unassigned)
References
(Regression)
Details
(Keywords: regression)
The recent newtab spaces feature broke the toggle button in the personalize menu in newtab if a user already had stories off.
There is a workaround where if you go into about:preferences#home and toggle stories on then off, it should kick it back into a working state.
| Reporter | ||
Updated•7 days ago
|
Localized this to the spaces opt-out mirror added in bug 2061742 (changeset 7682a4de).
spaces.storiesOptOut is only ever written by _mirrorSpaceOptOut in browser/extensions/newtab/lib/PrefsFeed.sys.mjs, which is reached from onPrefChanged — i.e. the pref-branch observer. A profile that enrolled with feeds.section.topstories already false never produces a change, so the opt-out stays false and isSpaceOverridden forces the Stories space on. That part looks intentional per the comment there.
The toggle breaks as a second-order effect. browser/extensions/newtab/content-src/components/Base/Base.jsx computes enabledSections.pocketEnabled as prefs["feeds.section.topstories"] || isSpaceOverridden(STORIES, prefs), which drives pressed on the moz-toggle in ContentSection.jsx. So the toggle reads on while the underlying pref is already false; switching it off dispatches SET_PREF with false, the SET_PREF handler writes the value the pref already has, no observer fires, the mirror never runs and the override survives. The about:preferences workaround works because that checkbox is bound to the real pref value, so on-then-off is two genuine changes and the second one records the opt-out.
Proposed fix: record the opt-out from the intent rather than from an observed value change — call this._mirrorSpaceOptOut(action.data.name, action.data.value) in the at.SET_PREF case before this._prefs.set(...). _mirrorSpaceOptOut already no-ops when the mirror matches, so the observer path can stay as-is, and spaces.storiesOptOut is in PREFS_CONFIG so the write broadcasts and the page re-renders with the space gone. Please do this generically for all of SPACE_CONFIG rather than special-casing stories — widgets.enabled has the same shape via Base.jsx#1081. (Reasoned from the code; not built or run.)
Verification anchors: browser/extensions/newtab/test/browser/browser_newtab_spaces.js and browser/extensions/newtab/test/unit/lib/PrefsFeed.test.js — the existing mirror tests call feed.onPrefChanged() directly, which is exactly why this gap isn't caught; a case that sets the pref to the value it already holds would cover it.
Suggested severity: S2
Content the user had explicitly turned off comes back and the in-page control for it is inert, so the only way out is a non-obvious double-toggle in about:preferences; reach is bounded by enrolment in the spaces variant.
If you'd like to provide feedback on this comment, please use the 👍 or 👎 reaction.
If you want to categorize your feedback you can add one of the following tags: ai-triage-wrong-file, ai-triage-wrong-cause, ai-triage-hallucination, ai-triage-out-of-scope.
Updated•7 days ago
|
Comment 2•7 days ago
|
||
Set release status flags based on info from the regressing bug 2061742
Comment 3•5 days ago
|
||
:thecount, it looks like this could be fixed in a train hop, but the S2 severity suggestion in Comment 1 is concerning.
Could this be triaged?
| Reporter | ||
Comment 4•5 days ago
•
|
||
Yup, we're on it, but it shouldn't block anything like a trainhop.
Updated•4 days ago
|
Description
•