Repository navigation
feat(chat): render share-profile widget messages as a bubble - #919
Merged
Merged
Conversation
bmc08gt
added this pull request to stack #923
September 30, 2026 17:08
An error occurred while trying to automatically change base from
chore/flipcash2-3d6de707
to
main
September 30, 2026 17:08
Carry widget messages through ConversationMessage instead of dropping them. A share-profile widget draws a card with the person's avatar, name and handle (looked up by username through the link-card feed) and a Share button that opens the share sheet on their public profile link. Unrecognized widget variants render the existing unsupported bubble. Adds a localized-style preview line and persists widgets in the conversation cache (schema 44).
…on profile A widget naming the signed-in user's handle now skips the link-card lookup and uses the session profile's name and avatar. Widgets are server-sent, so they offer Reply only (no Report) and the chat-list preview no longer names a sender. Adds a rendering test for the card at the designed width.
… rule A share-profile widget has no author, so its Reply and reactions now follow the same conversationGate speaker verdict as the composer: a never rule, an unmet balance or an unmet staff requirement withholds both. Report stays off. The screen hands ConversationLoadCoordinator a canSpeak closure evaluated in the observation scope; MessageCapability.resolve and ChatItem.from take it.
ContactAvatarView takes an initialsColor (default unchanged); the widget passes textMain at 0.4, as the design draws them (node 10588:1979).
bmc08gt
force-pushed
the
feat/share-profile-widget
branch
from
September 30, 2026 17:11
fe01710 to
b0de3aa
Compare
bmc08gt
removed this pull request from stack #923
September 30, 2026 17:14
bmc08gt
added this pull request to stack #924
September 30, 2026 17:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Renders the share-profile widget (
messaging.v1.WidgetContent.share_profile) as a chat bubble, following Figma node 10588:1979. Builds on #916 (merged), which brings in the 0.13.0 contract and theShareProfileWidgetdomain struct.Only the server sends widgets. The widget's
usernamedecides whose profile the card shows and shares:OwnProfileCard, built inConversationScreenfrom the session profile andprofileAvatars, with no lookup.LinkCardSource/linkCardFeed) with loading and not-found states. Until that answers, the@handlestands in for the name.Changes:
ConversationMessage.Content.widgetis.shareProfileor.unrecognized.ConversationMessage.initno longer drops widgets. An unrecognized variant renders the existing "Update Flipcash to see it" bubble.Database.schemaVersiongoes from 43 to 44, since older builds can't read that kind.TipCodeShareItempath asUserProfileScreen.share().URL.tipcard(for:username:)now delegates to the newUsername.profileURL..widgetis not encodable inasProto(), and a decrypted widget staysDecryptFailure.unsupported, becauseEncryptedContentallows only text, media and reply. There is no Report. Reply and reactions follow the chat's speaker rules throughconversationGate(session:rules:rates:), the same check that decides whether the composer is live: a DM or a chat you can speak in allows both, whilenever, an unmet balance or staff requirement, or not being a member removes both. The in-card Share button is not gated.@handle, since it has no lookup.BubbleBackgroundViewchrome,.appTextLarge/.appTextCaption,ContactAvatarViewwith the initials muted to 40% (newinitialsColorparameter, default unchanged), and a.filledCompactbutton (44pt, 6pt radius). The card measures about 204pt tall against the design's 207.ShareProfileWidgetRenderTestslays out the realChatShareProfileCellin a window and checks its size. It writes a PNG whenSHARE_PROFILE_WIDGET_PNGis set.ShareProfileWidgetGatingTestsruns realConversationRulesthroughconversationGatefor the open,never, unmet-balance and unmet-staff cases.