Show attachment counts in the compact composer - #3180
Merged
Merged
Conversation
Contributor
|
I independently verified this fix on the latest
This addresses both symptoms: the composer collapsing after an image upload and the attachment controls being unmounted before the image can be removed. |
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.
Human comments
What was wrong
After selecting files on mobile, focus loss collapses the follow-up composer. Compact layout previously omitted all attachment UI, so successful uploads appeared to have failed until the editor was focused again (#3177).
What changed
Compact composers now show a paperclip and the total attachment count beside the draft text in the existing single row. The indicator has an accessible singular/plural label and no removal button. Focusing the composer exposes the existing image previews and file removal controls. Removing a focused attachment explicitly blurs its button before unmount so the composer can settle back to compact layout.
This replaces the original PR's forced-expansion approach: attachments remain visible as a count without keeping the editor expanded. No SDK, CLI, stored-data, or wire contract changes; no host-daemon protocol bump is required.
How you verified
pnpm start:worktree: 50px compact row with draft text, accessible “2 attachments” indicator, zero compact removal controls, expansion for removal, count update to one, and clearing the count after final removal.Fixes #3177