Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
b3554a6
Bug 2014028 - Don't reset relay entitlement check unless logged off r…
mavduevskiy Feb 6, 2026
e3d25fd
Bug 2014636 - Show email mask settings only for eligible users r=andr…
mavduevskiy Feb 6, 2026
7e30051
No Bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBU…
Feb 6, 2026
110cf9f
No Bug - Bumping Mobile l10n changesets r=release a=l10n-bump DONTBUI…
Feb 6, 2026
72f09d6
Bug 1936766 - [remote] Add Worker helpers to monitor and retrieve wor…
juliandescottes Feb 6, 2026
30b7a3d
Bug 2014922 - Untangle pseudo-element and anon box definitions. r=fir…
emilio Feb 6, 2026
44a957a
Bug 2014613 - Keep creating special label frames only when we have th…
emilio Feb 6, 2026
c2a6d73
Bug 2014331 - New select pseudo-elements should be element-backed. r=…
emilio Feb 6, 2026
13bce8d
Bug 2005401: Remove areSameSite and fix normalizeUrl r=rconcepcion,ai…
simon-friedberger Feb 6, 2026
efdc411
Bug 2014703 - Enable font-family: math by default. r=emilio
fred-wang Feb 6, 2026
56a37fb
Bug 2014083 - Create a new Nimbus flag for custom review prompt UI r=…
marcin-kozinski Feb 6, 2026
6b6cd48
Bug 2005458 - [devtools] Netmonitor test to assert the display of kee…
bomsy Feb 6, 2026
4289be7
Bug 1949057 - Let the file picker portal ride the trains by default. …
emilio Feb 6, 2026
6a93742
Bug 2014945 - Avoid \n in NS_WARNING. r=stransky,necko-reviewers,webr…
emilio Feb 6, 2026
6a76acf
Bug 2010189 - update footer events (copy, retry, without memories), s…
echa-mozilla Feb 6, 2026
928c7fd
Bug 2014952 - Stop trying to cycle-collecting SharedStyleSheetCache. …
arai-a Feb 6, 2026
9714004
Bug 2014885 - Convert dom::MathMLElement's length parsing flags to an…
fred-wang Feb 6, 2026
b693cc3
Bug 2014267: Add a new font set used by a fingerprinter r=tschuster
tomrittervg Feb 6, 2026
0017e3c
Bug 2014267: Add another fingerprinter's font set r=tschuster
tomrittervg Feb 6, 2026
10a1860
Bug 2013007 - Part 1: Add nsISHistoryListener.OnHistoryCommit. r=dom-…
farre Feb 6, 2026
ff24606
Bug 2013007 - Part 2: Add panel for Jake Diagrams. r=fluent-reviewers…
farre Feb 6, 2026
469d1e8
Bug 2013569 - Make shadow realm importValue wrap promise passed to mo…
jonco3 Feb 6, 2026
26ed041
Bug 2006453: Reset the previous popup state once before opening it r=…
Feb 6, 2026
54c2e67
Bug 2013868 - Only write to contiguous entries when Navigation API is…
farre Feb 6, 2026
f30bce0
Bug 2013877 - Fix argument description of Preferences.unlock r=mossop…
1rneh Feb 6, 2026
d1a3dc6
Bug 2012536 - Implement tab switching for smart window sidebar state …
s9tpepper Feb 6, 2026
a0bd446
Bug 2012246 - Prevent symbol scrapers from failing when presented wit…
gabrielesvelto Feb 6, 2026
219c49f
Revert "Bug 2013007 - Part 2: Add panel for Jake Diagrams. r=fluent-r…
Feb 6, 2026
3bdcfec
Revert "Bug 2012536 - Implement tab switching for smart window sideba…
Feb 6, 2026
db0bb83
Bug 2014944 - Remove unused additional computed style APIs. r=jwatt
emilio Feb 6, 2026
bbd0c2d
Bug 1923985 - Control console message logging via MOZ_LOG only via MO…
ochameau Feb 6, 2026
e4c7ba4
Bug 1923985 - Prevent logging stacks from console messages logged via…
ochameau Feb 6, 2026
bc001e5
Bug 1998267 - Upgrade SQLite vendoring. r=RyanVM
mak77 Feb 6, 2026
31620a8
Bug 1998267 - Upgrade to SQLite 3.51.2. r=RyanVM
mak77 Feb 6, 2026
b1e2f14
Bug 1998267 - Fix compilation of the carray SQLite extension. r=RyanV…
mak77 Feb 6, 2026
17770fd
Bug 2014576: Reduce intermittents r=tschuster
tomrittervg Feb 6, 2026
18a45f3
Bug 2014599 - Switch assert to if in details HandleCommand steps r=do…
keithamus Feb 6, 2026
96db625
Bug 1693542 - Part 1: Add configuration option for concurrent marking…
jonco3 Feb 6, 2026
be7ac49
Bug 1693542 - Part 2: Add GC parameter and shell options to control c…
jonco3 Feb 6, 2026
c70e675
Bug 1693542 - Part 3: Delay freeing buffers that could be being trace…
jonco3 Feb 6, 2026
108ce5c
Bug 1693542 - Part 4: Preinitialize dynamic slots in concurrent marki…
jonco3 Feb 6, 2026
a5153a7
Bug 1693542 - Part 5: Allow an interruptible unlimited slice budget r…
jonco3 Feb 6, 2026
2e990c8
Bug 1693542 - Part 6: Set a flag on the zone when concurrent marking …
jonco3 Feb 6, 2026
c8c1306
Bug 1693542 - Part 7: Don't move object elements header while marking…
jonco3 Feb 6, 2026
00468fb
Bug 1693542 - Part 8: Add APIs to move all the work from one mark sta…
jonco3 Feb 6, 2026
4585855
Bug 1693542 - Part 9: Factor out functions to get object layout r=jandem
jonco3 Feb 6, 2026
6b7bef8
Bug 1693542 - Part 10: Marking changes r=sfink
jonco3 Feb 6, 2026
1b46536
Bug 1693542 - Part 11: Use a background task to mark concurrently wit…
jonco3 Feb 6, 2026
4df2d90
Bug 1693542 - Part 12: Add memory fences for synchronization between …
jonco3 Feb 6, 2026
40a148b
Bug 1693542 - Part 13: Handle rope type transitions during marking r=…
jonco3 Feb 6, 2026
d54f7cb
Bug 1693542 - Part 14: Update test expectations r=sfink
jonco3 Feb 6, 2026
dd49612
Bug 1693542 - Part 15: Add concurrent marking test build r=sfink,task…
jonco3 Feb 6, 2026
f492979
Bug 2013469 - Do not allow Mockito to mock `BrowserStore` and update …
mcarare Feb 6, 2026
6bb2ac5
Bug 2013469 - Do not allow Mockk to mock `BrowserStore` or restricted…
mcarare Feb 6, 2026
dfa549c
Bug 2014780 - Pull from /changeset instead of /records for periodic u…
leplatrem Feb 6, 2026
06dcad7
Bug 2014953 - Update android nightly application-services version bum…
updatebot-ci Feb 6, 2026
8b2087b
Bug 2006822 - [devtools] Show the base request for a view-source page…
bomsy Feb 6, 2026
dc1204a
Bug 1992798 - Extend tests to ensure that the sap is set correctly in…
moritzbeier Feb 6, 2026
6d38f96
Bug 2013230 - Use strnlen in mozilla::PrintfTarget::cvt_s. r=glandium
kaie Feb 6, 2026
d5b8f8b
Bug 2015013 - Restore Pixel 9 in robo-arm config r=ajoltan
delia-pop Feb 6, 2026
c0d96cf
Bug 2011184 - check fragment is added before finding nav controller.
pollym Feb 6, 2026
5a51f0e
Revert "Bug 2013230 - Use strnlen in mozilla::PrintfTarget::cvt_s. r=…
Feb 6, 2026
3291382
Bug 2014136 - Fetch PopoverData only if needed r=dom-core,smaug
keithamus Feb 6, 2026
c18bfaa
Bug 2011776 - Move and audit ipProtection.ftl from preview to locales…
Feb 6, 2026
5ac7ea1
Bug 2014598 - Don't reset auto direction if slot is not in shadow tre…
jnjaeschke Feb 6, 2026
72f5dcf
Revert "Bug 2005430 - Tweak default dark selecteditem color. r=deskto…
Feb 6, 2026
8ab3502
Bug 2010945 - Check JIT_ARGS_LENGTH_MAX limit for regular calls too. …
jandem Feb 6, 2026
94d2f39
Bug 2012828 - Add back Typescript/JSDoc type info for fields, r=Stand…
bendk Feb 6, 2026
91830ed
Bug 201239: handle duplicate logins r=android-reviewers,Roger
Alexandra-Virvara Feb 6, 2026
972d911
Bug 2012506 - Add 3 new events to be sent to Adjust. r=android-review…
RebecaTudor Feb 6, 2026
adf12b1
Bug 2014604 - Prevent empty select when inserting with selected attri…
emilio Feb 6, 2026
d4d96c1
Bug 1979356 - Remove the "searchable" flag from marker schema fields …
carverdamien Feb 6, 2026
9236764
Bug 1972365 - Use config-based preferences settings for fonts r=hjone…
fterdal Feb 6, 2026
3bbf6ac
Bug 2015041 - make repo-update job more useful/testable on try. r=Rya…
jcristau Feb 6, 2026
4369754
Bug 2014213 - Disable browser_tab_splitview_about_opentabs.js on a11y…
Feb 6, 2026
42ffcd4
Revert "Bug 2004050 - generate up to 16 partials on nightly (instead …
Feb 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion browser/base/content/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -4818,7 +4818,7 @@ var ConfirmationHint = {
if (
messageId === "confirmation-hint-ipprotection-navigated-to-excluded-site"
) {
MozXULElement.insertFTLIfNeeded("preview/ipProtection.ftl");
MozXULElement.insertFTLIfNeeded("browser/ipProtection.ftl");
}

document.l10n.setAttributes(this._message, messageId, options.l10nArgs);
Expand Down
2 changes: 1 addition & 1 deletion browser/base/content/browser.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
<link rel="localization" href="browser/firefoxView.ftl"/>
<link rel="localization" href="browser/genai.ftl"/>
<link rel="localization" href="browser/identityCredentialNotification.ftl" />
<link rel="localization" href="browser/ipProtection.ftl"/>
<link rel="localization" href="browser/menubar.ftl"/>
<link rel="localization" href="browser/openTabs.ftl"/>
<link rel="localization" href="browser/originControls.ftl"/>
Expand Down Expand Up @@ -95,7 +96,6 @@
<link rel="localization" href="preview/onboarding.ftl"/>
<link rel="localization" href="preview/smartTabGroups.ftl"/>
<link rel="localization" href="preview/genai.ftl"/>
<link rel="localization" href="preview/ipProtection.ftl"/>
<link rel="localization" href="preview/aiWindow.ftl" />

<title data-l10n-id="browser-main-window-default-title"></title>
Expand Down
1 change: 1 addition & 0 deletions browser/components/DesktopActorRegistry.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ let JSWINDOWACTORS = {
events: {
"AIChatContent:DispatchSearch": { wantUntrusted: true },
"AIChatContent:Ready": { wantUntrusted: true },
"AIChatContent:DispatchFooterAction": { wantUntrusted: true },
},
},
allFrames: true,
Expand Down
33 changes: 33 additions & 0 deletions browser/components/aiwindow/ui/actors/AIChatContentChild.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";

const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {});

XPCOMUtils.defineLazyServiceGetter(
lazy,
"ClipboardHelper",
"@mozilla.org/widget/clipboardhelper;1",
Ci.nsIClipboardHelper
);

/**
* Represents a child actor for getting page data from the browser.
*/
Expand All @@ -13,11 +22,18 @@ export class AIChatContentChild extends JSWindowActorChild {
"AIChatContent:DispatchMessage": {
event: "aiChatContentActor:message",
},
"AIChatContent:TruncateConversation": {
event: "aiChatContentActor:truncate",
},
"AIChatContent:RemoveAppliedMemory": {
event: "aiChatContentActor:remove-applied-memory",
},
};

static #VALID_EVENTS_FROM_CONTENT = new Set([
"AIChatContent:DispatchSearch",
"AIChatContent:Ready",
"AIChatContent:DispatchFooterAction",
]);

/**
Expand All @@ -36,6 +52,11 @@ export class AIChatContentChild extends JSWindowActorChild {
this.#handleSearchDispatch(event);
break;

case "AIChatContent:DispatchFooterAction": {
this.#handleFooterActionDispatch(event);
break;
}

case "AIChatContent:Ready":
this.sendAsyncMessage("AIChatContent:Ready");
break;
Expand All @@ -51,6 +72,18 @@ export class AIChatContentChild extends JSWindowActorChild {
this.sendAsyncMessage("aiChatContentActor:search", event.detail);
}

#handleFooterActionDispatch(event) {
const { action, text } = event.detail ?? {};
// Copy is handled in the child actor since it depends on content-side
// selection and clipboard context.
if (action === "copy") {
if (text) {
lazy.ClipboardHelper.copyString(text, this.windowContext);
}
}
this.sendAsyncMessage("aiChatContentActor:footer-action", event.detail);
}

async receiveMessage(message) {
const mapping =
AIChatContentChild.#EVENT_MAPPINGS_FROM_PARENT[message.name];
Expand Down
33 changes: 31 additions & 2 deletions browser/components/aiwindow/ui/actors/AIChatContentParent.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ export class AIChatContentParent extends JSWindowActorParent {
this.sendAsyncMessage("AIChatContent:DispatchMessage", response);
}

dispatchTruncateToChatContent(payload) {
this.sendAsyncMessage("AIChatContent:TruncateConversation", payload);
}

dispatchRemoveAppliedMemoryToChatContent(payload) {
this.sendAsyncMessage("AIChatContent:RemoveAppliedMemory", payload);
}

receiveMessage({ data, name }) {
switch (name) {
case "aiChatContentActor:search":
Expand All @@ -26,6 +34,10 @@ export class AIChatContentParent extends JSWindowActorParent {
this.#notifyContentReady();
break;

case "aiChatContentActor:footer-action":
this.#handleFooterActionFromChild(data);
break;

default:
console.warn(`AIChatContentParent received unknown message: ${name}`);
break;
Expand All @@ -34,8 +46,7 @@ export class AIChatContentParent extends JSWindowActorParent {
}

#notifyContentReady() {
const browser = this.browsingContext.embedderElement;
const aiWindow = browser.ownerDocument.querySelector("ai-window");
const aiWindow = this.#getAIWindowElement();
aiWindow.onContentReady();
}

Expand All @@ -47,4 +58,22 @@ export class AIChatContentParent extends JSWindowActorParent {
console.warn("Could not perform search from AI Window chat", e);
}
}

#handleFooterActionFromChild(data) {
try {
const aiWindow = this.#getAIWindowElement();
aiWindow.handleFooterAction(data);
} catch (e) {
console.warn("Could not handle footer action from AI Window chat", e);
}
}

#getAIWindowElement() {
const browser = this.browsingContext.embedderElement;
const root = browser?.getRootNode?.();
if (root?.host?.localName === "ai-window") {
return root.host;
}
return browser?.ownerDocument?.querySelector("ai-window") ?? null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@ export class AIChatContent extends MozLitElement {
this.dispatchEvent(
new CustomEvent("AIChatContent:Ready", { bubbles: true })
);
this.#initFooterActionListeners();
}

#dispatchFooterAction(action, detail) {
this.dispatchEvent(
new CustomEvent("AIChatContent:DispatchFooterAction", {
bubbles: true,
composed: true,
detail: {
action,
...(detail ?? {}),
},
})
);
}

/**
Expand All @@ -43,6 +57,53 @@ export class AIChatContent extends MozLitElement {
"aiChatContentActor:message",
this.messageEvent.bind(this)
);

this.addEventListener(
"aiChatContentActor:truncate",
this.truncateEvent.bind(this)
);

this.addEventListener(
"aiChatContentActor:remove-applied-memory",
this.removeAppliedMemoryEvent.bind(this)
);
}

/**
* Initialize event listeners for footer actions (retry, copy, etc.)
* emitted by child components.
*/

#initFooterActionListeners() {
this.addEventListener("copy-message", event => {
const { messageId } = event.detail ?? {};
const text = this.#getAssistantMessageBody(messageId);
this.#dispatchFooterAction("copy", { messageId, text });
});

this.addEventListener("retry-message", event => {
this.#dispatchFooterAction("retry", event.detail);
});

this.addEventListener("retry-without-memories", event => {
this.#dispatchFooterAction("retry-without-memories", event.detail);
});

this.addEventListener("remove-applied-memory", event => {
this.#dispatchFooterAction("remove-applied-memory", event.detail);
});
}

#getAssistantMessageBody(messageId) {
if (!messageId) {
return "";
}

const msg = this.conversationState.find(m => {
return m?.role === "assistant" && m?.messageId === messageId;
});

return msg?.body ?? "";
}

messageEvent(event) {
Expand Down Expand Up @@ -156,6 +217,36 @@ export class AIChatContent extends MozLitElement {
});
}

truncateEvent(event) {
const { messageId } = event.detail ?? {};
if (!messageId) {
return;
}

const idx = this.conversationState.findIndex(m => {
return m?.role === "assistant" && m?.messageId === messageId;
});

if (idx === -1) {
return;
}

this.conversationState = this.conversationState.slice(0, idx);
this.requestUpdate();
}

removeAppliedMemoryEvent(event) {
const { messageId, memoryId } = event.detail ?? {};
const msg = this.conversationState.find(m => {
return m?.role === "assistant" && m?.messageId === messageId;
});

msg.appliedMemories = msg.appliedMemories.filter(
memory => memory?.id !== memoryId
);
this.requestUpdate();
}

render() {
return html`
<link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { html, nothing } from "chrome://global/content/vendor/lit.all.mjs";
* - "toggle-applied-memories"
* detail: { messageId, open }
* - "remove-applied-memory"
* detail: { messageId, index, memory }
* detail: { memoryId }
* - "retry-without-memories"
* detail: { messageId }
*/
Expand Down Expand Up @@ -116,28 +116,16 @@ export class AppliedMemoriesButton extends MozLitElement {
);
}

_onRemoveMemory(event, index) {
_onRemoveMemory(event, memory) {
event.stopPropagation();

if (!Array.isArray(this.appliedMemories)) {
return;
}

const memory = this.appliedMemories[index];

// Remove memory visually, but update will be done by parent
this.appliedMemories = this.appliedMemories.filter((_, i) => {
return i !== index;
});

this.dispatchEvent(
new CustomEvent("remove-applied-memory", {
bubbles: true,
composed: true,
detail: {
messageId: this.messageId,
index,
memory,
messageId: this.messageId,
},
})
);
Expand All @@ -157,14 +145,6 @@ export class AppliedMemoriesButton extends MozLitElement {
);
}

// TODO: Update formatting function once shape of memories passed is confirmed
_formatMemoryLabel(memory) {
if (typeof memory === "string") {
return memory;
}
return "";
}

renderPopover() {
if (!this._hasMemories) {
return nothing;
Expand All @@ -181,24 +161,19 @@ export class AppliedMemoriesButton extends MozLitElement {
@click=${event => this._onPopoverClick(event)}
>
<ul class="memories-list">
${visibleMemories.map((memory, index) => {
const label = this._formatMemoryLabel(memory);
if (!label) {
return nothing;
}

${visibleMemories.map(memory => {
// @todo Bug 2010069
// Localize aria-label
return html`
<li class="memories-list-item">
<span class="memories-list-label">${label}</span>
<span class="memories-list-label">${memory}</span>
<moz-button
class="memories-remove-button"
type="ghost"
size="small"
iconsrc="chrome://global/skin/icons/close.svg"
aria-label="Remove this memory"
@click=${event => this._onRemoveMemory(event, index)}
@click=${event => this._onRemoveMemory(event, memory)}
></moz-button>
</li>
`;
Expand All @@ -214,6 +189,7 @@ export class AppliedMemoriesButton extends MozLitElement {
class="retry-row-button"
data-l10n-id="aiwindow-retry-without-memories"
data-l10n-attrs="label"
@click=${event => this._onRetryWithoutMemories(event)}
></moz-button>
</div>
</div>
Expand All @@ -235,7 +211,7 @@ export class AppliedMemoriesButton extends MozLitElement {
type="ghost"
size="small"
iconposition="start"
iconsrc="chrome://global/skin/icons/highlights.svg"
iconsrc="chrome://browser/content/aiwindow/assets/memories-on.svg"
aria-haspopup="dialog"
aria-expanded=${this.open && this._hasMemories}
data-l10n-id="aiwindow-memories-used"
Expand Down
Loading
Loading