Closed Bug 2020878 Opened 6 months ago Closed 5 months ago

Sidebar Assistant Memories icon stays toggled off

Categories

(Core :: Machine Learning: Frontend, defect)

defect

Tracking

()

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

People

(Reporter: pdahiya, Assigned: chloezhou)

References

(Blocks 1 open bug)

Details

(Whiteboard: [genai][chat])

Attachments

(1 file, 1 obsolete file)

STR

  1. Click ask button to open sidebar assistant and toggle memory icon off
  2. Right click on any link on the page and open in a new tab
  3. Click ask button to open sidebar assistant

ER
Memories icon in sidebar assistant should not be toggled off

AR
Memories icon carries over state from previous tab and stays off

See Also: → 2016402
Blocks: 1988017
Whiteboard: [genai][chat]
See Also: → 2016551

The memories toggle in the AI sidebar was resetting to the default (on) state
when switching between tabs. This was caused by three issues:

  1. The role check in #syncSmartbarMemoriesStateFromConversation compared m.role against the string "user" instead of the numeric MESSAGE_ROLE.USER (0), so it never found the last user message.

  2. #syncSmartbarMemoriesStateFromConversation was not called in openConversation, so even when a conversation was restored the toggle state was not synced.

  3. The memories toggle state was not preserved across tab switches. The tab state manager now snapshots the sidebar's memoriesToggled value before switching away and restores it after openSidebar completes on the new tab. openSidebar is now awaited since it is async and resets the toggle via onCreateNewChatClick(). #selectedTab is also initialized in #init() so the first tab switch can snapshot correctly.

Assignee: nobody → chzhou
Attachment #9553902 - Attachment description: WIP: Bug 2020878 - fix memory toggle state lost when switching between tabs → Bug 2020878 - fix memory toggle state lost when switching between tabs r=pdahiya
Status: NEW → ASSIGNED
Attachment #9553902 - Attachment is obsolete: true
Severity: -- → S3
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Depends on: 2016551
Resolution: --- → FIXED
Target Milestone: --- → 150 Branch

This issue is verified as fixed in our latest Nightly 151.0a1 (2026-03-25) but I did encounter another issue related to it which I filed here : Bug 2026173

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

Attachment

General

Created:
Updated:
Size: