Skip to content

[VSCodeSweeper MVP — test only] Fix a browser sniff for Firefox support of async clipboard#7

Draft
egamma wants to merge 1 commit into
mainfrom
vscodesweeper/fix-184958
Draft

[VSCodeSweeper MVP — test only] Fix a browser sniff for Firefox support of async clipboard#7
egamma wants to merge 1 commit into
mainfrom
vscodesweeper/fix-184958

Conversation

@egamma

@egamma egamma commented Jul 9, 2026

Copy link
Copy Markdown
Owner

⚠️ VSCodeSweeper MVP — test only. This draft PR was generated by an AI experiment
(vscodesweeper) inside a personal fork. It is
not intended for microsoft/vscode and is not a contribution proposal.

Upstream issue: microsoft#184958

Change summary

Firefox users on vscode.dev cannot paste because a stale browser sniff bypasses the async clipboard API detection.

Validation

Remove the || browser.isFirefox condition from the supportsPaste declaration and verify the existing clipboard unit tests still pass via scripts/test.sh --grep clipboard; additionally confirm that no other code path relies on supportsPaste being false for Firefox.


Branch vscodesweeper/fix-184958 · generated fix · review loop runs separately (codex review).

@egamma egamma added the vscodesweeper-mvp VSCodeSweeper MVP test PR (fork-only) label Jul 9, 2026
@egamma

egamma commented Jul 9, 2026

Copy link
Copy Markdown
Owner Author

🤖 codex review — round 1

VSCodeSweeper MVP codex cross-review of a copilot-generated fix (fork-only experiment).

No actionable correctness issues were identified in the diff. The change cleanly factors paste support detection for testing and removes the Firefox exclusion as intended.

@egamma

egamma commented Jul 9, 2026

Copy link
Copy Markdown
Owner Author

✅ Round 1: no actionable findings — the review loop converged.

@egamma

egamma commented Jul 9, 2026

Copy link
Copy Markdown
Owner Author

🤖 codex review

VSCodeSweeper MVP review of the generated fix (fork-only experiment). Findings, if any, are for a human to triage — nothing is auto-addressed.

The patch can falsely enable the Paste command in browsers with partial Clipboard API support, causing a visible command that cannot paste. The support check should match the readText capability used by the paste implementation.

Review comment:

  • [P2] Require readText before enabling paste — src/vs/editor/contrib/clipboard/browser/clipboard.ts:33-33
    When navigator.clipboard exists but does not expose readText (for example older Firefox/configurations that expose partial Clipboard API support), this now registers the Paste action even though the web implementation later calls clipboardService.readText(), which invokes navigator.clipboard.readText() and just catches a TypeError without pasting anything. Checking only for the clipboard object removes the previous Firefox guard but still needs to verify the actual read capability used by paste.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vscodesweeper-mvp VSCodeSweeper MVP test PR (fork-only)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant