Repository navigation
feat(chat): render the share-profile widget bubble - #1628
Merged
Merged
Conversation
bmc08gt
added this pull request to stack #1632
September 30, 2026 17:10
Draws WidgetContent.ShareProfile as a card with the sender's avatar, name and
handle, and a Share button that runs the same share-link flow as the You tab.
The name and picture come from the signed-in user's session profile, since the
widget only ever describes them. An unrecognised widget variant draws as the
existing unsupported-message bubble.
The chat list previews a shared profile as "Shared a profile" ("You shared a
profile" for the viewer's own).
Widgets are sent by the server, never by a client. Give them no message actions or reactions (as with system notices), use one sender-independent list preview, and make encoding a widget an error.
The widget carries only a username, which now decides whose profile the card shows and shares. The signed-in user's own comes from the session; anyone else's goes through the by-handle lookup that person link cards use. Until it answers, or if it fails, the card shows the username and its initials, and Share stays off because it needs the resolved id.
A widget stays free of Copy and Report, but Reply and reactions now follow whether the viewer may speak. canSpeak evaluates the speaker rules (never, minimum balance, staff) with the predicate the listener gate already uses. A reply that quotes a widget reads 'Shared a profile'.
bmc08gt
force-pushed
the
feat/share-profile-widget
branch
from
September 30, 2026 17:15
8c9d37d to
dbb7a77
Compare
bmc08gt
removed this pull request from stack #1632
September 30, 2026 17:15
bmc08gt
added this pull request to stack #1633
September 30, 2026 17:15
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 #1625 (merged), which brings in the 0.13.0 contract and the domain model this builds on.Only the server sends widgets. The widget's
usernamedecides whose profile the card shows and shares:Own username: the bubble uses the
LocalUserManagerprofile, with no lookup.Any other username: it resolves through the same by-handle lookup as
@handlementions (LinkCardResolver/UserLinkLookup). While that runs, the username stands in for the name with shimmer. If it fails or finds nobody, the username stays as the name.Share: the new
ChatAction.ShareProfile(userId, username, displayName)presentsShareable.TipCard, the same shape asrememberProfileShare. It is disabled until the user resolves, since there is no userId to share before that.Unknown widget variants: these render the existing
UndecryptableBubblewith the update-app hint.Chat list preview: "Shared a profile".
Chat rules: Reply and reactions on a widget follow the chat's speaker rules. The new
canSpeak(rules, balances, isStaff)inGroupAccess.ktshares a per-requirement check with the listener gate, soMinimumBalance,StaffandNevermean the same thing in both. A viewer who can speak gets Reply and reactions. Anyone else, or anyone outside the group, gets neither. There is no Copy or Report, since the server sends widgets, and encoding one inLocalToProtobufis anerror(...). For now the speaker gate applies to widgets only: text and cash messages, and the composer, still ignore speaker rules.Reply quote: quoting a widget reads "Shared a profile".
Styling: existing tokens and components throughout (
bubbleShape,ContactAvatar,CodeButton). Where they differ from the Figma: the outline is 8% white instead of 7%, and the avatar gradient comes from the app'scontactAvatartoken.Visibility:
BubbleinMessageBubble.ktis nowinternalinstead ofprivate, so the widget can reuse it.ShareProfileWidgetScreenshotTestrenders the own, other-user and lookup-failed states with Robolectric, followingUndecryptableBubbleScreenshotTest.