Skip to content

fix(messenger): remove bottom bar flash and scale-down on chat open - #1159

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/chat-bottom-bar-flash
Jul 27, 2026
Merged

fix(messenger): remove bottom bar flash and scale-down on chat open#1159
bmc08gt merged 1 commit into
code/cashfrom
fix/chat-bottom-bar-flash

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Problem

The Send $ button and message input box visibly flashed and resized when entering a chat from the DM feed — the bar loaded a full-width "Send $" button that then crossfaded and scaled down to the pill + input layout.

Root cause

typingConstraints.enabled starts false and only resolves a frame or two after the screen opens, once Room confirms whether the chat has a cash message. The bottom bar's AnimatedContent rendered the default false layout first, then animated the false → true transition — producing the visible flash and full-width→pill resize.

Fix

  • Add a resolved flag to TypingConstraints, false until the async typing-enabled query answers at least once.
  • Hold the bottom bar invisible but measured (alpha 0) until resolved, then reveal the final layout directly. Because the bar stays measured, SubcomposeLayout still reserves its height and the message list padding never jumps.
  • Use a snap transitionSpec (no crossfade / size transform) since the only layout change is the hidden initial resolution. The SendCashButton's own color/label springs still animate the typing interaction.
  • Fresh contacts have no chatId, so the observeMessages-driven typing flow never fires. Dispatch TypingEnabled(false) explicitly in that branch so those chats resolve and the bar can't stay hidden forever.

Testing

  • ./gradlew :apps:flipcash:features:messenger:compileDebugKotlin — passes.
  • Manual: open a chat from the DM feed — the Send $ pill and input box appear together in final form, no flash or scale-down. Open a brand-new contact — the full-width Send $ button still renders correctly.

The Send $ button and message input flashed/resized when entering a chat
from the DM feed. typingConstraints.enabled starts false and only resolves a
frame or two after open, once Room confirms whether the chat has a cash
message. The bar rendered its default full-width layout first, then
crossfaded and scaled down to the pill + input.

Add a resolved flag to TypingConstraints (false until the async query answers
once) and hold the bottom bar invisible-but-measured via alpha until resolved,
then reveal the final layout directly with a snap transition. Height stays
reserved so the message list padding never jumps. Fresh contacts have no
chatId (the observeMessages typing flow never fires), so dispatch
TypingEnabled(false) explicitly to resolve them and avoid a permanently
hidden bar.
@github-actions github-actions Bot added the type: fix Bug fix label Jul 27, 2026
@bmc08gt
bmc08gt merged commit 06024e1 into code/cash Jul 27, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the fix/chat-bottom-bar-flash branch July 27, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant