Fix ambiguous file uploads - #231
Conversation
|
@codex pls review |
There was a problem hiding this comment.
馃挕 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 25ff5a9c8a
鈩癸笍 About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 馃憤.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (name !== 'get_interactive_elements' || !Array.isArray(response)) return false; | ||
| this._uploadSelectorRecoveryRequired.delete(tabId); |
There was a problem hiding this comment.
Keep recovery gated when inspection omits file inputs
When the page hides its file inputs with hidden/display:none (or makes them zero-sized in Firefox), get_interactive_elements still returns an array but the collectors omit every file-input record. This unconditional delete therefore clears the ambiguity gate without supplying any exact selector, allowing the next guessed unique selector to attach the file to the wrong input鈥攖he outcome this recovery mechanism is meant to prevent. Keep the gate until the response contains a file-input record with a verified selector, or make the inspection include hidden file inputs; the mirrored Firefox helper has the same issue.
Useful? React with 馃憤聽/ 馃憥.
|
@codex pls review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: 鈩癸笍 About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 馃憤. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
acceptandmultiplemetadataRoot cause
Pages such as Hugging Face expose multiple file inputs. Generic selectors could match more than one input, and successful local attachment results were easy to interpret as completed remote uploads before the explicit commit step.
Impact
Agents now recover deterministically from ambiguity, target repository file inputs correctly, and require observation plus an explicit commit before reporting remote success. Firefox retains its existing local-file limitations.
Validation
node --checkpassed for every changed agent, content, and test filenpm run test:security: 60/60 passednpm test: 1441 passed; one unrelated existing changelog-version assertion failed (26.0.0vs package26.0.10)npm run test:fixtures: 127 passed; all new upload fixtures passed, while two unrelated existing selection-shortcut fixtures failed in Chrome and Firefox