edge-cases

Implements loading, error, empty, and offline UI states for Jetpack Compose screens.

Updated May 9, 2026
One-click install
npx skills add https://github.com/Bumh3rr/solvyx-app --skill edge-cases-bumh3rr
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: edge-cases
Source: https://github.com/Bumh3rr/solvyx-app/tree/main/.opencode/skill/edge-cases
Command: npx skills add https://github.com/Bumh3rr/solvyx-app --skill edge-cases-bumh3rr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Screens that read external data (database, network, sensors) often show blank pages, raw stack traces, or permanent spinners when something goes wrong. This Skill provides ready-to-use patterns so every screen handles loading, error, empty, offline, permission-denied, and partial-data states with friendly Spanish-language feedback. ## Core Features & Use Cases - Composable state components: LoadingState, skeleton lists with shimmer, ErrorState with retry button, EmptyState with mascot illustration, offline and permission-denied screens. - Sealed UiState modeling: A sealed interface (Loading, Loaded, Empty, Error) with Crossfade transitions and PullToRefreshBox integration for pull-to-refresh flows. - Standardized error messages: A mapping table from exceptions (IOException, SQLiteException, TimeoutCancellationException, etc.) to user-friendly Spanish messages without technical jargon. - Use Case: When building a new screen that loads a list from Room or a remote API, apply this Skill to render a skeleton while loading, a retryable error view on failure, and a warm empty state when no data exists. ## Quick Start Apply the edge-cases skill to add loading, error, and empty states with retry to my Compose screen that loads items from the repository.

Frequently Asked Questions about edge-cases

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle loading and error states in Jetpack Compose?▼

Model screen state with a sealed interface (Loading, Loaded, Empty, Error) and render each branch in a when expression. Use CircularProgressIndicator or skeleton lists for loading, and an error composable with a retry button for failures.

How to show user-friendly error messages from Kotlin exceptions?▼

Map exception types to plain-language strings in a when expression: IOException becomes a no-connection message, SQLiteException a local data error, and unknown exceptions a generic fallback. Never display stack traces or technical codes to users.

What is the difference between empty state and error state in UI?▼

An empty state means the request succeeded but returned no data, so it should offer context and a possible action. An error state means loading failed and should provide a retry button. Treating them as the same state is an anti-pattern.

How do I add pull-to-refresh in Jetpack Compose Material3?▼

Wrap your content in PullToRefreshBox with isRefreshing bound to your UiState and onRefresh calling the ViewModel refresh function. Keep the loaded content visible while refreshing instead of replacing it with a full-screen spinner.

Why should decorative images have contentDescription set to null?▼

Setting contentDescription to null explicitly tells accessibility services like TalkBack to skip decorative images such as mascot illustrations. Omitting the attribute entirely can cause unpredictable screen reader behavior.