Skip to content

feat(deck): show loading feedback while deleting a deck - #13

Merged
jvsena42 merged 1 commit into
mainfrom
feat/loading-delete
Jun 18, 2026
Merged

feat(deck): show loading feedback while deleting a deck#13
jvsena42 merged 1 commit into
mainfrom
feat/loading-delete

Conversation

@jvsena42

Copy link
Copy Markdown
Owner

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 via deleteWithSessionRetry(). 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 — add isDeleting: Boolean = false to DeckDetailUiState.Content, set it true in onConfirmDelete() (same copy() that dismisses the dialog). The success path navigates away via the existing Deleted effect; failure replaces Content with Error, so the flag clears implicitly.
  • DeckDetailScreen — render a full-screen EchoLoadingScreen(message = "Deleting deck…") overlay when state.isDeleting, mirroring the existing initial-load overlay. It covers the content and blocks re-taps.
  • strings.xml — new deck_detail_deleting string.

Reuses the existing EchoLoadingScreen (cozy bouncing-dots loader); Deleted navigation and Error handling are unchanged.

Verification

  • ./gradlew :composeApp:assembleDebug ✅ builds clean
  • Manual: open a deck → delete → confirm. Bouncing-dots loader with "Deleting deck…" covers the screen until it navigates back (success) or shows the error screen (failure). Re-tapping during the wait is blocked by the overlay.

🤖 Generated with Claude Code

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>
@jvsena42
jvsena42 enabled auto-merge June 18, 2026 22:15
@jvsena42
jvsena42 merged commit e2801a1 into main Jun 18, 2026
2 checks passed
@jvsena42
jvsena42 deleted the feat/loading-delete branch June 18, 2026 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant