feat(deck): show loading feedback while deleting a deck - #13
Merged
Conversation
Deleting a deck sweeps every card, the manifest, all media blobs, SRS records, and tag records over the network, which takes noticeable time. Previously the UI gave no feedback between confirming and navigating away, so the action felt unresponsive and could be double-fired. Add an isDeleting flag to DeckDetailUiState.Content, set it when the delete starts, and render a full-screen EchoLoadingScreen overlay while it's in progress. Success navigates back via the existing Deleted effect; failure falls through to the existing Error state. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Adds a blocking loading indicator while a deck is being deleted.
Why
DeckRepositoryImpl.delete()sweeps everything under the deck root over the network — every card record, the manifest, every media blob, SRS records, and pubky.app tag records — each viadeleteWithSessionRetry(). On a real homeserver this takes noticeable time. Previously the UI gave zero feedback between confirming the delete and the screen navigating away: the action felt unresponsive and the delete could be double-fired.How
DeckDetailViewModel— addisDeleting: Boolean = falsetoDeckDetailUiState.Content, set ittrueinonConfirmDelete()(samecopy()that dismisses the dialog). The success path navigates away via the existingDeletedeffect; failure replacesContentwithError, so the flag clears implicitly.DeckDetailScreen— render a full-screenEchoLoadingScreen(message = "Deleting deck…")overlay whenstate.isDeleting, mirroring the existing initial-load overlay. It covers the content and blocks re-taps.strings.xml— newdeck_detail_deletingstring.Reuses the existing
EchoLoadingScreen(cozy bouncing-dots loader);Deletednavigation andErrorhandling are unchanged.Verification
./gradlew :composeApp:assembleDebug✅ builds clean🤖 Generated with Claude Code