Skip to content

Let people analyze their own files, a mix of items, or a .zip in the web app - #7

Merged
harsharajkumar-273 merged 1 commit into
mainfrom
claude/practical-thompson-7w19xy
Oct 22, 2026
Merged

harsharajkumar-273 merged 1 commit into
mainfrom
claude/practical-thompson-7w19xy

Conversation

@harsharajkumar-273

@harsharajkumar-273 harsharajkumar-273 commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

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:

  • a folder;
  • one or more source files (.ts .tsx .js .jsx .mjs .cjs .py): analyzed together as one project, so imports between them resolve, and duplicate names stay distinct;
  • a mix of folders and files;
  • a .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's repo-main.zip) or holds the project's files directly, but a zip containing only src/ keeps its src/. 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_modules and .git are skipped before anything is read). The app shows progress while it reads.

Testing

  • 106 tests pass (was 98). New: loose files (including that imports between them resolve), one file, duplicate names, nothing picked or only non-code files, and zips (GitHub-style wrapper, lone src/, wrapper with project files, several top-level folders, an invalid zip).
  • In headless Chromium against the built site, using the browser's real drag-and-drop with paths on disk: a folder, one file, two files, a folder plus a file, and a real .zip (wrapper stripped, node_modules and 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

  • Choosing a very large folder (with node_modules) through the OS picker can make Chrome ask to "upload" many files and take a while. Dragging it in avoids that.
  • Mobile browsers (notably iOS Safari) don't support choosing a folder; they can still choose files or a zip.

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
@vercel

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
codegraph Ready Ready Preview Oct 22, 2026 3:58pm UTC

@coderabbitai

coderabbitai Bot commented Oct 22, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9c2a5e3d-63c3-49b3-9e72-a196a528f978
  • 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@harsharajkumar-273
harsharajkumar-273 merged commit cc10d6d into main Oct 22, 2026
5 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