fix: Identifier menu UI and added delete confirmation dialog#2577
Conversation
📝 WalkthroughWalkthroughAdded three localized action strings, refactored action rendering to use an Actions sealed class with StringResource labels and ActionMenuRow, and introduced a staged delete-confirmation dialog flow for client identifiers. Changes
Sequence Diagram(s)sequenceDiagram
participant User as User
participant Screen as ClientIdentifiersListScreen
participant Dialog as DeleteConfirmationDialog
participant VM as ClientIdentifiersListViewModel
User->>Screen: open item menu / select "Delete"
Screen->>Screen: set dialogState = DeleteConfirmation(id, uniqueKey)
Screen->>Dialog: show dialog (dialogState)
User->>Dialog: confirm
Dialog->>VM: dispatch DeleteDocument(id, uniqueKey)
VM->>VM: perform delete, update state
VM->>Screen: emit deletion result
Screen->>Screen: clear dialogState
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In
`@core/ui/src/commonMain/kotlin/com/mifos/core/ui/components/MifosActionsListingCardComponent.kt`:
- Around line 115-119: The Icon call in MifosActionsListingCardComponent (the
Icon composable using imageVector = menuItem.icon) is decorative but uses
contentDescription = "" which keeps it in accessibility semantics; change it to
contentDescription = null to remove it from the accessibility tree so screen
readers ignore the decorative icon (update the Icon invocation in
MifosActionsListingCardComponent.kt where imageVector = menuItem.icon).
In
`@feature/client/src/commonMain/kotlin/com/mifos/feature/client/clientIdentifiersList/ClientIdentifiersListScreen.kt`:
- Around line 172-174: The DeleteDocument handler currently stages a delete
using (item.id ?: -1) which can produce an invalid -1 id; update the
Actions.DeleteDocument branch in the event handler (the code path that sets
itemToDelete and uses uniqueKeyForHandleDocument) to first check item.id != null
and only assign itemToDelete when id is non-null, otherwise ignore the action
(or surface no Delete option); apply the same null-guard pattern to the other
identical block referenced (the block around the other Actions.DeleteDocument
handling at the 203-209 area).

Fixes - Jira-#364
Description - Updated
MifosActionsListingCardComponentto use string resources, fixing the issue where raw class names likeViewDocumentwere shown in dropdown menus. Also added a reconfirmation dialog inClientIdentifiersListScreento avoid accidental document deletions and improve the overall user experience.Video -
Reconfirmation_Dialog.webm
Summary by CodeRabbit
New Features
UI Improvements
✏️ Tip: You can customize this high-level summary in your review settings.