Closed Bug 2014053 Opened 7 months ago Closed 6 months ago

support browser history back navigation to chat conversation

Categories

(Core :: Machine Learning: Frontend, enhancement, P1)

enhancement

Tracking

()

VERIFIED FIXED
150 Branch
Tracking Status
firefox150 --- verified

People

(Reporter: Mardak, Assigned: mlucks)

References

(Blocks 1 open bug)

Details

(Whiteboard: [genai][chat])

Attachments

(1 file)

starting a conversation then clicking a link or other navigation should allow hitting the back button to the conversation. currently it loads the empty state. probably wants some history.pushState building on top of bug 2009866?

See Also: → 2014929
Blocks: 2016128

a few weeks ago i took an initial look at this after we switched from uri with hash to data-conversation-id where basically it checked for history.state if lacking a conversation id:

https://searchfox.org/firefox-main/rev/b824aa1f1416b2e3675f7561cb58f5568f4f156a/browser/components/aiwindow/ui/components/ai-window/ai-window.mjs#131

   #getPendingConversationId() {
+    return hostBrowser?.getAttribute("data-conversation-id") ?? window.history.state?.conversationId;

and a setter helper whenever we updated the conversation

+  set conversation(value) {
+    this.#conversation = value;
+    window.history.replaceState(
+      { ...window.history.state, conversationId: value?.id },
+      ""
+    );

although a bit has changed with conversation state since bug 2012536 and bug 2015921

Assignee: nobody → mlucks
Depends on: 2012536, 2015921
Pushed by mlucks@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/c9705213a5c6 https://hg.mozilla.org/integration/autoland/rev/60781c5b0278 Support browser history back navigation to chat conversation - r=ai-frontend-reviewers,echa
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 150 Branch

Verified as fixed in our latest Nightly build 150.0a1 (2026-03-04)

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-ver-done-c160/b149]
Regressions: 2021402
Regressions: 2022064
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: