Skip to content

feat(chat): show the received bill when cash arrives in the open chat - #1245

Merged
bmc08gt merged 1 commit into
mainfrom
feat/chat-cash-bill
Nov 9, 2026
Merged

bmc08gt merged 1 commit into
mainfrom
feat/chat-cash-bill

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

When someone sends me cash while the chat is open, the received bill now appears over the chat. Until now the cash only landed as a bubble in the thread.

A cash message qualifies when it arrives on the live stream, I am a receiver and not the sender, and the chat is in the foreground with nothing presented over it. That covers 1:1 sends, my share of a group send, tips, request payments and Send Back returns. The amount shown is my share. Catch-up, GetDelta and the initial load never raise a bill.

  • Keyboard. If the keyboard is up when the cash arrives, it is lowered for the bill and raised again when the bill closes, by swipe or Put in Wallet. The draft is kept. It is not raised if the bill closed because the app went to the background.
  • One bill at a time. The first qualifying payment wins. Payments that arrive while a bill is preparing or showing are dropped, with no queue.
  • Skipped when covered. Any sheet, the media viewer, another bill, or the chat itself inside a sheet means no bill. A payment that arrives before the verified state is loaded is also not billed.
  • No deposit toast. Put in Wallet closes the bill and leaves me in the chat, with no wallet navigation or animation. The bill stays re-grabbable like today's received bill.
  • Haptic. The receive haptic still fires once; it is skipped for the message that raised the bill so it does not double up.
  • Flag. Chat Cash Bill in Beta Features, public and on by default, so it can be turned off.

The trigger decision is a pure function in FlipcashCore (ChatCashBill), with ChatCashBillController in the app handling phase, keyboard and the bill. A DEBUG-only trigger feeds a synthetic $1.00 payment into the open chat: xcrun simctl spawn <udid> notifyutil -p flipcash.debug.chatCashBill. It is never stored and is compiled out of release builds.

The shared spec is docs/specs/chat-cash-bill.md in the orchestrator repo.

A cash message on the live stream that pays me, in the chat on screen with nothing over it, now
presents the received bill (no deposit toast, Put in Wallet stays in the chat). The keyboard is
lowered for the bill and raised again when it closes, unless the app was backgrounded.

The decision is a pure function in FlipcashCore (ChatCashBill). A second payment is dropped while
one bill is preparing or showing. The chat's receive haptic is skipped for the billed message.
Behind the Chat Cash Bill beta flag, public and on by default.
@bmc08gt bmc08gt self-assigned this Nov 9, 2026
@bmc08gt
bmc08gt marked this pull request as ready for review November 9, 2026 21:39
@bmc08gt
bmc08gt merged commit 8994efe into main Nov 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant