Skip to content

feat(groups): rebuild the group profile to match iOS - #1703

Merged
bmc08gt merged 10 commits into
code/cashfrom
feat/group-profile-refresh
Oct 7, 2026
Merged

bmc08gt merged 10 commits into
code/cashfrom
feat/group-profile-refresh

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

Rebuilds the group profile on the shared profile components, matching code-ios-app#995 and the menu trim in #1000. Edit Group (cover, description, confirm dialogs) follows in a separate PR.

  • Header: cover, avatar, title and description from ChatMetadata, which ChatSubject.Group now carries along with isPrivate. Feed rows can arrive without a cover, so opening the profile calls refreshCover (a GetChat) when the cover is null. The member-count subtitle is gone, as on iOS.
  • Action row: an Edit Group capsule when permissions.canEdit, a Muted chip for members, and the share circle. Share opens the invite sheet for anyone, not only members; the link only needs the chat id, so shareableGroupInviteUrl drops the member check. The invite card inside the chat is unchanged.
  • Chatting: a 4-column grid from sampleChatters, with a badge on the creator, in server order. It's hidden for private groups and for an empty or failed sample. The sample loads when the group chat opens, so it's ready by the time the profile does. Tapping a person opens their profile with ProfileOrigin.GroupMember.
  • Balance Requirements card: Join and Chat rows (Chat falls back to Join) and a Your Balance row, from the conversation's rules.
  • Pinned bar: Join, Open Chat, "Buy $X of to Join" or "Buy $X of to Chat", with the requirement line above a Buy button and Leave Chat under the button for members. The E2EE footer moves out of the bottom bar.
  • Overflow: Encryption, Mute Notifications for members, a divider, then Report in red. Invite, Mute, Report and Leave are no longer rows in the body.
  • The content fades out at both edges with verticalScrollStateGradient, which gains start and end insets so the fade can stop at an opaque bar.

The CTA, requirements, shortfall and grid visibility are pure functions in GroupProfileState.kt, tested in GroupProfileStateTest against the iOS GroupProfileStateTests cases. A member short of the join minimum alone buys to chat, which relies on GroupAccess checking listener rules before speaker rules; the new unmetRequirements helper keeps that order.

Copy changes: "Leave Chat", the leave dialog and its failure copy, and the join failure title and descriptions now match iOS. Leave confirmation uses the info sheet instead of the error one.

…tfall

ChatSubject.Group now carries the description, cover picture and privacy
flag from ChatMetadata. The profile's pinned action, join/chat balance
rows and shortfall are pure functions, tested against iOS's
GroupProfileStateTests cases. GroupAccess gains unmetRequirements and
heldAgainst, the measurement the gate already used. GroupOperations gains
sampleChatters and refreshCover (a GetChat for feed rows with no cover).
Sample chatters each time the profile opens, name the tokens behind the join and chat rows,
and keep the pinned action's standing current as balances and rates move. Share builds its
link without the membership check so a non-member can hand the group out.
Cover, description, chatting grid, balance requirements card and a pinned join, buy, open
or leave action, with the overflow reduced to Encryption, Mute and Report.
…at both edges

The Chatting grid loaded when the profile opened, so it popped in after the
rest of the page. Sample chatters as soon as the group chat resolves, as iOS
does, and refresh them on each profile open.

The page now fades out under the status bar and into the pinned bar.
verticalScrollStateGradient gains start and end insets so the fade finishes at
the edge of an opaque bar instead of being drawn behind it. The Leave Chat
confirmation uses the info sheet.
@bmc08gt bmc08gt self-assigned this Oct 7, 2026
@github-actions github-actions Bot added area: ui Compose UI, theme, components, resources type: feature New functionality labels Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui Compose UI, theme, components, resources type: feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant