GeezerVison is showing github.com — feat(mobile): message images and file cards match web's collage by incognitojam · Pull Request #1349 · incognitojam/styal
Conversation
Web shows several images in a message as one rounded collage split by hairlines, with every image visible. Mobile drew separate square tiles, hid everything past the fourth behind a +N count, and let a lone portrait image take more than a full screen.
Upstream already has this collage on mobile: pingdotgg#27373. The fork kept its own grid when it imported that PR, so this takes upstream's UserMessageMedia collage rather than writing a new one.
On mobile now, for ordinary user messages:
- One image: keeps its own shape at web's fixed 192px height, between 96px wide and the bubble's width. The row keeps its height when the image loads. Upstream mobile still shows this large, so this part follows web, not upstream.
- Several images: 320px wide. Two sit side by side, three use a 3:2 layout, and four or more use 96px rows of two, with an odd last image spanning the row. There is no limit or
+N count. The smallest tile is about 128×96, and the whole tile is the tap target.
- Images and files with text: the media sits above the bubble with chips for the files in the text, and the corner where they meet tightens to 6px.
- Files without text: web's borderless bubble-coloured cards, without the chevron. Tap opens and the 44px download button stays. Files inside a text bubble or an assistant reply keep their existing card.
Folded agent, guest and assistant messages keep the fork's grid and +N count, and the ledger entry now covers only those.
The layout rules are not in packages/client-runtime. Web writes them as CSS grid classes and mobile as nested rows, so only a few count checks could be shared, and that would change both an upstream web file and the upstream collage on every intake.
Differences from web that remain:
Verification
On a Pixel 7 emulator (Android 17) with synthetic messages sent through the web composer to an unseeded dev server:
- Layouts: one image, a portrait image with text, 2, 3, 4, 5 and 6 images, images with files and text, and three files alone all match web at the same width. I checked the mix and the file cards in light appearance too.
- Images: tapping
six-5 opened the gallery at that image, and swiping moved to six-6.
- Generic files:
notes.md opened in the attachment viewer, report.pdf in the PDF viewer, archive-data.bin in Android's "Open with" sheet, and its download button opened the share sheet.
Not verified:
- iOS was not run.
- The pending state of an image still uploading was not exercised. It goes through the same collage code.
- Videos were not re-tested.
|
|
| Portrait image |
 |
| Three and four images |
 |
| Five images |
 |
| Images with files, and files alone |
 |
Written by an agent (Claude Code, claude-opus-5-5).
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
A message's images now form one rounded shape split by hairlines and show every image, a lone image takes web's fixed 192px height, the corner where media meets the text bubble tightens, and files sent without text use web's borderless cards. Folded agent, guest and assistant messages keep the fork's grid.
Fork-Feature: mobile-message-image-grid
Upstream divergence
Both sides are compared with upstream at the in-order tip 716e1c071c. Excludes .repos/ and pnpm-lock.yaml.
| Measure |
Base |
This PR |
Change |
| Upstream files the fork changes |
2,055 |
2,055 |
0 |
| Lines changed in them |
122,320 |
122,276 |
−44 |
| Upstream files the fork removes |
64 |
64 |
0 |
| Fork-only files |
877 |
877 |
0 |
| Fork-only lines |
155,670 |
155,711 |
+41 |
Upstream files whose difference changes (1)
| File |
Change |
Now differs by |
apps/mobile/src/features/threads/ThreadFeed.tsx |
−44 |
635 lines |
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Android preview
The preview download was removed because this PR closed or the preview label was removed.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This branch was successfully deployed
1 active
deployment
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|