feat: the "Founding members aren't admins" card goes (remove-founding-admins-card, Phase 1)

A founder missing from a keyed room's policy is now usually one the group
demoted or who stepped down, and the card's "Make them admins" offered to
undo that. The "not every founding member was invited" card stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kgothatso NgakoandClaude Opus 5.5 committed 2026-11-20 10:38:49 +02:00
1 parent 47eb485201
commit 1efe486e05
2 files changed
+6 -41

No files matched your search

@@ -530,10 +530,6 @@
<string name="if_they_have_stopped_answering_any_member_can_abandon">If they have stopped answering, any member can abandon the ceremony. No key is made, and the group can start again.</string>
<string name="open_the_room">Open the room</string>
<string name="admin">Admin</string>
<string name="founding_members_are_not_admins">Founding members aren't admins</string>
<string name="s_took_part_in_the_key_ceremony_but_are_not_admins">%1$s took part in the key ceremony that made this group, but this room doesn't list them as admins.</string>
<string name="make_them_admins">Make them admins</string>
<string name="founding_members_made_admins_requested">Asked the group to make them admins</string>
<string name="not_every_founding_member_was_invited">Not every founding member was invited</string>
<string name="s_took_part_in_the_key_ceremony_but_were_not_invited">%1$s took part in the key ceremony that made this group, but the invitation to this room never went out.</string>
<string name="invite_them">Invite them</string>
@@ -107,10 +107,6 @@ import mobi.giza.compose.resources.founding_members_invited
import mobi.giza.compose.resources.invite_them
import mobi.giza.compose.resources.s_took_part_in_the_key_ceremony_but_were_not_invited
import mobi.giza.compose.resources.not_every_founding_member_was_invited
import mobi.giza.compose.resources.founding_members_made_admins_requested
import mobi.giza.compose.resources.make_them_admins
import mobi.giza.compose.resources.s_took_part_in_the_key_ceremony_but_are_not_admins
import mobi.giza.compose.resources.founding_members_are_not_admins
import mobi.giza.compose.resources.admin
import mobi.giza.compose.resources.view_profile
import mobi.giza.compose.resources.run_by_members
@@ -260,7 +256,6 @@ fun ChatRoomDetailScreen(
val noKeyToRotate = stringResource(Res.string.rotation_no_key)
val keyStateRequested = stringResource(Res.string.key_state_requested)
val rotationHeldAfterRemoval = stringResource(Res.string.rotation_held_after_removal)
val madeAdminsRequested = stringResource(Res.string.founding_members_made_admins_requested)
val foundersInvited = stringResource(Res.string.founding_members_invited)
val foundersHaveNoKeyPackage = stringResource(Res.string.founding_members_have_no_key_package)
@@ -568,36 +563,10 @@ fun ChatRoomDetailScreen(
}
}
// The founding members, where the room is not as the
// ceremony that made its key left it: founders its
// policy does not list as admins, or founders its
// founding invite never reached. Under the key and the
// parent, because it is about the same thing -- who the
// group that made this room is. docs/robust-group-admins.md,
// Phase 5.
if (chatRoomDetailUIState.missingFoundingAdmins.isNotEmpty()) {
item {
FoundingMembersCard(
title = stringResource(Res.string.founding_members_are_not_admins),
body = stringResource(
Res.string.s_took_part_in_the_key_ceremony_but_are_not_admins,
chatRoomDetailUIState.founderNamesFor(chatRoomDetailUIState.missingFoundingAdmins),
),
// An admin of a room the app governs: the
// repair is a commit only they can make.
actionLabel = stringResource(Res.string.make_them_admins)
.takeIf { chatRoomDetailUIState.canGovern },
isActionPending = chatRoomDetailViewModel.isActionPending.value,
onAction = {
chatRoomDetailViewModel.addMissingFoundingAdmins(
localChatRoom = chatRoomDetailUIState.localChatRoom,
missing = chatRoomDetailUIState.missingFoundingAdmins,
) { failure -> notify(failure ?: madeAdminsRequested) }
},
)
}
}
// The founding members the founding invite never
// reached. Under the key and the parent, because it is
// about the same thing -- who the group that made this
// room is. docs/robust-group-admins.md, Phase 5.
if (chatRoomDetailUIState.uninvitedFounders.isNotEmpty()) {
item {
FoundingMembersCard(
@@ -1889,8 +1858,8 @@ private fun RotationRunningCard(running: SharesSummary.Running, onAbandon: () ->
/**
* Something about this room's founding members that is not as the ceremony
* left it -- founders it does not list as admins, or founders its invite never
* reached -- and, where this device can, the one action that repairs it.
* left it -- founders its invite never reached -- and, where this device can,
* the one action that repairs it.
*
* On the error container: the room works, but not as the group that made it
* agreed, and that is worth more than a supporting line. docs/robust-group-admins.md,