Skip to content

Commit 59c5a45

Browse files
authored
Merge pull request #350 from Elijah-hash7/feat/firefox-upload-file
feat(firefox): port upload_file tool with downloadId and user picker …
2 parents 295cd02 + 1da05ff commit 59c5a45

26 files changed

Lines changed: 825 additions & 22 deletions

β€ŽCHANGELOG.mdβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This changelog was generated from the repository Git history and release tags. V
77
## [23.0.2] - 2026-07-13
88

99
### Added
10+
- Added `upload_file` tool support for Firefox WebBrain extension, including sidepanel-based user file picker flow and `downloadId` re-fetch flow with 25MB file size limit.
1011
- Added a selection shortcut for Chrome and Firefox with Summarize, Explain, Quiz me, Proofread, Translate, and custom WebBrain prompts.
1112
- Expanded the native selection context menu with matching preset actions, translation languages, and direct side-panel access.
1213
- Added a persistent setting to hide or restore the floating selection shortcut.

β€Žsrc/firefox/ARCHITECTURE.mdβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,8 @@ Legacy tier (kept for compatibility with older prompts and for non-AX flows):
288288

289289
Dev-only Firefox add-ons: `read_page_source`, `inspect_element_styles`, and `execute_js`. `execute_js` is intentionally absent from normal Act and is only exposed when the user selects Dev mode on a Mid/Full provider.
290290

291-
Chrome-only (absent in Firefox): `full_page_screenshot`, `shadow_dom_query` (CDP shadow-pierce variant), `upload_file` (CDP-driven file input), and slash-driven tab/screen recording.
291+
Chrome-only (absent in Firefox): `full_page_screenshot`, `shadow_dom_query` (CDP shadow-pierce variant), and slash-driven tab/screen recording.
292+
Firefox `upload_file` supports `downloadId` re-fetch and a sidepanel user file picker; arbitrary local `filePath` uploads remain Chrome-only (CDP).
292293

293294
### Click β€” content script implementation
294295

β€Žsrc/firefox/src/agent/adapters.jsβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15594,7 +15594,7 @@ const ADAPTERS = [
1559415594
- DO NOT use index-based clicks on the release page. GitHub's global header pollutes the index space and the release form is deep in the DOM. Always use click({text:"..."}) for buttons. Specifically: never click element #38 from memory β€” that's a learned anti-pattern from training data, and on the live site #38 is the "Pull requests" header link that navigates away from the release form.
1559515595
- Release body is a CodeMirror editor, not a textarea. Click the editor surface (click({text:"Describe this release"}) on the placeholder works) then type with no selector.
1559615596
- The green "Publish release" button is at the bottom of the form. Click it with click({text: "Publish release"}). The gray "Save draft" is right next to it β€” don't confuse them.
15597-
- EDITING an existing release (URL pattern /<owner>/<repo>/releases/edit/<tag>): binaries attach via the "Attach binaries" area below the body editor. This Firefox build has NO file-upload tool β€” you cannot attach the file yourself, so ask the user to drag the binaries onto that area (or click it and pick them) manually; you can still help with everything else on the page. The commit button is green and says "Update release"; the uploads are discarded if the user navigates away without clicking it.
15597+
- EDITING an existing release (URL pattern /<owner>/<repo>/releases/edit/<tag>): the file upload input is \`input#releases-upload\` (NOT a generic input[type="file"] β€” there are several on the page). Prefer \`upload_file({selector: "input#releases-upload", downloadId: N})\` when the binary is already in Downloads; otherwise \`upload_file({selector: "input#releases-upload"})\` opens a user file picker. After each upload, GitHub renders a small chip listing the filename in the "Attach binaries" area β€” verify the chip appears with the correct filename before moving on. The commit button is green and says "Update release"; navigating away without clicking it discards the uploads.
1559815598
- Files in a /tree/.../<folder> view (e.g. /tree/main/dist) can be downloaded via raw URLs of the form https://github.com/<owner>/<repo>/raw/<branch>/<path>. Once downloaded, the file is on local disk; do not re-download to "verify".
1559915599
- Issue/PR comments use the same CodeMirror editor; markdown preview is on a separate tab.
1560015600
- File browser: pressing "t" opens the fuzzy file finder (faster than navigating folders).
@@ -16322,7 +16322,7 @@ const ADAPTERS = [
1632216322
notes: `
1632316323
- Application URLs look like /<employer>/jobs/<id> with the apply form at /<employer>/jobs/<id>/applications/new.
1632416324
- Form fields vary per employer but typically include: First name, Last name, Email, Phone, Resume (file upload), Cover letter (textarea), and a set of demographic / EEO questions (usually optional).
16325-
- Resume upload: input[type=file]. This Firefox build cannot attach files programmatically β€” ask the user to select the resume themselves. PDF is universally accepted; some employers also accept .docx.
16325+
- Resume upload: input[type=file]. Prefer \`upload_file({selector: "input[type=file]", downloadId: N})\` when the resume is already in Downloads; otherwise \`upload_file({selector: "input[type=file]"})\` prompts the user to pick a file. PDF is universally accepted; some employers also accept .docx.
1632616326
- Cover letter is a plain textarea (not a rich editor). Click into it, type with no selector.
1632716327
- "Apply" / "Submit Application" button at the bottom. Some employers add custom questions below the standard set β€” scroll the entire form before submitting.
1632816328
- Each employer's customization can add required custom questions; an unanswered required field will block submit with an inline error.
@@ -16340,7 +16340,7 @@ const ADAPTERS = [
1634016340
- Date pickers are custom widgets. Click the field, type MM/DD/YYYY (or DD/MM/YYYY depending on tenant locale), then Tab. Don't try to click calendar cells β€” the popup is portal-rendered outside the field's subtree.
1634116341
- "Add Another" buttons for experiences / education clone the entire panel β€” fill the FIRST one fully before clicking Add Another, or the new clone may copy partial state.
1634216342
- Some employers wrap Workday in an iframe β€” if get_accessibility_tree shows almost no form fields, check for an iframe and switch to iframe_read / iframe_type.
16343-
- File upload (resume, CV) lives in the "My Information" or "Resume/CV" step. The drop zone has a "Select Files" button β€” this Firefox build cannot attach files programmatically, so ask the user to pick the file themselves.
16343+
- File upload (resume, CV) lives in the "My Information" or "Resume/CV" step. The drop zone has a "Select Files" button over an underlying \`input[type=file]\` β€” use \`upload_file({selector: "input[type=file]", downloadId: N})\` when the file is already downloaded, or omit downloadId to open the user picker.
1634416344
- "Review" step at the end shows everything filled β€” read it back to the user before clicking Submit; mistakes at this stage usually require restarting the whole application.`,
1634516345
},
1634616346

0 commit comments

Comments
Β (0)