Skip to content

Open-source AI browser agent for Chrome and Firefox (monorepo) 🧠

Treat icon-only attachment and picker buttons beside a chat box as composer tools

Claude094c9ec8a316
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c6e88a293..122f1202c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -27,7 +27,7 @@ This changelog was generated from the repository Git history and release tags. V
- Ordinary controls (filter chips, folder links, menus, tabs, toggles, draft attachment and media removal, composer tools) work before and after a correction; X and Bluesky no longer reject them as unidentified publication actions. After a correction, identical resubmissions are reported as already done, a corrected in-place save or a requested post on another platform is allowed once the earlier result is known, and requests to remove characters or hashtags are no longer treated as deleting the post. A submit-probe exception that left real publish controls unresolved is fixed.
- A correction sent while a run is working is no longer lost when the extension background restarts before the run uses it. The resumed run applies it first, once, in the order it was sent; if the run does not resume, the correction returns to the queue marked as paused, as after Stop. Clearing the conversation or closing the tab discards it.
- Buttons that animate when the pointer reaches them (a hover lift, scale or border transition) are no longer refused once before working: the click waits up to 0.6 seconds, without sending anything, until the button stops moving, then presses it once at its new centre. A button that keeps moving, is covered or replaced, or any input or Stop during that wait still cancels the click. Hover, drag and drop, and checkbox actions refused before any input are reported as not sent.
-- Confirming a message recipient now works the first time. When the open conversation's name differs from the name in your request ("gamze" and "Gamze Çömlekçi"), picking that exact name in the confirmation approves it, however the question is worded, including a question asked before the first send; Firefox now shows the same confirmation question as Chrome. A reply that refuses or corrects ("No, not Gamze Çömlekçi", "Cancel all") is never taken as approval, and a reply that does not pick the name ("that's the right person") approves nothing and is explained instead of being treated as consent.
+- Confirming a message recipient now works the first time. When the open conversation's name differs from the name in your request ("gamze" and "Gamze Çömlekçi"), picking that exact name in the confirmation approves it, however the question is worded, including a question asked before the first send; Firefox now shows the same confirmation question as Chrome. A reply that refuses or corrects ("No, not Gamze Çömlekçi", "Cancel all") is never taken as approval, and a reply that does not pick the name ("that's the right person") approves nothing and is explained instead of being treated as consent. Attachment and emoji buttons next to a chat box (Instagram's "Add Photo or Video") are no longer treated as Send buttons.
## [40.3.0] - 2026-10-12
diff --git a/docs/page-feedback-monitor.md b/docs/page-feedback-monitor.md
index 97bcfe26a..e77ba4ece 100644
--- a/docs/page-feedback-monitor.md
+++ b/docs/page-feedback-monitor.md
@@ -305,7 +305,9 @@ Steer or grant authorization. Enter and Alt+Enter retain their existing behavior
recipient, a reply that does not name it, and a refusal or redirect ("No, not
…", "Cancel all") approve nothing, and the clarify result tells the model why.
Only an affirmative grant ("Send all remaining messages…", "send all")
- approves every remaining send.
+ approves every remaining send. Icon-only attachment and picker launchers
+ beside a chat composer, named by their icon's label or title, are composer
+ utilities; Like, Send, mixed and unnamed icons stay guarded.
- A cancelled `beforeinput` handled by a native chat editor can receive an
exact read-only draft certificate while its original operation, document,
identity nodes, editor, focus and selection remain current. The certificate
diff --git a/src/chrome/src/content/content.js b/src/chrome/src/content/content.js
index b974071f4..19789cd95 100644
--- a/src/chrome/src/content/content.js
+++ b/src/chrome/src/content/content.js
@@ -6613,7 +6613,18 @@
+ '|attach(?:\\s+(?:files?|photos?|images?|documents?))?|insert\\s+(?:link|photo|image|file|drive|emoji|signature|contact|table|drawing|note)'
+ '|emoji|emoticon|bold|italic|underline|strikethrough|align|numbered\\s+list|bulleted\\s+list'
+ '|indent|outdent|undo|redo|more\\s+options|formatting(?:\\s+options)?|text\\s+formatting'
- + '|remove\\s+formatting|font|text\\s+color|highlight|edit\\s+subject|confidential\\s+mode)',
+ + '|remove\\s+formatting|font|text\\s+color|highlight|edit\\s+subject|confidential\\s+mode'
+ // Attachment and picker launchers of chat composers (Instagram, Messenger
+ // and similar). They open a file chooser or a picker; they never send.
+ + '|add\\s+(?:an?\\s+)?(?:photos?|images?|pictures?|videos?|files?|attachments?|media|gifs?|stickers?)'
+ + '(?:\\s+(?:or|and|&)\\s+(?:an?\\s+)?(?:photos?|images?|pictures?|videos?|files?|gifs?|stickers?))?'
+ + '|choose\\s+(?:an?\\s+)?(?:emojis?|gifs?|stickers?)(?:\\s+(?:or|and|&)\\s+(?:an?\\s+)?(?:emojis?|gifs?|stickers?))?'
+ + '|(?:open\\s+)?(?:gif|sticker)s?(?:\\s+picker)?$'
+ + '|(?:fotoğraf|resim|görsel|video|dosya|medya)(?:\\s+(?:veya|ya\\s+da|ve)\\s+(?:fotoğraf|resim|video|dosya))?\\s+ekle'
+ + '|(?:emoji|gif|çıkartma)(?:\\s+(?:veya|ya\\s+da)\\s+(?:emoji|gif|çıkartma))?\\s+seç'
+ + '|(?:foto|bild|video|datei|anhang)(?:\\s+oder\\s+(?:foto|bild|video))?\\s+hinzufügen|emoji\\s+auswählen'
+ + '|(?:añadir|agregar|adicionar)\\s+(?:una?\\s+)?(?:foto|imagen|imagem|vídeo|video|archivo|arquivo)'
+ + '|ajouter\\s+(?:une?\\s+)?(?:photo|image|vidéo|fichier)|choisir\\s+un\\s+emoji)',
'i',
);
@@ -6629,7 +6640,17 @@
|| el.textContent
|| '',
).replace(/\s+/g, ' ').trim();
- if (label && _COMPOSER_UTILITY_LABEL_RE.test(label)) return true;
+ if (label && _COMPOSER_UTILITY_LABEL_RE.test(label) && !_hasMessageCommitName(label)) return true;
+ // Icon-only controls carry their name on the icon itself (<svg
+ // aria-label>, <img alt>). Every named icon must be a utility.
+ if (!label) {
+ const iconNames = Array.from(el.querySelectorAll?.('svg[aria-label],[role="img"][aria-label],img[alt]') || [])
+ .slice(0, 4)
+ .map(icon => String(icon.getAttribute('aria-label') || icon.getAttribute('alt') || '').replace(/\s+/g, ' ').trim())
+ .filter(Boolean);
+ if (iconNames.length && iconNames.every(name => _COMPOSER_UTILITY_LABEL_RE.test(name)
+ && !_hasMessageCommitName(name))) return true;
+ }
// Formatting toolbars and pressed toggles are structural non-sends.
const formattingScope = el.closest?.('[role="toolbar"],[aria-label*="formatting" i],[aria-label*="format" i]');
if (formattingScope && formattingScope !== el) return true;
diff --git a/src/firefox/src/content/content.js b/src/firefox/src/content/content.js
index af8b7e83c..241deadc4 100644
--- a/src/firefox/src/content/content.js
+++ b/src/firefox/src/content/content.js
@@ -5742,7 +5742,18 @@
+ '|attach(?:\\s+(?:files?|photos?|images?|documents?))?|insert\\s+(?:link|photo|image|file|drive|emoji|signature|contact|table|drawing|note)'
+ '|emoji|emoticon|bold|italic|underline|strikethrough|align|numbered\\s+list|bulleted\\s+list'
+ '|indent|outdent|undo|redo|more\\s+options|formatting(?:\\s+options)?|text\\s+formatting'
- + '|remove\\s+formatting|font|text\\s+color|highlight|edit\\s+subject|confidential\\s+mode)',
+ + '|remove\\s+formatting|font|text\\s+color|highlight|edit\\s+subject|confidential\\s+mode'
+ // Attachment and picker launchers of chat composers (Instagram, Messenger
+ // and similar). They open a file chooser or a picker; they never send.
+ + '|add\\s+(?:an?\\s+)?(?:photos?|images?|pictures?|videos?|files?|attachments?|media|gifs?|stickers?)'
+ + '(?:\\s+(?:or|and|&)\\s+(?:an?\\s+)?(?:photos?|images?|pictures?|videos?|files?|gifs?|stickers?))?'
+ + '|choose\\s+(?:an?\\s+)?(?:emojis?|gifs?|stickers?)(?:\\s+(?:or|and|&)\\s+(?:an?\\s+)?(?:emojis?|gifs?|stickers?))?'
+ + '|(?:open\\s+)?(?:gif|sticker)s?(?:\\s+picker)?$'
+ + '|(?:fotoğraf|resim|görsel|video|dosya|medya)(?:\\s+(?:veya|ya\\s+da|ve)\\s+(?:fotoğraf|resim|video|dosya))?\\s+ekle'
+ + '|(?:emoji|gif|çıkartma)(?:\\s+(?:veya|ya\\s+da)\\s+(?:emoji|gif|çıkartma))?\\s+seç'
+ + '|(?:foto|bild|video|datei|anhang)(?:\\s+oder\\s+(?:foto|bild|video))?\\s+hinzufügen|emoji\\s+auswählen'
+ + '|(?:añadir|agregar|adicionar)\\s+(?:una?\\s+)?(?:foto|imagen|imagem|vídeo|video|archivo|arquivo)'
+ + '|ajouter\\s+(?:une?\\s+)?(?:photo|image|vidéo|fichier)|choisir\\s+un\\s+emoji)',
'i',
);
@@ -5758,7 +5769,17 @@
|| el.textContent
|| '',
).replace(/\s+/g, ' ').trim();
- if (label && _COMPOSER_UTILITY_LABEL_RE.test(label)) return true;
+ if (label && _COMPOSER_UTILITY_LABEL_RE.test(label) && !_hasMessageCommitName(label)) return true;
+ // Icon-only controls carry their name on the icon itself (<svg
+ // aria-label>, <img alt>). Every named icon must be a utility.
+ if (!label) {
+ const iconNames = Array.from(el.querySelectorAll?.('svg[aria-label],[role="img"][aria-label],img[alt]') || [])
+ .slice(0, 4)
+ .map(icon => String(icon.getAttribute('aria-label') || icon.getAttribute('alt') || '').replace(/\s+/g, ' ').trim())
+ .filter(Boolean);
+ if (iconNames.length && iconNames.every(name => _COMPOSER_UTILITY_LABEL_RE.test(name)
+ && !_hasMessageCommitName(name))) return true;
+ }
const formattingScope = el.closest?.('[role="toolbar"],[aria-label*="formatting" i],[aria-label*="format" i]');
if (formattingScope && formattingScope !== el) return true;
return !!el.hasAttribute?.('aria-pressed');
diff --git a/test/message-recipient-clarify-binding.mjs b/test/message-recipient-clarify-binding.mjs
index 8af864c1b..fc7e21850 100644
--- a/test/message-recipient-clarify-binding.mjs
+++ b/test/message-recipient-clarify-binding.mjs
@@ -259,6 +259,23 @@ for (const kind of ['chrome', 'firefox']) {
}
});
+ // The model clicked the composer's icon buttons while the send was blocked.
+ // Attachment and picker launchers are not sends; Like and Send stay guarded.
+ for (const [control, nonSend] of [['attach', true], ['titled', true], ['like', false], ['send-icon', false],
+ ['mixed', false], ['bare', false]]) {
+ test(`the ${control} icon control ${nonSend ? 'is a composer utility' : 'stays a guarded send'}`, async page => {
+ await setup(page, kind);
+ const probe = await call(page, 'probe_message_recipient_guard', { tool: 'click', args: { selector: `#${control}` },
+ adapterName: 'generic-messaging', supportsRecipientSets: false });
+ assert.equal(probe.success, true, JSON.stringify(probe));
+ if (nonSend) {
+ assert.equal(probe.messageSend, false, JSON.stringify(probe));
+ assert.equal(probe.composerUtility, true);
+ } else {
+ assert.notEqual(probe.messageSend, false, JSON.stringify(probe));
+ }
+ });
+ }
}
let passed = 0, failed = 0;