Skip to content

fix(chat): show unreadable messages as a "needs a newer version" bubble - #1770

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/unsupported-message-hint
Oct 14, 2026
Merged

bmc08gt merged 1 commit into
code/cashfrom
fix/unsupported-message-hint

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

An incoming message with a content type this build doesn't know rendered as an empty text bubble, because the mapper turned it into Text(""). It now maps to MessageContent.Unsupported and draws the same "needs a newer version" bubble as an unknown widget.

  • Unsupported is stored as a new "unsupported" subtype in the existing content JSON column, so there's no Room schema change.
  • The bubble copy changes from "Update Flipcash to see it" to the redesign's title and "Update Flipcash to see new messages like this" (component 11420:13397). Updating doesn't bring this message back, since what arrived isn't kept in a form a newer build could decode.
  • The bubble takes an optional action label and callback for an "Update Flipcash" capsule. Nothing passes one here; feat(appupdates): show a one-time toast when an optional update is out #1771, stacked on this, wires it.
  • Where Figma and the app's incoming bubble differ, the incoming bubble wins: its fill, corner radius and 12dp horizontal padding rather than #2B2B2B, 18 and 14. The design's dashed outline stays.

The old bubble said "Update Flipcash to see it", but updating doesn't
render that message: what arrived isn't kept in a form a newer build
could decode. The redesign (component 11420:13397) says the update
covers messages like it and this one stays hidden.

An unknown content type used to map to Text(""), so it showed as an
empty text bubble. It now maps to MessageContent.Unsupported, stored
as a new "unsupported" subtype in the existing content JSON column (no
Room schema change), and draws the same bubble as an unknown widget.
unsupportedContentHint picks UpdateApp for both cases, and the view
model passes it to every branch that draws the bubble.

The bubble takes an optional action label and callback for an "Update
Flipcash" capsule. Nothing passes one yet; it waits on the update check.

Where Figma and the app's incoming bubble differ, the incoming bubble
wins: its fill, corner radius and 12dp horizontal padding, instead of
#2B2B2B, 18 and 14. AskToResend and TrySendingAgain keep their current
look.
@bmc08gt bmc08gt self-assigned this Oct 14, 2026
@github-actions github-actions Bot added area: network gRPC, connectivity, API, exchange rates type: fix Bug fix labels Oct 14, 2026
@bmc08gt
bmc08gt added this pull request to stack #1779 October 14, 2026 19:32
@bmc08gt
bmc08gt merged commit 26d9b63 into code/cash Oct 14, 2026
3 checks passed
bmc08gt added a commit that referenced this pull request Oct 16, 2026
…nt on its card

code/cash added MessageContent.Unsupported (#1770), which left the card's body
mapping non-exhaustive. The card has no way to draw it, so it falls back to the
attachment line, like a widget or system message.
bmc08gt added a commit that referenced this pull request Oct 16, 2026
…1774)

* feat(messenger): draw message links as a card of the linked message

A link to /chat/{id}/m/{seq} now gets its own card instead of the
group invite card. What the card shows depends on the viewer:

- in the chat: the message, opened through the chat's own path so a
  private group's message is decrypted on device, and its reaction count
- a public group they aren't in: GetMessage in FULL_OR_REDACTED; a
  redacted body is drawn blurred and offers Buy
- a private group they aren't in: the group's record and Request
- a DM they aren't in: that it is one

A deleted or missing message, or a chat the server doesn't have, is
Unresolved. Unknown membership is read as not a member, so the card
never shows more than the server would hand a stranger.

Card states follow Figma node 11396:118, values node 11493:201.

* fix(chat-ui): cover redacted message text where blur is unavailable

Modifier.blur draws nothing below Android 12 and minSdk is 29, so on
Android 10 and 11 the redacted excerpt would show in plain text. Cover it
with a solid block there instead.

Adds a Robolectric test that renders every card state to
build/screenshots/message_link_card.png for comparison with the design.

* fix(chat-ui): size a message card at the cash card's width

The card filled the transcript bubble width, so it ran wider than a cash
card and changed width against nothing. It now takes the cash card's
fraction of the row in every state, on the sender's side.

* feat(chat-ui): match iOS message card type, names and photos

- Byline, footer and the "Public group" kind draw in white 60%; the header
  avatar grows to 24dp.
- The author falls back from the roster to a profile the app already has, then
  a profile fetch, then "Someone".
- A photo message draws a 56dp thumbnail beside its caption and no "Photo"
  label without one. A reader outside the chat's rules gets no blob, so the
  thumbnail draws its BlurHash only.

* feat(chat-ui): show a linked cash link as its payment on the message card

When the linked message is only a send.flipcash.com link, the card reads
"<author> sent a cash link", shows the amount in the cash card's large
type and its claim state in the footer, matching iOS #1057. A cash link
with other text around it, or a redacted message, stays an excerpt.

* feat(chat-ui): match iOS's reworked message card

The card now leads with one identity row: a 32dp avatar beside the chat
name over "Author · time", with a chevron in place of the "Open" text when
the card opens. The excerpt is 15sp medium at 88% white, up to four lines,
with line breaks folded to spaces. A photo sits to the right of its
caption, or alone at the start when it has none.

The byline time follows iOS: now, 45m, 2h, Yesterday, Oct 9, then
Oct 9, 2025 for earlier years.

A link to a deleted message now names its chat and says "This message
was deleted." instead of resting on the skeleton.

* fix(messenger): show a link to a message that's gone as deleted

A message GetMessage reports NotFound in a chat it does have drew the
loading skeleton forever. iOS draws the deleted card for a nil message
(MessageLinkLookup.swift), so the lookup now does the same, and a message
carrying any Deleted content counts, not only a lone one.

* fix(messenger): load a message card's photo when its rendition has no metadata

A photo rendition can arrive with its blob id but no blob metadata, as on the
Test B DM photo in XCTests. Every rendition picker skips those, so the card had
no photo and no BlurHash and drew an empty square. Fall back to the first
rendition, as the transcript bubble does; the loader fetches it by id.

* fix(messenger): show a message this version can't read as an attachment on its card

code/cash added MessageContent.Unsupported (#1770), which left the card's body
mapping non-exhaustive. The card has no way to draw it, so it falls back to the
attachment line, like a widget or system message.
@bmc08gt
bmc08gt deleted the fix/unsupported-message-hint branch October 23, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: network gRPC, connectivity, API, exchange rates type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant