Skip to content

fix(chat): apply speaker rules to replies and reactions, and match the never composer design - #922

Merged
bmc08gt merged 3 commits into
feat/share-profile-widgetfrom
fix/chat-never-composer
Sep 30, 2026
Merged

bmc08gt merged 3 commits into
feat/share-profile-widgetfrom
fix/chat-never-composer

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator

iOS offered Reply and reactions on every message in a chat the viewer can't speak in, and its never panel read "Messages can't be sent in this chat" instead of the design's copy. This aligns both with Android's code-payments/code-android-app#1631.

Stacked on #919, which added the widget's canSpeak gating.

  • Actions: MessageCapability.resolve drops Reply, and ChatItem.from drops reactions, from text, cash and widget messages when canSpeak is false or the viewer isn't a member. canSpeak comes from conversationGate(session:rules:rates:), the same check that decides whether the composer is live. Copy, Report and your own Edit/Delete are unchanged. DMs keep Reply.
  • never composer (node 10588:1969): ConversationGatePanel draws .readOnly(.never) as a pill reading "Only Flipcash can send messages", with no field or buttons. It's glass tinted with Color.backgroundMain at 0.46 to match the design's fill, at Metrics.boxRadius (12pt), and non-interactive. Below iOS 26 it falls back to the ultra-thin material with the same fill on top. Balance and staff panels are unchanged.
  • Tests: MessageCapabilityTests covers can-speak and cannot-speak for text and cash, your own messages, and a DM. NeverComposerRenderTests checks the sentence and renders the pill.

The render test writes a PNG only when TEST_RUNNER_NEVER_COMPOSER_PNG is set; Scripts/test.sh doesn't forward the unprefixed name.

@bmc08gt bmc08gt self-assigned this Sep 30, 2026
@bmc08gt
bmc08gt added this pull request to stack #923 September 30, 2026 17:08
…a never speaker rule

The never rule replaces the composer with a disabled, non-interactive Liquid Glass
capsule at the composer's height carrying one muted line, instead of the gate card
that said messages can't be sent. Balance and staff panels are unchanged.
capsuleGlassBackground gains an interactive flag (default unchanged); iOS below 26
keeps its ultra-thin material fallback.
…sage

MessageCapability.resolve now drops Reply from any message when the viewer cannot
speak, and ChatItem.from withholds reactions the same way, not only for widgets.
Copy, Report and the sender's own Edit/Delete are unchanged; a DM always passes.
The pill was a capsule of plain glass, lighter than the design. It is now non-interactive glass
in a RoundedRectangle at Metrics.boxRadius, tinted with backgroundMain at 0.46 (node 10588:1969).
Below iOS 26 the same fill lies over the ultra-thin material.
@bmc08gt
bmc08gt force-pushed the fix/chat-never-composer branch from 8b0bbfd to 0c30670 Compare September 30, 2026 17:11
@bmc08gt
bmc08gt removed this pull request from stack #923 September 30, 2026 17:14
@bmc08gt
bmc08gt added this pull request to stack #924 September 30, 2026 17:14
@bmc08gt
bmc08gt merged commit dfb7443 into main Sep 30, 2026
1 check failed
@bmc08gt
bmc08gt deleted the fix/chat-never-composer branch October 5, 2026 15:13
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