feat(v2): auto-send file as a message on attach (no draft staging)#273
Open
feat(v2): auto-send file as a message on attach (no draft staging)#273
Conversation
Picking a file from the composer now uploads + sends a message containing the upload directive in one shot. The previous flow inserted `[[upload:fileName|…]]` into the textarea as raw text, which made the user see the raw token as they typed and felt off. The user's existing draft text is preserved untouched — they can keep typing and hit Send when ready, and the file lands as its own message. Matches the drag-and-drop pattern in Slack / Discord / Linear: pick → goes now. Images keep the existing inline-image behavior. Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Second of three "artifact polish" PRs. Will not auto-merge.
What this changes
Picking a file from the composer now uploads + sends a message containing the upload directive in one shot instead of inserting raw `[[upload:fileName|…]]` into the textarea.
Why: the previous flow showed raw directive tokens as the user typed, which felt off. Drag-and-drop in Slack, Discord, and Linear all match the new shape: pick → goes now. The user's existing draft text is preserved — they can keep typing and hit Send when ready, and the file lands as its own message.
Images keep the existing inline-image-message behavior (URL-as-content, `messageType: 'image'`).
Diff
`V2PodChat.tsx` — `handleAttachFile` calls `sendMessage(directive)` instead of mutating `draft` with `setDraft`.
Test plan
🤖 Generated with Claude Code