fix(wasm): stop rejecting legitimate large folder drops#129
fix(wasm): stop rejecting legitimate large folder drops#129danielewood wants to merge 2 commits intomainfrom
Conversation
The browser build already has per-file and total byte limits, so the 200-file cap only blocks real-world folder drops without adding meaningful protection. Keep the byte limits, document that file-count caps are intentionally disallowed here, and include the lockfile refresh produced by the required npm-update hook run.
Keep the unreleased changelog entry consistent with the rest of the file now that the pull request number exists.
There was a problem hiding this comment.
Pull request overview
This PR updates the WASM (browser) ingestion/inspection flows to stop rejecting legitimate large folder drops by removing the hard 200-file cap, relying instead on per-file and total byte limits.
Changes:
- Remove the 200-file cap from WASM
addFilesupload flow. - Remove the 200-file cap from WASM
inspectFilesinspection flow. - Update
CHANGELOG.mdand refreshweb/package-lock.jsonvia the npm-update hook.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
cmd/wasm/main.go |
Removes the file-count cap and documents that WASM input should be limited by bytes only. |
cmd/wasm/inspect.go |
Removes the file-count cap from the inspect path to match upload behavior. |
CHANGELOG.md |
Documents the behavioral change under Fixed in [Unreleased]. |
web/package-lock.json |
Lockfile refresh (dependency metadata/version update). |
Files not reviewed (1)
- web/package-lock.json: Language not supported
| filesArg := args[0] | ||
| length := filesArg.Length() | ||
| if length > wasmMaxInputFiles { | ||
| return jsError(fmt.Sprintf("too many files: %d (max %d)", length, wasmMaxInputFiles)) | ||
| } | ||
|
|
There was a problem hiding this comment.
Now that the file-count cap is removed, length may be very large. In addFiles, when readWASMFileData starts returning the total-bytes-limit error, the loop continues and appends an error result for every remaining file. This can create a huge results JSON payload and a lot of work/logging for drops with thousands of files. Consider detecting the total-bytes-limit condition and stopping early (e.g., break/reject with a single error, or mark the remainder skipped without iterating).
Code review1 issue found. CL-4: Missing link definition for
|
Code review. Issues found: CL-4 (MUST) - Missing link definition for the PR ref. See CLAUDE.md CL-4. The changelog entry uses ([#129]) as a reference on line 33, but the corresponding link definition is not present at the bottom of CHANGELOG.md. Without it, Markdown renderers cannot resolve the reference to the PR URL. Relevant line:
Lines 32 to 34 in c68b53e |
Summary
web/package-lock.jsonrefresh produced by the requirednpm-updatehook runTesting