Skip to content

Show error and empty states in Android example app#1188

Merged
jkmassel merged 1 commit intoadd/android-data-screensfrom
add/example-app-error-states
Feb 24, 2026
Merged

Show error and empty states in Android example app#1188
jkmassel merged 1 commit intoadd/android-data-screensfrom
add/example-app-error-states

Conversation

@jkmassel
Copy link
Contributor

Summary

  • Add shared ErrorMessage and EmptyState composables with WpRequestResult.errorDescription() for human-readable error messages
  • Add error StateFlow to all 16 view models to capture API failures instead of silently discarding them
  • Update all 16 screens to show error messages when requests fail and empty state text when results are empty
  • Paginated screens preserve existing data on loadMore() errors

Depends on #1187.

Test plan

  • Android example app builds (./gradlew :example:composeApp:assembleDebug)
  • Verify error messages appear when API requests fail (e.g. with invalid credentials)
  • Verify empty state text appears for screens with no data

🤖 Generated with Claude Code

@jkmassel jkmassel force-pushed the add/request-context-in-errors branch from 9807ec5 to e3a0814 Compare February 24, 2026 22:43
@jkmassel jkmassel changed the base branch from add/request-context-in-errors to add/wpcom-oauth February 24, 2026 22:43
@jkmassel jkmassel changed the base branch from add/wpcom-oauth to add/android-data-screens February 24, 2026 23:01
Add shared ErrorMessage and EmptyState composables with a
WpRequestResult.errorDescription() extension for human-readable
messages. Surface API errors and empty-but-successful results
across all 16 screens via a new error StateFlow in each view model.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jkmassel jkmassel force-pushed the add/example-app-error-states branch from 0976ed6 to 45ca4a8 Compare February 24, 2026 23:02
@jkmassel jkmassel merged commit 45ca4a8 into add/android-data-screens Feb 24, 2026
2 of 15 checks passed
@jkmassel jkmassel deleted the add/example-app-error-states branch February 24, 2026 23:07
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