Repository navigation
Attach photos, start polls and preview from the composer, and vote on polls - #24
Merged
Merged
Conversation
…ote on polls The composer sheet gets the web composer's tools on a row under the field: photos from the library, a photo from the camera, a poll, and a preview. Photos come through the official camera plugin, up to three, each checked the way devnull checks them and moved into the app's storage until the commit goes. Each can have a description. A commit with photos is signed as multipart with the image hashes, the way the API asks, and sent from the background, so Commit spins while it uploads. A new commit or a quote can have a poll instead, with two to four options and a length, as on the web. The preview shows the draft as the commit it would become, and fills in the body devnull sends back for it. A commit page's reply bar has no room for these, so it gets an expand button that opens the reply in the same sheet, and the draft goes back to the bar if the sheet closes unsent. Polls in lists can now be voted on: pick an option, then Vote. The camera plugin is pinned to a branch until NativePHP/mobile-camera#17 is released, since its pickers did nothing when opened from a sheet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
simonhamp
marked this pull request as draft
October 19, 2026 19:12
This was referenced Oct 19, 2026
Commit, the reply and the tools now follow main's rules: a commit fits by Commit::fits(), with photos it may have no body at all, and the sheet's own sheetPosting flag covers photo uploads too. The sheet keeps main's bar with Cancel and Commit, and issue drafts get no tools, as on the web. The reply bar's expand button sits beside main's Liquid Glass field. The Log's row cache now keys rows on the option picked on a poll and on a vote being under way, so a row redraws when either changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tools, stash@{0} and the counter now sit in a bar under the scroll
view instead of at the end of it, so they stay just above the keyboard
while you write, and above the home indicator when it's down.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ShowsCommits' docblock now lists both Pin to profile, from main, and voting on a poll. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The sheet's bar takes main's round cross and check. The check is enabled by the draft's photo and poll rules (Draft::canCommit), reads Reply in the reply view, and the title still says Reply to @handle there. The composer tests now read the check through main's sheetButtonEnabled helpers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Client keeps both commitPayload() and main's answeredByDevnull(). Photo uploads go through the same background path as other writes, so they get main's check that devnull really answered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
composer.json takes main's mobile-browser ^1.2 beside the camera plugin's branch, and the lock file has both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FetchInBackground gained image prefetch arguments on main, so the multipart content type now goes last and the write dispatch passes it positionally. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
simonhamp
marked this pull request as ready for review
October 22, 2026 15:41
This was referenced Oct 22, 2026
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.
The composer sheet gets what the web's composer has: photos with descriptions, a poll, and a preview. Polls in lists can be voted on too, which the app couldn't do before.
It needs four API PRs that aren't merged yet: images (nunomaduro/dev-null.sh#660), polls (#662), votes (#663) and previews (#664). Against production as it is, those buttons get a 401 or a 404 back.
What changed
nativephp/mobile-camera, new). Up to three, each checked the way devnull checks them (JPEG, PNG or WebP, 10 MB, 6000 pixels a side), with the web's error messages. A kept photo is moved into the app's storage (DraftImages) and deleted once it's sent, taken off, or the sheet closes. Each one can have a description, through the web's ALT badge. A commit with photos is signed as multipart with the photos' SHA-256s, which is what #660 asks for, and goes from the background with Commit spinning, since uploads take a while.POST /commits/preview, with emoji replaced and code and mentions found. If devnull can't be reached it keeps the body as written.Worth checking
fix/present-over-sheets(NativePHP/mobile-camera#17). The plugin presented its pickers from the root view controller, which can't present while our sheet is up, so the buttons did nothing. That branch is alsomain, which has the HEIC to JPEG conversion that 1.0.4 doesn't. Without it a real iPhone's library photos would be refused. A 1.0.5 release would let the app go back to a tag.config/nativephp.phpwith our own wording.WritesInBackground::writeInBackground()now goes through a newsendInBackground(), so a write can be signed some other way and given a longer timeout.SignedRequestandFetchInBackgroundcarry a content type for that.commit-sheet.blade.phpandOpensCommitSheetwith the scheduling and slash command branches. The tools row is its own partial (composer-tools), which is probably where the schedule button should end up.Testing
896 tests pass and Pint is clean. New tests cover the image store's checks, signing a multipart commit, polls in the JSON body, the photo, poll and preview flows in the sheet, the reply sheet, and voting.
On an iOS 27 simulator, signed in through a tunnel to a devnull running all four API branches:
:rocket:came back as 🚀 from devnull), and committed it.The camera itself can't be tried on a simulator. Screenshots 43 and 45 were taken before I stopped the reply sheet marking the draft it was handed as
stash@{0}.The last two show the pinned toolbar, checked after merging main, against a local devnull.
Closes the idea board's to-do #309 (the composer part; scheduling is separate) and covers #295's pending images.
🤖 Generated with Claude Code