Repository navigation
Let people analyze their own files, a mix of items, or a .zip in the web app - #7
Merged
Merged
Conversation
The web app only understood one dropped folder: dropping a file or several files was rejected, there was no way to choose individual files, and a zipped project (GitHub's "Download ZIP") wasn't supported. Now a drop or a picker accepts a folder, one or more source files, a mix of folders and files, or a .zip, all read inside the page: - loose files are analyzed as one project, so imports between them resolve; duplicate names stay distinct - a .zip is unpacked with fflate, skipping node_modules, build output and non-code from the archive index; a wrapper folder named like the zip (or holding the project's files) is removed, but a lone src/ is kept; a size budget and clear errors cover bad or huge archives - folder picks drop node_modules/.git before any file object is kept - the landing page has a drop area with "Choose a folder" and "Choose files or a .zip", and the app shows progress while it reads Verified with the browser's own drag-and-drop (CDP, real paths): a folder, one file, two files, a folder plus a file, and a real zip; and through both pickers. 106 tests pass (was 98). Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01ENHRK3kgqcVwqwyjswRViM
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The web app only understood one dropped folder. Dropping a file, or several files, was rejected ("Drop a single project folder"), there was no way to choose individual files, and a zipped project (GitHub's "Download ZIP") wasn't supported. I reproduced this with the browser's own drag-and-drop machinery before changing anything.
What changes
A drop or a picker now accepts any of:
.ts .tsx .js .jsx .mjs .cjs .py): analyzed together as one project, so imports between them resolve, and duplicate names stay distinct;.zip, unpacked in the page with fflate (about 8 KB). Dependencies, build output and non-code are skipped from the archive index, so they cost nothing. A wrapper folder is removed when it is named like the zip (GitHub'srepo-main.zip) or holds the project's files directly, but a zip containing onlysrc/keeps itssrc/. A size budget and clear errors cover bad or huge archives.Everything is read inside the page; nothing is uploaded. The landing page has one drop area with Choose a folder and Choose files or a .zip, and a tip that dragging a folder in is faster than choosing it (
node_modulesand.gitare skipped before anything is read). The app shows progress while it reads.Testing
src/, wrapper with project files, several top-level folders, an invalid zip)..zip(wrapper stripped,node_modulesand README skipped, giving the same 11 files as the plain folder). Both file pickers (folder; files or zip) also checked. The 17 earlier end-to-end checks still pass, with no unexpected console output.Notes
node_modules) through the OS picker can make Chrome ask to "upload" many files and take a while. Dragging it in avoids that.