diff --git a/.claude/state/handoff.md b/.claude/state/handoff.md deleted file mode 100644 index b32687f62f..0000000000 --- a/.claude/state/handoff.md +++ /dev/null @@ -1,27 +0,0 @@ -# Handoff — group-chat Edit UI - -**Done and shipped.** [code-android-app#1525](https://github.com/code-payments/code-android-app/pull/1525), -stacked on #1524 (`feat/chat-roster-edit-rpcs`). Worktree `.claude/worktrees/edit-chat-ui`, -branch `feat/edit-chat-ui`, commit `e0479e2e9`. - -## Verified green -`:services:flipcash:compileDebugKotlin`, `:apps:flipcash:core:`, `:apps:flipcash:shared:chat:`, -messenger + tipping `testDebugUnitTest`, and `:apps:flipcash:app:assembleDebug` (the last one -proves the two new `@HiltViewModel`s wire up). 12 new tests, all ran. - -## Key decisions -- `canEdit` gate is passed in, never derived. `groupProfileOverflowItems(canEdit)` returns a list - so no-permission means no overflow button. -- `titleOnly` / `pictureOnly` in `PartialEdits.kt` encode "send only what changed" — EditChat - leaves unset fields alone, so an over-filled request is destructive. -- Title length counted in **code points** (protovalidate max_len semantics), on the trimmed value. -- Echo is idempotent: `TitleChanged`/`PictureChanged` carry absolute values, so persisting the - editChat response and then receiving the stream event writes the same thing. -- `moderationDescription` extracted from `CreateGroupViewModel` to `core/moderation`, unchanged. -- Built Icon + Name only; the other three node rows have no flipcash2 0.11.0 contract. -- Used repo `MenuList`/`ListItem` metrics (24dp/17sp), not the node's 26dp/20sp — flagged in the PR. -- Terminology: "Group", not the node's "Community". - -## Environment gotcha -`google-services.json` is gitignored and absent from fresh worktrees; copy it from the main -checkout (`apps/flipcash/app/`) before any `assembleDebug`. diff --git a/.gitignore b/.gitignore index 875a5863c7..1bc9b1800a 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ fastlane/report.xml .claude/worktrees/ .claude/plans/ +.claude/state/ .claude/settings.local.json # Bundler (Ruby gems installed during CI) diff --git a/apps/flipcash/core/src/main/res/values/strings.xml b/apps/flipcash/core/src/main/res/values/strings.xml index 52a0a97b6d..620954b09e 100644 --- a/apps/flipcash/core/src/main/res/values/strings.xml +++ b/apps/flipcash/core/src/main/res/values/strings.xml @@ -1060,10 +1060,10 @@ Change Group Name? - Everyone in this group will see it as \"%1$s\" + This will change the group name for everyone in it Change Name Change Group Picture? - Everyone in this group will see the new picture + This will change the group picture for everyone in it Change Picture Up to 64 characters diff --git a/apps/flipcash/features/messenger/src/main/kotlin/com/flipcash/app/messenger/internal/screens/profile/edit/EditGroupMenuItems.kt b/apps/flipcash/features/messenger/src/main/kotlin/com/flipcash/app/messenger/internal/screens/profile/edit/EditGroupMenuItems.kt index 1211b51f54..17dcbb7952 100644 --- a/apps/flipcash/features/messenger/src/main/kotlin/com/flipcash/app/messenger/internal/screens/profile/edit/EditGroupMenuItems.kt +++ b/apps/flipcash/features/messenger/src/main/kotlin/com/flipcash/app/messenger/internal/screens/profile/edit/EditGroupMenuItems.kt @@ -1,14 +1,12 @@ package com.flipcash.app.messenger.internal.screens.profile.edit -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.outlined.Image -import androidx.compose.material.icons.outlined.TextFields import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.painter.Painter -import androidx.compose.ui.graphics.vector.rememberVectorPainter +import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import com.flipcash.app.menu.FullMenuItem import com.flipcash.app.menu.MenuItem +import com.flipcash.core.R as CoreR import com.flipcash.features.messenger.R /** What the edit list can open. One entry per editable field on `EditChatRequest`. */ @@ -22,10 +20,13 @@ internal sealed interface EditGroupAction { * * Labelled Picture rather than the design's "Icon": it writes `EditChatRequest.picture`, and * picture is the word the rest of the app already uses for it. + * + * Wears the currency creator's icon glyph. That flow edits the same two fields on a token that this + * one edits on a group, so the pair reads as one idea rather than two. */ internal data object EditGroupPicture : FullMenuItem() { override val icon: Painter - @Composable get() = rememberVectorPainter(Icons.Outlined.Image) + @Composable get() = painterResource(CoreR.drawable.ic_currencycreator_icon) override val name: String @Composable get() = stringResource(R.string.title_editGroupPicture) @@ -39,10 +40,12 @@ internal data object EditGroupPicture : FullMenuItem() { * Not in node 10187:110373 — the design's four rows are Icon, Membership Card, Description and * Social Links — but `EditChatRequest.title` is one of exactly two fields the contract offers, so * the row exists and takes the picture row's styling rather than inventing its own. + * + * Wears the currency creator's name glyph, for the same reason the picture row wears its icon one. */ internal data object EditGroupName : FullMenuItem() { override val icon: Painter - @Composable get() = rememberVectorPainter(Icons.Outlined.TextFields) + @Composable get() = painterResource(CoreR.drawable.ic_currencycreator_name) override val name: String @Composable get() = stringResource(R.string.title_editGroupName) diff --git a/apps/flipcash/features/messenger/src/main/kotlin/com/flipcash/app/messenger/internal/screens/profile/edit/EditGroupNameViewModel.kt b/apps/flipcash/features/messenger/src/main/kotlin/com/flipcash/app/messenger/internal/screens/profile/edit/EditGroupNameViewModel.kt index eba7686f8f..36bea93cd2 100644 --- a/apps/flipcash/features/messenger/src/main/kotlin/com/flipcash/app/messenger/internal/screens/profile/edit/EditGroupNameViewModel.kt +++ b/apps/flipcash/features/messenger/src/main/kotlin/com/flipcash/app/messenger/internal/screens/profile/edit/EditGroupNameViewModel.kt @@ -107,10 +107,7 @@ class EditGroupNameViewModel @Inject constructor( BottomBarManager.showAlert( title = resources.getString(R.string.prompt_title_changeGroupName), - message = resources.getString( - R.string.prompt_description_changeGroupName, - ChatTitle.normalize(state.titleFieldState.text), - ), + message = resources.getString(R.string.prompt_description_changeGroupName), actions = listOf( BottomBarAction(resources.getString(R.string.action_changeGroupName)) { viewModelScope.launch {