Repository navigation
feat(chat): attach any file from the composer's button, not only images (#1101) - #1122
Merged
Merged
Conversation
…es (#1101) On a phone there is no drag and drop, so the only way to give the chat a PDF or a log was the attach button, which took images only. The button's file input now has no accept list and hands the whole selection to ChatWindow, which runs it through the chat drop handler: images attach to the prompt as before (limits, compression, the image-support warning), other files are uploaded into the working directory with conflict=skip and mentioned, with the same notices, including the one when there is no working directory. No capture attribute, so phones still offer photos and the camera. The button reads "Attach files", and the no-directory notice says "adding" rather than "dropping" since it now covers both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 8, 2026
Closed
agegr
added a commit
that referenced
this pull request
Oct 9, 2026
Scrolling up a long session could show a page of older messages twice. The page lands, and loadingOlderRef clears, a moment before React renders the next cursor; a sentinel report in between (a renewed observer's first one) still held the old cursor and fetched the same page again. #1122's e2e failed on it (before=e4850 requested twice). The cursor asked for is now kept until another one renders, and the observer skips it; a page that failed, or a cursor a reload brings back, can still be asked for. Repeating the e2e's pagination steps in headless Chromium at 6x CPU throttling: main requested a page twice and showed 50-150 duplicate rows in 3 of 10 runs; this branch in 0 of 30. 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.
On a phone there is no drag and drop, so the only way to give the chat a PDF or a log was the attach button, which took images only (#1101). Approved scope: the button accepts any file; no staging area outside the project.
components/ChatInput.tsx: new optionalonAttachFiles(files). With it, the hidden file input has noaccept(and nocapture, so phones still offer the photo library and camera) and hands the whole selection over; without it, the input staysaccept="image/*"as before.components/ChatWindow.tsx:onAttachFilesruns the picked files through the existing chat drop handler (feat(chat): drop files onto the chat to upload them and mention them #1094), so they behave exactly like a drop:conflict=skipand come back as@mentions, with the same notices;chat.attachImage→chat.attachFiles("Attach files" / "附加文件" / "附加檔案"); the no-directory notice says "adding" instead of "dropping" since it covers both.docs/agents/files-and-access.md: one bullet.Tests:
components/ChatInput.test.mjs(accept/capture/label with and without the handler; the realhandleFilePickrouting), newcomponents/ChatWindow.attach-files.test.mjs(real drop/upload path with a stubbed upload request: mixed pick, image-only pick, no working directory).tsc, eslint,npm testpass.Not checked on a real phone. Per WebKit 267277, iOS converts HEIC to JPEG only when
acceptlists specific types that exclude HEIC, whichimage/*did not, so droppingacceptshould not change the format of picked photos.Refs #1101
🤖 Generated with Claude Code