Repository navigation
Conversation
🦋 Changeset detectedLatest commit: 46ede36 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Dropzone drag state and callback contract packages/upload/src/types.ts, packages/upload/src/createDropzone.ts, .changeset/afraid-mails-cry.md |
createDropzone now updates isDragging on drag enter, drag leave, and drop. It removes dragstart, dragend, and drag listeners and callbacks. |
FileList transformation packages/upload/src/helpers.ts, .changeset/fine-kids-grin.md |
transformFiles returns early for null input and iterates FileList indices without numeric validation or missing-file checks. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Merge Risk: 
High · previous review 04c31
-
File uploads may fail when FileList indexing yields an absent entry because the new transformation path can pass it to URL.createObjectURL. This should be resolved before merging.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
-
❌ Failed checks (1 warning)
Check name Status Explanation Resolution Docstring Coverage ⚠️ WarningDocstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (2 skipped: 2… Write docstrings for the functions missing them to satisfy the coverage threshold. ✅ Passed checks (4 passed)
-
Check name Status Explanation Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled. Title check ✅ Passed The title clearly identifies the primary change: removing unnecessary validation from transformFiles.Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (2 skipped: 2 unsupported.)
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create PR with unit tests
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
ℹ️ Recent review info
-
⚙️ Run configuration
-
Configuration used: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 1d819740-49ce-42b4-a3d3-bbce17acdeaa
📒 Files selected for processing (5)
-
.changeset/afraid-mails-cry.md
.changeset/fine-kids-grin.md
packages/upload/src/createDropzone.ts
packages/upload/src/helpers.ts
packages/upload/src/types.ts
💤 Files with no reviewable changes (1)
-
- packages/upload/src/types.ts
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.
ℹ️ Recent review info
-
⚙️ Run configuration
-
Configuration used: defaults
Review profile: CHILL
Plan: Advanced
Run ID:
1d819740-49ce-42b4-a3d3-bbce17acdeaa
📒 Files selected for processing (5)
-
.changeset/afraid-mails-cry.md.changeset/fine-kids-grin.mdpackages/upload/src/createDropzone.tspackages/upload/src/helpers.tspackages/upload/src/types.ts
💤 Files with no reviewable changes (1)
-
- packages/upload/src/types.ts
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.
-
c1e461a to
04c31ee
Compare
|
Whoops, was attempting to use PR stacking but failed :/ Rebased the changes above to be on top of main again |
|
@an-jello would you mind applying the same fix to 2.0? |
|
@davedbase Holy crap this PR was made a long time ago. I haven't had the chance to play with Solid 2.0 so I'm not comfortable per-se to port this PR to it. Though, looking at the change, it doesn't look like the change would break anything... (🤞) |
upload: transformFiles iterated the FileList with for...in, which also visits its `length` and `item` members, so it threw on every call (regression from #1058, staged but unpublished as 0.1.6). Use Array.from(files, ...) and add tests. raf (follow-up to #824, unreleased): - useGlobalRAF registers a separate entry per call, so two owners registering the same callback no longer unregister each other - remove() only stops the shared loop when it removed the last callback - createCallbacksSet's dispatcher is typed (...args: Parameters<T>) => void - document that createScheduledLoop's scheduler must repeat the callback - fix tests whose assertions ran after the test ended, dispose leaked roots, add regression tests - add the new primitives to primitive.list and add a changeset Co-authored-by: Roy Eden <roy.ede@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The current
transformFilesfunction does an unnecessary check for a valid file index number / file existing in an index. This PR removes it.I've consulted the W3C reference:
FileList"are the numbers in the range zero to one less than the number of File objects"Summary by CodeRabbit
onDragStart,onDragEnd, andonDragdropzone callbacks.onDragEnter,onDragLeave, andonDragOvercallbacks.