-
Notifications
You must be signed in to change notification settings - Fork 0
ui states
github-actions[bot] edited this page Jul 3, 2026
·
1 revision
Every data-driven screen in ɳTask implements a 7-state pattern. This document describes each state and which screens implement it.
| State | When | Component |
|---|---|---|
loading |
First fetch in progress, no cached data |
SkeletonList — 10 animated placeholder rows |
empty |
Fetch complete; zero items returned |
EmptyState — icon + message + optional CTA |
error |
Server/network error; no cached data |
ErrorCard — message + retry button |
populated |
Items available (online or cached) |
FlashList / FlatList with RefreshControl
|
offline |
isConnected === false |
OfflineBanner at top; cached data still shown |
permission-denied |
Auth error (401/403/jwt) |
PermissionDenied — reconnect to nSelf server |
rate-limited |
GraphQL rate limit (429) |
RateLimitedCard — live countdown timer |
Shows task lists (projects). Implements all 7 states.
- Loading:
SkeletonList(6 rows, rowHeight=72) - Empty: "No lists yet — Tap + to create your first list"
- Error:
ErrorCardwith retry - Populated:
FlatListwith list cards +RefreshControl - Offline:
OfflineBannerat top; lists still visible from urql cache - Permission-denied:
PermissionDenied - Rate-limited:
RateLimitedCard
Shows tasks within a list. Implements all 7 states. Uses FlashList for virtualization.
- Loading:
SkeletonList(10 rows, rowHeight=60) - Empty: "No tasks yet — tap + to create your first task"
- Error:
ErrorCardwith retry - Populated:
FlashList(estimatedItemSize=60) withTaskCardrows - Offline:
OfflineBanner+ locally cached tasks; new tasks show as pending - Permission-denied:
PermissionDenied - Rate-limited:
RateLimitedCard
When creating a task online:
- Task appended immediately to list with
pending: true. -
TaskCardrenders with 55% opacity, spinner, and "Saving…" label. - On server success: pending task removed; real task appears via
refetch(). - On server error: pending task removed; Alert shown with "Task not saved — Retry" option.
When creating a task offline:
- Task appended with
pending: true(same UI). - Mutation enqueued in MMKV offline queue.
- On reconnect: queue flushed; task confirmed or retry logic applied.
| File | State |
|---|---|
OfflineBanner.tsx |
Offline — animated fade, shows queue count |
SkeletonList.tsx |
Loading — pulsing placeholder rows |
EmptyState.tsx |
Empty — icon + title + optional CTA button |
ErrorCard.tsx |
Error — message + retry |
RateLimitedCard.tsx |
Rate-limited — live countdown |
PermissionDenied.tsx |
Permission-denied — reconnect prompt |
All components are accessible (accessibilityRole, accessibilityState, accessibilityLiveRegion).
Getting Started
Features
CLI & Agents
Backend
Architecture
Deployment
Reference
External