Repository navigation
Conversation
files::FileStore owns the folder (`<hash>/<name>`, `<hash>.part` while one arrives) and its rules: whether a file is intact, resuming, the hash check, keeping only what a message has, and pruning. Work that touches the database takes &Db; work that waits on the disk takes none, so Core never holds the lock across an await. Core keeps the transfer and what follows it (telling the UI, waking the fetcher). No change in behaviour: the protocol file tests pass as they were, and the store has unit tests of its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The paperclip opens the system's file picker, and files dropped on the window come with their paths (Tauri's drag and drop): either way Rust stages them and they go by path, never read into the webview, so a big one isn't held in memory. The store copies a sent file in while hashing it, so changing or moving the original afterwards makes no difference. A staged picture's preview is made from tbstaged://, which serves only staged pictures up to 50 MB. Pasting still goes as bytes, now for any file up to 100 MB. Folders, empty files and anything over 1 GB are turned away with a note. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
files::may_open is the one allow-list of what may open in its default app: pictures, PDFs, text, Office and OpenDocument files without macros, audio and video. Anything else (programs, scripts, shortcuts, web pages, SVG, macro-enabled Office files, disk images, archives) can only be shown in its folder. Attachment carries the answer as `openable`, so the Open button and open_file can't disagree; the UI's copy of the list is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README describes sending any file and what opens; its layout lists files.rs. ROADMAP checks off "Any file" and adds "Remove from this computer": freeing a received file's space on one side, on request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A file that can't be sent, a paste that's too big, or a send or edit that fails now shows in the hint above the message box, next to what it's about. The banner at the top of the window keeps everything else, and both share one card with a dismiss button. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
You can now send any file, not just pictures. Files from disk go by path, so a big one is never read into the webview. Before that, the file store became one module.
What opens:
files::may_openis the one allow-list:pdf,txt,md,csvdocx,xlsx,pptx,odt,ods,odpAnything else can only be shown in its folder: programs, scripts, shortcuts,
html,svg, Office files with macros, disk images and archives.Attachment.openablecarries the answer, and the UI's copy of the list is gone.Config:
dragDropEnabledis nowtrue. The CSP is unchanged: previews come over IPC, because a fetch from a custom URI scheme is cross-origin and the webview refuses it without CORS.Where problems show: a problem with what's being sent (a refused file, a failed send or edit) shows in the hint above the message box. The top banner keeps everything else. Both share one card with a dismiss button.
There's no wire change. Peers on 0.7 already receive any file.
Evidence
Db:.part, and refusing too many bytes, too few, or a wrong hashmay_openrefusing 19 unsafe kinds, includingtrick.pdf.exeany_file_goes_from_disk_by_path: Alice sendsReport.pdffrom disk and then edits the original. Bob gets the original bytes, asapplication/pdf, withopenable: true.bun run check,bun run test,bun run build,cargo fmt --check,clippy -D warningsandcargo teston its own.Merge Danger
Door: two-way
There's no schema or wire change.
Blast Radius: files
The change touches sending and receiving every file, the drop overlay, and where errors show. There's no CSP change.
🤖 Generated with Claude Code