Skip to content

Revert "fix(Upload): always apply accept filter in onChange handler"#1138

Merged
ashutosh-tanwar-eightfold merged 3 commits into
mainfrom
revert-1102-ashutosh/fix/upload-accept-filter-onChange
Jul 7, 2026
Merged

Revert "fix(Upload): always apply accept filter in onChange handler"#1138
ashutosh-tanwar-eightfold merged 3 commits into
mainfrom
revert-1102-ashutosh/fix/upload-accept-filter-onChange

Conversation

@ashutosh-tanwar-eightfold

@ashutosh-tanwar-eightfold ashutosh-tanwar-eightfold commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Reverts #1102

What #1102 did & why

AjaxUploader.onChange used to pass every picked file through to uploadFilesbeforeUpload/customRequest, leaving type checks to the consumer. #1102 changed it to always run attrAccept:

- (file) => !directory || attrAccept(file, accept)
+ (file) => attrAccept(file, accept)

It was added to block a customer bug (CS-15960) where users bypassed the picker via "All Files" and uploaded unsupported types.

Why revert now

accept is a browser hint, not enforcement — and running attrAccept here silently drops mismatched files before beforeUpload/customRequest fire. Consumers that validate in those callbacks and show their own error lost that path entirely: the file just vanishes, no feedback. Regression: ENG-200748 (also traced in vscode#110534).

This restores the pre-#1102 pass-through: directory uploads still filter; file-picker uploads reach the consumer callbacks.

Before upgrading vscode

The original CS-15960 consumer (FileUpload.tsx) does no type check of its own, so reverting alone reopens it. It's being fixed at the consumer in vscode#110938 — land that first / in the same octuple bump.

@codesandbox-ci

codesandbox-ci Bot commented Jul 1, 2026

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.97%. Comparing base (d2f79bb) to head (fea9bea).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1138   +/-   ##
=======================================
  Coverage   84.97%   84.97%           
=======================================
  Files        1230     1230           
  Lines       21542    21542           
  Branches     8184     8185    +1     
=======================================
  Hits        18306    18306           
  Misses       3150     3150           
  Partials       86       86           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ashutosh-tanwar-eightfold ashutosh-tanwar-eightfold marked this pull request as ready for review July 1, 2026 12:20
@ashutosh-tanwar-eightfold ashutosh-tanwar-eightfold merged commit 8ce7f46 into main Jul 7, 2026
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants