Repository navigation
One composer for threads and bot chats, with a paperclip for photos, camera and files - #41
Merged
Merged
Conversation
…es, refuse empty files, keep picks through the iOS camera, clean Android's picked copies, name why files can't be checked
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, the composer had a picture button and send. Desktop's has emoji, a paperclip, a mic and a round send that turns into a purple stop square. This PR is the first part: one composer component, the paperclip and desktop's stop. Emoji and dictation are their own PRs and go in the composer's
trailingslot.What it does
MessageComposerin the UI library (android/ui, ios/MousseUI). It is the rounded field, with slots:top: attachments waiting to go; a quoted reply can go here later;leading: the paperclip;trailing: steer for now; emoji and the mic later;action: send or stop;bottom:/, Model, Effort and Access.threadFilesinnet.infoand offersorchestrator.sendversion 11. The phone holds it to 10 files and 18 MB together, whatever the computer claims.Core
MobileComposer.file_policy()reads what the chat takes.file_refusal(...)is the shared check both phones use.MobileFilePolicycarriespictures(the limit counts pictures too, for bots) andfailure(a fixedCallFailureKindwhen the computer couldn't be asked).send_message(text, photos, files, skill)replacessend_with_skill.files,[{name, data}]with plain base64, besideimages. A bot's go with its pictures assentfiles.pending.jsongainsfilesandfile_count. Both default when missing, so a pending message from an older build still reads. A retry sends the same files.MobileOutgoing.fileslets the bubble say "File" or "2 files".Checks
filesvalue, and bot files.components/composer);components-composer,attach,attach-refused,composer-stop.Review: one fresh reviewer. 6 shoulds fixed (iOS camera dropped attachments, bot chats' shared limit, empty files, Android picked copies never cleaned, failure kinds, iOS camera prompt), 4 notes: 2 fixed as small wording, 2 below and in #42. Re-check of the fix by a second fresh reviewer: all 6 fixed, no new breakage.
Notes
.env(desktop strips the leading dot), names of 201–255 characters (desktop cuts at 200), and emoji-heavy names (desktop counts UTF-16 units). The refusal is final and the draft stays.onDisappearon a real iPhone wasn't checked.No issue