Skip to content

fix(chat): no reaction alert pill for the open chat - #1138

Merged
bmc08gt merged 1 commit into
mainfrom
fix/chat-reaction-alert-active-chat
Oct 27, 2026
Merged

bmc08gt merged 1 commit into
mainfrom
fix/chat-reaction-alert-active-chat

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Reaction and boost alerts: no pill for the open chat

The in-app reaction/boost pill shows for a reaction on one of your messages in the chat you are
looking at, whenever that message is scrolled off screen. It is labelled "This chat ↓" and tapping
it scrolls to the message. It should not show at all: the pill is for activity in chats you are
not in.

Both platforms ship the same behaviour today, added in code-android-app#1857 and code-ios-app#1134:

Platform Gate Today
Android ReactionAlertController.offer (shared/chat/.../alerts/ReactionAlertController.kt:110) drops the event only when chatId == activeChat && messageId in onScreen
iOS ReactionAlertPlacement.decide (FlipcashCore/.../Models/Chat/ReactionAlert.swift:99-105) open chat + on screen → .bubbleOnly; open chat + off screen → .pill(.thisChat)

System pushes are not affected. Both platforms already suppress a chat push for the open chat
(Android NotificationService.kt:321, iOS NotificationPresentation.presentationDecision).

Behaviour

"Open chat" means the chat screen is showing in the foreground. On Android that is the
activeChat reported through ReportVisibleToReactionAlerts; on iOS it is
ConversationController.visibleConversationID.

  1. A reaction or boost in the open chat raises no pill, whether or not the message is on
    screen. On iOS an on-screen message still gets its bubble animation (.bubbleOnly). An
    off-screen message gets nothing; the reaction is in the transcript when the user scrolls to it.
  2. A reaction or boost in any other chat raises the pill exactly as today: chat name on the
    top row, tap opens that chat at the message.
  3. Opening a chat clears its pills. When a chat becomes the open chat, a pill showing for that
    chat closes, and queued pills for that chat are dropped. Pills for other chats stay queued and
    show in order.
  4. Backgrounded, signed out, own reactions, removals, reactions on others' messages: unchanged.

Removed

The "This chat ↓" variant can no longer be reached. Remove it on both platforms, so neither keeps
a path that later code could reconnect:

  • iOS: the ReactionAlertPlacement.Label.thisChat case, its switch arm and the "This chat ↓"
    literal in ReactionAlertController.swift:121, and the scrollToMessage branch of tapped
    together with whatever the conversation screen sets it from.
  • Android: ReactionAlertState.inActiveChat, refreshActiveChatFlag,
    ReactionAlertAction.ScrollTo, the MessengerScreen collector for it, the alert_thisChat
    string and the pill's branch for it, and any screenshot-test variant that renders it.

Copy

No new copy. "This chat ↓" (alert_thisChat on Android) is deleted.

Test cases

Both platforms cover every row at the unit level: Android in ReactionAlertControllerTest, iOS in
ReactionAlertTests (ReactionAlertPlacement) plus the controller wherever it is testable.

# Open chat Event chat Message on screen Expected
1 A A yes no pill (iOS: .bubbleOnly)
2 A A no no pill (iOS: .bubbleOnly) — was "This chat ↓"
3 A B n/a pill, chat name
4 none A n/a pill, chat name
5 none → A while A's pill is showing — — A's pill closes
6 none, pills queued for A then B → open A — — A's queued pill dropped, B's shows next
7 A, boost (BOOSTED) on own message A no no pill
8 A, boost on own message B n/a pill with boost amount

Rows that break today and must be updated, not deleted: Android
off screen message in the open chat shows with this chat label (becomes row 2) and
tap in the open chat scrolls, elsewhere opens (keeps only the "elsewhere opens" half). iOS
ReactionAlertTests.swift:125 (becomes row 2).

Android counterpart: code-payments/code-android-app#1861

A reaction or boost on a message in the open chat raised a "This chat ↓"
pill whenever the message was scrolled off screen. ReactionAlertPlacement.decide
now returns .bubbleOnly for the open chat regardless, and the thisChat case, its
literal, the on-screen lookup and the tap-to-scroll path are removed.

Opening a chat also closes its showing pill and drops its queued pills; pills for
other chats stay queued in order.
@bmc08gt bmc08gt self-assigned this Oct 27, 2026
@bmc08gt
bmc08gt marked this pull request as ready for review October 27, 2026 15:58
@bmc08gt
bmc08gt merged commit c25a65a into main Oct 27, 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