Skip to content

feat(chat): send photos from the composer and show them in the chat - #1683

Merged
bmc08gt merged 7 commits into
feat/chat-media-composerfrom
feat/chat-media-ui
Oct 6, 2026
Merged

bmc08gt merged 7 commits into
feat/chat-media-composerfrom
feat/chat-media-ui

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

The photo UI on top of the transport and composer PRs, ported from
code-ios-app#959.

  • Attach menu: + grows into a menu card drawn in non-focusable windows
    above the keyboard, so the keyboard stays up. Back closes the menu only.
  • Camera: the menu card grows into a camera card, 58% of the screen tall.
    The camera starts while the menu is open, holds 30 fps, and a shot is
    staged as a chip at the shutter while the file is still being written.
  • Picker: Photos opens the system picker sheet; picks become chips and the
    keyboard comes back up.
  • Bubbles: photo bubbles with a BlurHash placeholder, upload progress,
    retry, and "This photo can't be displayed" for one that won't open. A
    sent photo keeps drawing while its row swaps to the stored copy.
  • Viewer: tapping a photo opens an overlay that grows out of the bubble;
    drag, close or Back shrinks it back into the bubble.
  • Replies: a quoted photo shows its thumbnail in the reply strip and in
    the quote panel, and a restored reply draft keeps it.
  • Capture files left behind by a killed run are deleted when a chat opens.

Stacked on #1682, which is stacked on #1681.

@bmc08gt bmc08gt self-assigned this Oct 5, 2026
@github-actions github-actions Bot added the type: feature New functionality label Oct 6, 2026
@bmc08gt
bmc08gt force-pushed the feat/chat-media-ui branch from 6556acd to eec1185 Compare October 6, 2026 00:58
@bmc08gt
bmc08gt force-pushed the feat/chat-media-ui branch from eec1185 to e3ef008 Compare October 6, 2026 01:19
@bmc08gt
bmc08gt force-pushed the feat/chat-media-ui branch from a97742c to 296c0fb Compare October 6, 2026 14:33
The photo UI on top of the transport and composer PRs, ported from
code-ios-app#959.

- Attach menu: + grows into a menu card drawn in non-focusable windows
  above the keyboard, so the keyboard stays up. Back closes the menu only.
- Camera: the menu card grows into a camera card, 58% of the screen tall.
  The camera starts while the menu is open, holds 30 fps, and a shot is
  staged as a chip at the shutter while the file is still being written.
- Picker: Photos opens the system picker sheet; picks become chips and the
  keyboard comes back up.
- Bubbles: photo bubbles with a BlurHash placeholder, upload progress,
  retry, and "This photo can't be displayed" for one that won't open. A
  sent photo keeps drawing while its row swaps to the stored copy.
- Viewer: tapping a photo opens an overlay that grows out of the bubble;
  drag, close or Back shrinks it back into the bubble.
- Replies: a quoted photo shows its thumbnail in the reply strip and in
  the quote panel, and a restored reply draft keeps it.
- Capture files left behind by a killed run are deleted when a chat opens.
The upload fill used CodeTheme.colors.brand, which Flipcash sets to
0xFF19191A, so it barely showed on the dark track. It now uses
ChatMediaBlue (0xFF0A84FF, UIKit's systemBlue in dark mode), as iOS does.
The camera's more dot shares the same constant.

The first camera shot flew toward the top of the screen. Its chip's
header row eases in from behind the field's clip, and boundsInRoot()
reports a fully clipped node as Rect.Zero, the window's top-left. The
landing target now comes from the chip's unclipped position and size.
Later shots were fine because the header row was already visible.
…drawn

A photo that finished uploading in the composer reaches Sent soon after the
tap, but the list scrolls the new bubble in about 450 ms later. On the Seeker
the bar showed for 2 frames of a 20 fps recording before it faded, so it read
as missing.

Once the overlay is drawn it now stays up for at least 600 ms before honouring
Sent. A bubble first drawn already sent still never shows it.
Only a failure a retry can't fix blocks the send now. A photo that failed
offline goes into the transcript as Sending and retries from there,
instead of holding the message in the composer.
@bmc08gt
bmc08gt force-pushed the feat/chat-media-ui branch from 296c0fb to f83d57f Compare October 6, 2026 14:52
Offline, the reaction refresh's RPC doesn't return. Its handler waited on
it inline, and the event bus has no buffer, so every event after it
queued until the network came back: a picked photo never reached the
composer. The refresh is launched now, as the read pointer's already is.
@bmc08gt
bmc08gt force-pushed the feat/chat-media-ui branch 2 times, most recently from 6556acd to 137124a Compare October 6, 2026 15:10
The capsule drew an empty track while the photo was encoding and before
the first bytes went up, so a slow start looked like no indicator at
all. Any phase without a byte count now slides the blue segment; the fill
follows the bytes once they report.
The fill eased to each byte report over 200 ms and then sat still until the next one, so a slow
upload moved in steps. It now follows the reports linearly over 450 ms, longer than the gap
between them, so it keeps moving. When the bytes finish it runs to the end of the track and
holds briefly before the moving segment takes over, instead of cutting from part-way.
@bmc08gt
bmc08gt added this pull request to stack #1685 October 6, 2026 16:08
@bmc08gt
bmc08gt merged commit 4faca0a into code/cash Oct 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant