Closed Bug 2016551 Opened 6 months ago Closed 5 months ago

smartbar memory toggle should be shown when memories exist

Categories

(Core :: Machine Learning: Frontend, enhancement)

enhancement

Tracking

()

VERIFIED FIXED
150 Branch
Tracking Status
firefox150 --- verified
firefox151 --- verified

People

(Reporter: Mardak, Assigned: chloezhou)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [genai][input])

Attachments

(1 file)

bug 2011323 added memory toggle with a disabled state but should be hidden if no memories or memories off https://www.figma.com/design/5KuePTGmOEUFyCHBHCsGim/AI-Mode-%E2%80%94%C2%A0MVP-Scope-Design?node-id=20194-484170

bug 2017428 updated the logic to check for either generation pref are enabled, but the desired behavior is still only show the toggle if there's memories

chidam suggested getAllMemories check if non-empty https://searchfox.org/firefox-main/rev/83d1a08db47b91a4d53341a799745caac9c38bde/browser/components/aiwindow/models/memories/MemoriesManager.sys.mjs#395

See Also: → 2020878
Summary: smartbar memory toggle should be conditionally shown → smartbar memory toggle should be shown when memories exist

Followup of fix in bug 2017428 that implemented

Both pref on - toggle show
Both pref off - toggle hide

Scope of this bug is to use MemoriesManager.getAllMemories() check to see non-empty and use logic to show/hide toggle based of memory existence as below
Both pref on - show
Both pref off and memory exist - show
Both pref off and memory doesn’t exist - hide

See discussion in thread here and here

Assignee: nobody → chzhou

Previously the memories toggle in the AI Window smartbar was only visible when at least one of the generateFromConversation/generateFromHistory prefs was enabled. This meant users who disabled both prefs after accumulating memories could no longer see or use the toggle.

Now the toggle is shown whenever memories exist, regardless of pref state. The component observes memory-store-changed so the toggle hides immediately when the last memory is deleted from settings.

Tests cover sidebar and fullpage modes for all three visibility states: prefs off + memories exist (shown), all memories deleted (hidden), and prefs turned on (shown).

Attachment #9553050 - Attachment description: Bug 2016551 - Show memories toggle when memories exist if both prefs are off. r=pdahiya → Bug 2016551 - Show memories toggle when memories exist if both prefs are off and restore toggle state on tab switch. r=pdahiya
Pushed by chzhou@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/86e9911f8079 https://hg.mozilla.org/integration/autoland/rev/131ea7241723 Show memories toggle when memories exist if both prefs are off and restore toggle state on tab switch. r=pdahiya,ai-frontend-reviewers
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 150 Branch
Blocks: 2020878
Blocks: 2026058

This issue is verified as fixed in our latest Beta 150.0b1 and our latest Nightly build, however there is a scenario where if we disable both preferences and we have a few memories saved the Toggle button is still displayed as ON, I have logged this issue for it Bug 2026595

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-ver-done-c151/b150]
QA Contact: rdoghi
See Also: → 2026595
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: