Skip to content

Send several files with one code and unpack them on receive - #39

Merged
YashasVM merged 4 commits into
mainfrom
feature/multi-file-selection
Oct 13, 2026
Merged

YashasVM merged 4 commits into
mainfrom
feature/multi-file-selection

Conversation

@YashasVM

@YashasVM YashasVM commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Several files sent with one code now arrive as separate files. Before, the sender bundled them into one .zip the receiver had to unpack by hand.
  • cdx receive unpacks into --out (created if missing) or the current folder, keeps folder structure, and refuses name clashes unless --force is given. A bad archive is kept as a zip so nothing is lost.
  • The browser Receive box lists each file with its own download link and downloads them one after another. If it can't read the archive, it offers the zip instead.
  • Receivers that don't know the new bundle marker still get the .zip, so older clients keep working.
  • Agent sharing docs now say to pass all files to one cdx send rather than zipping them first.

Testing

  • go test ./cmd/cdx passes, including new tests for unpacking, unsafe names, and clash handling.
  • node --test src/*.test.js passes (51 tests), and vite build succeeds.
  • scripts/verify-multi-file.mjs passes against a local relay in both directions: cdx send → browser, and browser → cdx receive.
  • Manually run between this Linux PC and an Ubuntu 24.04 box over the LAN: CLI → CLI and browser → CLI, with SHA-256 checks on every file.

Notes

  • --resumable sends still allow only one file.
  • The sender's "arrives as …zip" label is not yet updated to describe the separate files.

🤖 Generated with Claude Code

A multi-file send already travelled as one .zip. Mark that zip as a
bundle in the offer, so `cdx receive` and the browser Receive box unpack
it and each file arrives separately, with folders kept.

- cdx receive: unpacks into --out (created if missing) or the current
  folder, refuses name clashes without --force, and never extracts a
  path that escapes the folder. A failed unpack keeps the zip.
- browser: lists each file with its own download link and downloads them
  one after another; falls back to the zip if it cannot read it.
- Receivers that predate the bundle marker still get the .zip.
- Agent sharing docs say to pass all files to one `cdx send`.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

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

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3db80418-e42e-48be-90bc-cd56dee79a7c
  • 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.

Comment thread cmd/cdx/receive.go Dismissed
Comment thread cmd/cdx/receive.go Dismissed
Comment thread cmd/cdx/receive.go Dismissed
Comment thread cmd/cdx/receive.go Dismissed
Comment thread cmd/cdx/receive.go Dismissed
YashasVM and others added 3 commits October 13, 2026 11:37
A folder plus a file now arrives as separate files instead of one zip,
so the browser check asserts each file's download rather than the
archive name and contents.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Bundle receives built file paths from the sender's offered name, which
CodeQL flags as uncontrolled path data. The zip now uses a fixed name in
the output folder, so the sender's name is only shown in messages.

verify:browser now checks that a multi-file send unpacks into separate
files instead of asserting a zip.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
@YashasVM
YashasVM merged commit 919af4f into main Oct 13, 2026
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