mobileui-os 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/AGENTS.md +47 -0
  2. package/CHANGELOG.md +25 -0
  3. package/README.md +78 -0
  4. package/bin/cli.mjs +375 -0
  5. package/knowledge/android/00-apple-to-android-adaption.md +1499 -0
  6. package/knowledge/android/accessibility.md +333 -0
  7. package/knowledge/android/components-controls.md +270 -0
  8. package/knowledge/android/material-design-3.md +174 -0
  9. package/knowledge/android/navigation-patterns.md +212 -0
  10. package/knowledge/apple/00-skill-reading-protocol.md +1296 -0
  11. package/knowledge/apple/Accessibility, Inclusive Design & Human Factors Intelligence.md +735 -0
  12. package/knowledge/apple/Advanced Interaction Patterns, Gestures, Feedback & State Transitions.md +1140 -0
  13. package/knowledge/apple/Advanced Navigation, Information Architecture & Wayfinding.md +551 -0
  14. package/knowledge/apple/Autonomus Ui-UX Improvement Loop.md +611 -0
  15. package/knowledge/apple/Color, Materials, Contrast, Themes & Visual Depth.md +1351 -0
  16. package/knowledge/apple/Content, Copy, Microinteractions & UX Communication.md +642 -0
  17. package/knowledge/apple/Data-Heavy Interfaces, Tables, Lists, Search, Filtering & Large-Scale Content.md +721 -0
  18. package/knowledge/apple/Design Systems & Component Architecture.md +412 -0
  19. package/knowledge/apple/Forms, Input, Data Entry & Validation Intelligence.md +705 -0
  20. package/knowledge/apple/Interaction, State & Edge-Case Engineering.md +491 -0
  21. package/knowledge/apple/Interaction-behaviour.md +1378 -0
  22. package/knowledge/apple/Layout Architecture, Responsive Design & Spatial Systems.md +1365 -0
  23. package/knowledge/apple/MASTER UI-UX ORCHESTRATOR.md +1210 -0
  24. package/knowledge/apple/Navigation Architecture, Routing, Deep Linking & State Restoration.md +1392 -0
  25. package/knowledge/apple/Navigation, Information Architecture & Spatial Hierarchy.md +1613 -0
  26. package/knowledge/apple/Notifications, Permissions, Privacy and Trust.md +1540 -0
  27. package/knowledge/apple/Patterns-templates-composition.md +647 -0
  28. package/knowledge/apple/Performance, Perceived Speed, Motion & Rendering Intelligence.md +855 -0
  29. package/knowledge/apple/Responsive, Adaptive & Cross-Platform UI Intelligence.md +669 -0
  30. package/knowledge/apple/Responsive, Adaptive, Accessible & Performant UI.md +545 -0
  31. package/knowledge/apple/Tablet Adaptation & Multi-Device UX.md +1447 -0
  32. package/knowledge/apple/UI Implementation & Refactoring.md +498 -0
  33. package/knowledge/apple/UI-UX Decision-Making, Prioritization & Trade-offs.md +533 -0
  34. package/knowledge/apple/UI-UX Project Lifecycle & Delivery.md +544 -0
  35. package/knowledge/apple/User Flows & Experience Architecture.md +335 -0
  36. package/knowledge/apple/Visual Design Systems, Theming, Tokens & Brand Intelligence.md +764 -0
  37. package/knowledge/apple/Visual QA, Testing & Validation.md +557 -0
  38. package/knowledge/apple/accessibility-inclusive-interaction.md +1361 -0
  39. package/knowledge/apple/accessibility.md +2162 -0
  40. package/knowledge/apple/color.md +1933 -0
  41. package/knowledge/apple/component-architecture.md +2208 -0
  42. package/knowledge/apple/components.md +2172 -0
  43. package/knowledge/apple/design-decision-framework.md +1883 -0
  44. package/knowledge/apple/design-review-engine.md +2108 -0
  45. package/knowledge/apple/design-tokens.md +1943 -0
  46. package/knowledge/apple/designing-for-ios.md +1680 -0
  47. package/knowledge/apple/gestures, touch behavior, feedback, motion, and micro-interactions.md +1538 -0
  48. package/knowledge/apple/hig-foundation.md +1806 -0
  49. package/knowledge/apple/iconography.md +1903 -0
  50. package/knowledge/apple/interaction-patterns.md +2513 -0
  51. package/knowledge/apple/interaction.md +2141 -0
  52. package/knowledge/apple/ios-alerts-confirmations-destructive-actions.md +1342 -0
  53. package/knowledge/apple/ios-components-and-controls.md +1634 -0
  54. package/knowledge/apple/ios-components-patterns.md +1343 -0
  55. package/knowledge/apple/ios-design-system-architecture.md +1520 -0
  56. package/knowledge/apple/ios-empty-error-offline-states.md +1370 -0
  57. package/knowledge/apple/ios-empty-loading-error-recovery.md +1674 -0
  58. package/knowledge/apple/ios-forms-and-input.md +1458 -0
  59. package/knowledge/apple/ios-forms-input-data-entry.md +1308 -0
  60. package/knowledge/apple/ios-gestures-and-touch.md +1272 -0
  61. package/knowledge/apple/ios-lists-collections-and-data-display.md +1735 -0
  62. package/knowledge/apple/ios-loading-progress-async-states.md +1378 -0
  63. package/knowledge/apple/ios-materials-and-surfaces.md +1543 -0
  64. package/knowledge/apple/ios-motion-animation-transitions.md +1178 -0
  65. package/knowledge/apple/ios-navigation-and-information-architecture.md +1674 -0
  66. package/knowledge/apple/ios-navigation-user-flows-design-architecture.md +1195 -0
  67. package/knowledge/apple/ios-search-and-discovery.md +1456 -0
  68. package/knowledge/apple/ios-search-filtering-discovery.md +1402 -0
  69. package/knowledge/apple/ios-sheets-modals-popovers.md +1205 -0
  70. package/knowledge/apple/ios-typography-icons-visual-hierarchy.md +1431 -0
  71. package/knowledge/apple/layout.md +2331 -0
  72. package/knowledge/apple/media-centric-content-ui-patterns.md +1470 -0
  73. package/knowledge/apple/motion, transitions, physics, and animation language.md +1535 -0
  74. package/knowledge/apple/motion-and-animation.md +1698 -0
  75. package/knowledge/apple/motion.md +2087 -0
  76. package/knowledge/apple/navigation.md +2281 -0
  77. package/knowledge/apple/responsive-adaptive.md +2159 -0
  78. package/knowledge/apple/screen-architecture.md +2067 -0
  79. package/knowledge/apple/typography, Content Hierarchy & Readability.md +1411 -0
  80. package/knowledge/apple/typography.md +1802 -0
  81. package/knowledge/apple/ui-ux inteligence audit.md +106 -0
  82. package/knowledge/apple/visual-design-and-premium-ui.md +1555 -0
  83. package/knowledge/apple/visual-hierarchy-engine.md +1647 -0
  84. package/knowledge/apple/visual-materials.md +2189 -0
  85. package/package.json +53 -0
  86. package/principles/design-principles.md +37 -0
  87. package/principles/platform-principles.md +25 -0
  88. package/principles/ux-principles.md +16 -0
  89. package/references/official-links.md +11 -0
  90. package/skills/accessibility-engineer/SKILL.md +125 -0
  91. package/skills/analytics-engineer/SKILL.md +283 -0
  92. package/skills/animation-engineer/SKILL.md +316 -0
  93. package/skills/component-designer/SKILL.md +75 -0
  94. package/skills/component-library-engineer/SKILL.md +140 -0
  95. package/skills/component-library-ops/SKILL.md +155 -0
  96. package/skills/design-system/SKILL.md +77 -0
  97. package/skills/design-token-engineer/SKILL.md +203 -0
  98. package/skills/design-token-pipeline/SKILL.md +277 -0
  99. package/skills/device-lab-engineer/SKILL.md +387 -0
  100. package/skills/forms-engineer/SKILL.md +79 -0
  101. package/skills/internationalization-engineer/SKILL.md +256 -0
  102. package/skills/motion-designer/SKILL.md +77 -0
  103. package/skills/native-data-fetching/SKILL.md +50 -0
  104. package/skills/navigation-architect/SKILL.md +65 -0
  105. package/skills/performance-engineer/SKILL.md +250 -0
  106. package/skills/platform-specialist/SKILL.md +95 -0
  107. package/skills/pre-release-gate/SKILL.md +75 -0
  108. package/skills/screen-designer/SKILL.md +117 -0
  109. package/skills/security-engineer/SKILL.md +375 -0
  110. package/skills/skills.json +134 -0
  111. package/skills/testing-auditor/SKILL.md +62 -0
  112. package/skills/ui-architect/SKILL.md +86 -0
  113. package/skills/ui-implementer/SKILL.md +188 -0
  114. package/skills/ux-architect/SKILL.md +49 -0
  115. package/skills/ux-auditor/SKILL.md +52 -0
  116. package/skills/visual-auditor/SKILL.md +71 -0
  117. package/templates/audit-report.md +29 -0
  118. package/templates/design-tokens.ts +33 -0
  119. package/templates/screen-spec.md +61 -0
  120. package/workflows/new-screen.md +17 -0
  121. package/workflows/pre-release.md +21 -0
  122. package/workflows/redesign.md +14 -0
  123. package/workflows/ui-audit.md +22 -0
@@ -0,0 +1,1378 @@
1
+
2
+
3
+ # iOS Loading, Progress & Async States
4
+
5
+ > Agent intelligence module for designing loading, waiting, progress, processing,
6
+ > synchronization, background work, optimistic updates, and asynchronous UI.
7
+
8
+ Version: 1.0
9
+ Platform: iOS / iPadOS / React Native / Expo
10
+ Role: Async-state and perceived-performance intelligence
11
+
12
+ Parent:
13
+
14
+ * ios-design-system-architecture.md
15
+ * ios-components-and-controls.md
16
+ * ios-sheets-modals-popovers.md
17
+ * ios-alerts-confirmations-destructive-actions.md
18
+ * ios-navigation-and-information-architecture.md
19
+ * ios-error-empty-offline-states.md
20
+ * ios-motion-and-animation.md
21
+
22
+ # 1. PURPOSE
23
+
24
+ Asynchronous operations are unavoidable.
25
+
26
+ The interface must communicate:
27
+
28
+ ```text
29
+ Nothing happening
30
+ ↓
31
+ Work started
32
+ ↓
33
+ Work in progress
34
+ ↓
35
+ Work completed
36
+ ↓
37
+ Success / failure / partial result
38
+ ```
39
+
40
+ without making the application feel slow, frozen, or uncertain.
41
+
42
+ # 2. CORE PRINCIPLE
43
+
44
+ The user should always understand:
45
+
46
+ ```text
47
+ What is happening?
48
+ Is the application responding?
49
+ How long might it take?
50
+ Can I continue doing something else?
51
+ What happened when it finished?
52
+ ```
53
+
54
+ # 3. LOADING IS NOT ONE STATE
55
+
56
+ Do not use one generic spinner for everything.
57
+
58
+ Distinguish:
59
+
60
+ ```text
61
+ Initial loading
62
+ Refreshing
63
+ Fetching
64
+ Submitting
65
+ Processing
66
+ Uploading
67
+ Downloading
68
+ Synchronizing
69
+ Searching
70
+ Generating
71
+ Rendering
72
+ Waiting
73
+ ```
74
+
75
+ .
76
+
77
+ # 4. RESPONSE MODEL
78
+
79
+ Every async operation should have a state model.
80
+
81
+ ```text
82
+ idle
83
+ ↓
84
+ pending
85
+ ↓
86
+ success
87
+ ↓
88
+ error
89
+ ```
90
+
91
+ Potential extensions:
92
+
93
+ ```text
94
+ cancelled
95
+ retrying
96
+ paused
97
+ offline
98
+ partial
99
+ unknown
100
+ ```
101
+
102
+ .
103
+
104
+ # 5. LOADING STATE OWNERSHIP
105
+
106
+ Loading should belong to the thing actually doing the work.
107
+
108
+ Bad:
109
+
110
+ ```text
111
+ Entire app → spinner
112
+ ```
113
+
114
+ when only one component is loading.
115
+
116
+ Better:
117
+
118
+ ```text
119
+ Playlist → loading
120
+ ```
121
+
122
+ while the rest of the application remains usable.
123
+
124
+ # 6. LOCAL VS GLOBAL LOADING
125
+
126
+ Use local loading when:
127
+
128
+ ```text
129
+ Only one section is affected.
130
+ ```
131
+
132
+ Use global loading only when:
133
+
134
+ ```text
135
+ The entire application genuinely cannot proceed.
136
+ ```
137
+
138
+ # 7. INITIAL LOADING
139
+
140
+ Initial loading should establish the structure of the destination quickly.
141
+
142
+ Prefer:
143
+
144
+ ```text
145
+ Screen shell
146
+ ↓
147
+ Content placeholders
148
+ ↓
149
+ Real content
150
+ ```
151
+
152
+ rather than:
153
+
154
+ ```text
155
+ Blank screen
156
+ ↓
157
+ Spinner
158
+ ↓
159
+ Entire screen appears
160
+ ```
161
+
162
+ # 8. SKELETON LOADING
163
+
164
+ Skeletons are useful when the eventual content structure is predictable.
165
+
166
+ They should resemble:
167
+
168
+ ```text
169
+ Actual layout
170
+ ```
171
+
172
+ rather than generic animated rectangles.
173
+
174
+ # 9. SKELETON PURPOSE
175
+
176
+ A skeleton communicates:
177
+
178
+ ```text
179
+ "The content is coming."
180
+ ```
181
+
182
+ not:
183
+
184
+ ```text
185
+ "Something might be broken."
186
+ ```
187
+
188
+ # 10. SKELETON LIMITATION
189
+
190
+ Do not skeletonize every small interaction.
191
+
192
+ For tiny operations, direct feedback may be better.
193
+
194
+ # 11. SPINNERS
195
+
196
+ Use an indeterminate progress indicator when:
197
+
198
+ ```text
199
+ Duration is unknown
200
+ ```
201
+
202
+ and the user needs to know work is occurring.
203
+
204
+ # 12. SPINNER ABUSE
205
+
206
+ Avoid:
207
+
208
+ ```text
209
+ Spinner everywhere
210
+ ```
211
+
212
+ especially for operations that complete almost instantly.
213
+
214
+ # 13. SHORT OPERATIONS
215
+
216
+ For very fast operations:
217
+
218
+ ```text
219
+ Action
220
+ ↓
221
+ Result
222
+ ```
223
+
224
+ may be better than displaying a loading indicator that flashes briefly.
225
+
226
+ # 14. MINIMUM DISPLAY TIME
227
+
228
+ Avoid artificially keeping loading indicators visible merely to satisfy a
229
+ fixed animation duration.
230
+
231
+ Perceived smoothness matters, but unnecessary delay is still delay.
232
+
233
+ # 15. PROGRESS
234
+
235
+ Use determinate progress when meaningful progress can be measured.
236
+
237
+ Example:
238
+
239
+ ```text
240
+ Downloading
241
+ ████████░░ 80%
242
+ ```
243
+
244
+ .
245
+
246
+ # 16. INDETERMINATE PROGRESS
247
+
248
+ Use indeterminate progress when the duration or amount is unknown.
249
+
250
+ Do not invent percentages.
251
+
252
+ # 17. FALSE PROGRESS
253
+
254
+ Never display:
255
+
256
+ ```text
257
+ 87%
258
+ ```
259
+
260
+ if the system has no meaningful basis for that value.
261
+
262
+ # 18. PROGRESS COMMUNICATION
263
+
264
+ Determinate progress should communicate:
265
+
266
+ ```text
267
+ Current progress
268
+ Optional remaining amount
269
+ Optional remaining time
270
+ ```
271
+
272
+ when useful.
273
+
274
+ # 19. TIME ESTIMATES
275
+
276
+ Estimated time should be treated as an estimate.
277
+
278
+ Avoid rapidly fluctuating:
279
+
280
+ ```text
281
+ 2 seconds
282
+ ↓
283
+ 9 seconds
284
+ ↓
285
+ 3 seconds
286
+ ```
287
+
288
+ unless necessary.
289
+
290
+ # 20. PROGRESS SMOOTHING
291
+
292
+ Progress visualization should feel stable and believable.
293
+
294
+ Avoid dramatic jumps that make users think the system is malfunctioning.
295
+
296
+ # 21. UPLOADS
297
+
298
+ Uploads should communicate:
299
+
300
+ ```text
301
+ Preparing
302
+ Uploading
303
+ Processing
304
+ Complete
305
+ Failed
306
+ ```
307
+
308
+ where these stages materially affect the experience.
309
+
310
+ # 22. DOWNLOADS
311
+
312
+ Downloads may expose:
313
+
314
+ ```text
315
+ Downloaded amount
316
+ Total amount
317
+ Speed
318
+ Remaining time
319
+ ```
320
+
321
+ when useful to the task.
322
+
323
+ # 23. CANCEL
324
+
325
+ Long-running operations should provide cancellation when technically safe.
326
+
327
+ # 24. CANCELLATION
328
+
329
+ Cancellation should clearly communicate whether:
330
+
331
+ ```text
332
+ Work stopped
333
+ Partial data remains
334
+ The operation cannot be cancelled
335
+ ```
336
+
337
+ .
338
+
339
+ # 25. PAUSE
340
+
341
+ Operations such as downloads or media processing may support:
342
+
343
+ ```text
344
+ Pause
345
+ Resume
346
+ Cancel
347
+ ```
348
+
349
+ when meaningful.
350
+
351
+ # 26. RETRY
352
+
353
+ Retry should be available when failure is likely temporary.
354
+
355
+ Examples:
356
+
357
+ ```text
358
+ Network unavailable
359
+ Server temporarily unavailable
360
+ Timeout
361
+ ```
362
+
363
+ .
364
+
365
+ # 27. RETRY FEEDBACK
366
+
367
+ Do not silently retry forever.
368
+
369
+ The user should understand that recovery is happening.
370
+
371
+ # 28. AUTOMATIC RETRY
372
+
373
+ Automatic retry is appropriate when:
374
+
375
+ ```text
376
+ The operation is safe
377
+ Retry is likely to succeed
378
+ The user does not need to make a decision
379
+ ```
380
+
381
+ .
382
+
383
+ # 29. RETRY BACKOFF
384
+
385
+ Repeated network failures should use sensible backoff rather than immediate
386
+ rapid-fire retries.
387
+
388
+ # 30. ASYNC DUPLICATION
389
+
390
+ Prevent repeated actions when duplicate requests would create problems.
391
+
392
+ Example:
393
+
394
+ ```text
395
+ Tap Save
396
+ ↓
397
+ Saving...
398
+ ↓
399
+ Prevent duplicate submission
400
+ ```
401
+
402
+ # 31. BUTTON LOADING
403
+
404
+ For a form submission, loading may replace or accompany the action:
405
+
406
+ ```text
407
+ Save → Saving...
408
+ ```
409
+
410
+ The user should still understand what is happening.
411
+
412
+ # 32. BUTTON STATE
413
+
414
+ Typical lifecycle:
415
+
416
+ ```text
417
+ Enabled
418
+ ↓
419
+ Pressed
420
+ ↓
421
+ Processing
422
+ ↓
423
+ Success / error
424
+ ```
425
+
426
+ .
427
+
428
+ # 33. PRESERVE CONTEXT
429
+
430
+ Do not unexpectedly navigate away during an async operation unless the
431
+ workflow requires it.
432
+
433
+ # 34. OPTIMISTIC UI
434
+
435
+ Optimistic updates are useful when:
436
+
437
+ ```text
438
+ The operation is likely to succeed
439
+ Failure can be recovered
440
+ Immediate feedback is valuable
441
+ ```
442
+
443
+ Example:
444
+
445
+ ```text
446
+ Favorite
447
+ ↓
448
+ Heart changes immediately
449
+ ↓
450
+ Sync
451
+ ```
452
+
453
+ .
454
+
455
+ # 35. OPTIMISTIC FAILURE
456
+
457
+ If optimistic synchronization fails:
458
+
459
+ ```text
460
+ Restore state
461
+ +
462
+ Explain
463
+ +
464
+ Retry
465
+ ```
466
+
467
+ where appropriate.
468
+
469
+ # 36. OPTIMISTIC UI RISK
470
+
471
+ Do not optimistically display irreversible results that the server has not
472
+ confirmed when false state would create serious consequences.
473
+
474
+ # 37. ASYNC STATE CONSISTENCY
475
+
476
+ The UI should avoid showing:
477
+
478
+ ```text
479
+ Success
480
+ ```
481
+
482
+ while the underlying data is actually still pending unless that distinction
483
+ is intentional and understandable.
484
+
485
+ # 38. PENDING STATE
486
+
487
+ A pending state can communicate:
488
+
489
+ ```text
490
+ Queued
491
+ Syncing
492
+ Processing
493
+ Waiting
494
+ ```
495
+
496
+ .
497
+
498
+ # 39. QUEUED WORK
499
+
500
+ Offline-capable applications can expose:
501
+
502
+ ```text
503
+ Queued for upload
504
+ Waiting for connection
505
+ Sync pending
506
+ ```
507
+
508
+ when useful.
509
+
510
+ # 40. BACKGROUND WORK
511
+
512
+ If work continues after leaving the current screen, communicate enough status
513
+ for the user to understand what happened.
514
+
515
+ # 41. BACKGROUND COMPLETION
516
+
517
+ Completion may be communicated through:
518
+
519
+ ```text
520
+ Updated content
521
+ Notification
522
+ Status indicator
523
+ History
524
+ ```
525
+
526
+ depending on context.
527
+
528
+ # 42. NOT EVERY COMPLETION NEEDS A MESSAGE
529
+
530
+ If the UI updates visibly, an additional success message may be unnecessary.
531
+
532
+ # 43. SUCCESS FEEDBACK
533
+
534
+ Good success feedback is:
535
+
536
+ ```text
537
+ Immediate
538
+ Relevant
539
+ Brief
540
+ ```
541
+
542
+ .
543
+
544
+ # 44. SUCCESS OVERLOAD
545
+
546
+ Avoid:
547
+
548
+ ```text
549
+ "Successfully saved!"
550
+ "Successfully updated!"
551
+ "Successfully synced!"
552
+ ```
553
+
554
+ after every trivial action.
555
+
556
+ # 45. SILENT SUCCESS
557
+
558
+ Silent success is appropriate when:
559
+
560
+ ```text
561
+ The visual state already confirms completion.
562
+ ```
563
+
564
+ Example:
565
+
566
+ ```text
567
+ Toggle → new state
568
+ ```
569
+
570
+ No message required.
571
+
572
+ # 46. ERROR TRANSITION
573
+
574
+ Async state should transition cleanly:
575
+
576
+ ```text
577
+ Loading
578
+ ↓
579
+ Error
580
+ ```
581
+
582
+ not:
583
+
584
+ ```text
585
+ Loading
586
+ ↓
587
+ Blank
588
+ ↓
589
+ Error
590
+ ```
591
+
592
+ # 47. PARTIAL SUCCESS
593
+
594
+ Some operations partially succeed.
595
+
596
+ Communicate:
597
+
598
+ ```text
599
+ 3 of 5 files uploaded
600
+ ```
601
+
602
+ rather than simply:
603
+
604
+ ```text
605
+ Upload failed
606
+ ```
607
+
608
+ # 48. PARTIAL DATA
609
+
610
+ If some data is available:
611
+
612
+ ```text
613
+ Show useful data
614
+ +
615
+ Communicate missing data
616
+ ```
617
+
618
+ rather than replacing the entire interface with an error.
619
+
620
+ # 49. STALE DATA
621
+
622
+ If cached data exists while fresh data is being retrieved:
623
+
624
+ ```text
625
+ Cached content
626
+ ↓
627
+ Refresh
628
+ ↓
629
+ Fresh content
630
+ ```
631
+
632
+ can be better than:
633
+
634
+ ```text
635
+ Blank
636
+ ↓
637
+ Loading
638
+ ↓
639
+ Fresh content
640
+ ```
641
+
642
+ # 50. STALE-WHILE-REVALIDATE
643
+
644
+ When appropriate:
645
+
646
+ ```text
647
+ Existing content remains visible
648
+ +
649
+ Fresh data loads in background
650
+ ```
651
+
652
+ This reduces perceived waiting.
653
+
654
+ # 51. REFRESHING
655
+
656
+ Refreshing should communicate activity without destroying useful content.
657
+
658
+ # 52. PULL TO REFRESH
659
+
660
+ Typical lifecycle:
661
+
662
+ ```text
663
+ Idle
664
+ ↓
665
+ Pulling
666
+ ↓
667
+ Threshold
668
+ ↓
669
+ Release
670
+ ↓
671
+ Refreshing
672
+ ↓
673
+ Complete
674
+ ```
675
+
676
+ .
677
+
678
+ # 53. REFRESH FAILURE
679
+
680
+ Preserve existing content when possible.
681
+
682
+ Communicate that the refresh failed.
683
+
684
+ # 54. SEARCH LOADING
685
+
686
+ Search should respond quickly to input.
687
+
688
+ For remote search:
689
+
690
+ ```text
691
+ Typing
692
+ ↓
693
+ Debounce
694
+ ↓
695
+ Request
696
+ ↓
697
+ Results
698
+ ```
699
+
700
+ .
701
+
702
+ # 55. SEARCH DEBOUNCE
703
+
704
+ Avoid issuing unnecessary requests for every keystroke.
705
+
706
+ # 56. SEARCH RESULTS
707
+
708
+ Loading results should not make the entire search interface feel frozen.
709
+
710
+ # 57. SEARCH EMPTY VS LOADING
711
+
712
+ These are different:
713
+
714
+ ```text
715
+ Loading → results not known yet
716
+ Empty → search completed and no results exist
717
+ ```
718
+
719
+ Never show an empty-state message while data is still loading.
720
+
721
+ # 58. PAGINATION
722
+
723
+ For paginated content:
724
+
725
+ ```text
726
+ Existing results
727
+ ↓
728
+ Load more
729
+ ↓
730
+ Additional results
731
+ ```
732
+
733
+ Avoid replacing the entire list with a spinner.
734
+
735
+ # 59. INFINITE SCROLL
736
+
737
+ A loading indicator should appear near the continuation point rather than
738
+ blocking already-loaded content.
739
+
740
+ # 60. IMAGE LOADING
741
+
742
+ Image loading should preserve layout stability.
743
+
744
+ Avoid dramatic layout shifts when images arrive.
745
+
746
+ # 61. MEDIA LOADING
747
+
748
+ For audio/video:
749
+
750
+ ```text
751
+ Preparing
752
+ Buffering
753
+ Playing
754
+ Paused
755
+ Failed
756
+ ```
757
+
758
+ should remain distinguishable.
759
+
760
+ # 62. BUFFERING
761
+
762
+ Buffering should communicate temporary interruption rather than permanent
763
+ failure.
764
+
765
+ # 63. PLAYBACK START
766
+
767
+ If playback takes time to initialize:
768
+
769
+ ```text
770
+ Play
771
+ ↓
772
+ Preparing
773
+ ↓
774
+ Playing
775
+ ```
776
+
777
+ Avoid making repeated taps trigger multiple playback requests.
778
+
779
+ # 64. DOCUMENT LOADING
780
+
781
+ Document viewers should distinguish:
782
+
783
+ ```text
784
+ Opening
785
+ Rendering
786
+ Loaded
787
+ Failed
788
+ ```
789
+
790
+ .
791
+
792
+ # 65. FILE PROCESSING
793
+
794
+ Long operations may expose stages:
795
+
796
+ ```text
797
+ Reading
798
+ Processing
799
+ Writing
800
+ Complete
801
+ ```
802
+
803
+ when this helps the user understand the wait.
804
+
805
+ # 66. GENERATIVE FEATURES
806
+
807
+ AI or generative operations should communicate that the system is working
808
+ without pretending to know an exact completion time.
809
+
810
+ # 67. GENERATION STATES
811
+
812
+ Possible model:
813
+
814
+ ```text
815
+ Preparing
816
+ Generating
817
+ Streaming
818
+ Completing
819
+ Complete
820
+ Failed
821
+ ```
822
+
823
+ .
824
+
825
+ # 68. STREAMING
826
+
827
+ When content can arrive incrementally, show useful partial output rather than
828
+ forcing the user to wait for the entire operation.
829
+
830
+ # 69. STREAMING FAILURE
831
+
832
+ If streaming stops unexpectedly:
833
+
834
+ ```text
835
+ Preserve received content
836
+ +
837
+ Communicate interruption
838
+ +
839
+ Offer retry / continue when possible
840
+ ```
841
+
842
+ # 70. ASYNC TIMEOUT
843
+
844
+ Timeouts should be based on meaningful system behavior, not arbitrary
845
+ UI impatience.
846
+
847
+ # 71. TIMEOUT UX
848
+
849
+ If a request times out:
850
+
851
+ ```text
852
+ Preserve context
853
+ Explain
854
+ Offer retry
855
+ ```
856
+
857
+ .
858
+
859
+ # 72. UNKNOWN RESULT
860
+
861
+ A network timeout does not always mean the server failed.
862
+
863
+ Avoid incorrectly telling the user:
864
+
865
+ ```text
866
+ "Your action failed."
867
+ ```
868
+
869
+ when the actual result is unknown.
870
+
871
+ # 73. NETWORK STATE
872
+
873
+ Async UI should account for:
874
+
875
+ ```text
876
+ Online
877
+ Offline
878
+ Poor connection
879
+ Reconnecting
880
+ ```
881
+
882
+ .
883
+
884
+ # 74. OFFLINE TRANSITION
885
+
886
+ If connectivity disappears during an operation:
887
+
888
+ ```text
889
+ Pending
890
+ ↓
891
+ Offline / paused
892
+ ↓
893
+ Reconnect
894
+ ↓
895
+ Resume / retry
896
+ ```
897
+
898
+ when supported.
899
+
900
+ # 75. SKELETON ANIMATION
901
+
902
+ Skeleton animation should be subtle.
903
+
904
+ Avoid highly distracting shimmer effects.
905
+
906
+ # 76. LOADING MOTION
907
+
908
+ Motion should communicate:
909
+
910
+ ```text
911
+ Activity
912
+ ```
913
+
914
+ not:
915
+
916
+ ```text
917
+ Entertainment
918
+ ```
919
+
920
+ # 77. REDUCED MOTION
921
+
922
+ Respect reduced-motion preferences.
923
+
924
+ Loading must remain understandable without animated effects.
925
+
926
+ # 78. ACCESSIBILITY
927
+
928
+ Loading states should expose semantic status where appropriate.
929
+
930
+ # 79. SCREEN READER STATUS
931
+
932
+ Important asynchronous transitions may need announcements:
933
+
934
+ ```text
935
+ Saving
936
+ Saved
937
+ Upload complete
938
+ Download failed
939
+ ```
940
+
941
+ Avoid announcing every trivial background event.
942
+
943
+ # 80. DYNAMIC TYPE
944
+
945
+ Loading and progress labels must remain readable at larger text sizes.
946
+
947
+ # 81. COLOR INDEPENDENCE
948
+
949
+ Do not communicate:
950
+
951
+ ```text
952
+ green = complete
953
+ red = failed
954
+ ```
955
+
956
+ without textual or semantic information.
957
+
958
+ # 82. HAPTIC FEEDBACK
959
+
960
+ Haptics may reinforce meaningful completion or failure.
961
+
962
+ Do not use haptics for every asynchronous event.
963
+
964
+ # 83. GLOBAL BLOCKING
965
+
966
+ A global blocking spinner should be rare.
967
+
968
+ Use it only when the user genuinely cannot continue.
969
+
970
+ # 84. APP LAUNCH
971
+
972
+ At launch:
973
+
974
+ ```text
975
+ Show stable application shell
976
+ ↓
977
+ Load critical resources
978
+ ↓
979
+ Reveal functionality progressively
980
+ ```
981
+
982
+ where architecture allows.
983
+
984
+ # 85. SPLASH SCREEN
985
+
986
+ Do not use a splash screen as a substitute for application loading UX.
987
+
988
+ # 86. COLD START
989
+
990
+ Cold-start performance should prioritize:
991
+
992
+ ```text
993
+ First meaningful render
994
+ ```
995
+
996
+ rather than loading every resource before showing anything.
997
+
998
+ # 87. LAZY LOADING
999
+
1000
+ Load expensive resources when they become relevant.
1001
+
1002
+ # 88. PREFETCHING
1003
+
1004
+ Prefetch content when there is strong evidence the user will need it soon.
1005
+
1006
+ # 89. PREFETCHING RESTRAINT
1007
+
1008
+ Do not waste:
1009
+
1010
+ ```text
1011
+ Network
1012
+ Battery
1013
+ Memory
1014
+ Data
1015
+ ```
1016
+
1017
+ for speculative loading with little benefit.
1018
+
1019
+ # 90. PERCEIVED PERFORMANCE
1020
+
1021
+ Perceived speed depends on:
1022
+
1023
+ ```text
1024
+ Response time
1025
+ Feedback
1026
+ Continuity
1027
+ Progress visibility
1028
+ Content stability
1029
+ ```
1030
+
1031
+ not just raw latency.
1032
+
1033
+ # 91. IMMEDIATE ACKNOWLEDGEMENT
1034
+
1035
+ When an action starts, acknowledge it quickly.
1036
+
1037
+ Even if the operation takes time, the interface should feel responsive.
1038
+
1039
+ # 92. LATENCY BANDS
1040
+
1041
+ Conceptually:
1042
+
1043
+ ```text
1044
+ Very fast
1045
+ → Direct response
1046
+
1047
+ Short wait
1048
+ → Subtle activity feedback
1049
+
1050
+ Longer wait
1051
+ → Explicit progress / status
1052
+
1053
+ Very long operation
1054
+ → Progress + cancellation / background handling
1055
+ ```
1056
+
1057
+ Do not apply one indicator to every latency class.
1058
+
1059
+ # 93. CONTENT STABILITY
1060
+
1061
+ Avoid shifting controls while loading.
1062
+
1063
+ Reserve space for asynchronous content where practical.
1064
+
1065
+ # 94. LAYOUT SHIFT
1066
+
1067
+ Bad:
1068
+
1069
+ ```text
1070
+ Button
1071
+ ↓
1072
+ Image loads
1073
+ ↓
1074
+ Button moves
1075
+ ```
1076
+
1077
+ Prefer stable layout allocation.
1078
+
1079
+ # 95. ERROR PRESERVATION
1080
+
1081
+ When an async operation fails, preserve user input whenever possible.
1082
+
1083
+ # 96. FORM SUBMISSION
1084
+
1085
+ If saving fails:
1086
+
1087
+ ```text
1088
+ Keep entered values
1089
+ +
1090
+ Explain failure
1091
+ +
1092
+ Retry
1093
+ ```
1094
+
1095
+ Never casually clear the form.
1096
+
1097
+ # 97. ASYNC NAVIGATION
1098
+
1099
+ Avoid navigating to a destination that cannot meaningfully render because its
1100
+ required data has not been considered.
1101
+
1102
+ # 98. NAVIGATION + LOADING
1103
+
1104
+ Possible strategy:
1105
+
1106
+ ```text
1107
+ Navigate
1108
+ ↓
1109
+ Show destination shell
1110
+ ↓
1111
+ Load content
1112
+ ```
1113
+
1114
+ when the destination can provide useful structure immediately.
1115
+
1116
+ # 99. PRELOADING
1117
+
1118
+ Use preloading when:
1119
+
1120
+ ```text
1121
+ Navigation is predictable
1122
+ Resource is expensive
1123
+ Probability of use is high
1124
+ ```
1125
+
1126
+ .
1127
+
1128
+ # 100. CANCELLED OPERATIONS
1129
+
1130
+ Cancellation is a legitimate final state.
1131
+
1132
+ Do not show:
1133
+
1134
+ ```text
1135
+ Error
1136
+ ```
1137
+
1138
+ when the user intentionally cancelled.
1139
+
1140
+ # 101. PAUSED OPERATIONS
1141
+
1142
+ Paused should be visually distinct from failed.
1143
+
1144
+ # 102. RETRYING
1145
+
1146
+ Retrying should be distinct from initial loading if the distinction matters.
1147
+
1148
+ # 103. STATE MACHINE
1149
+
1150
+ Recommended async state model:
1151
+
1152
+ ```text
1153
+ IDLE
1154
+ │
1155
+ ▼
1156
+ STARTING
1157
+ │
1158
+ ▼
1159
+ LOADING
1160
+ ├──────────────┐
1161
+ ▼ ▼
1162
+ SUCCESS ERROR
1163
+ │ │
1164
+ ▼ ├── RETRY → LOADING
1165
+ DONE │
1166
+ └── CANCEL → IDLE
1167
+ ```
1168
+
1169
+ Additional states:
1170
+
1171
+ ```text
1172
+ OFFLINE
1173
+ PAUSED
1174
+ PARTIAL
1175
+ UNKNOWN
1176
+ ```
1177
+
1178
+ when needed.
1179
+
1180
+ # 104. ASYNC STATE TABLE
1181
+
1182
+ ```text
1183
+ State User meaning
1184
+ ────────────────────────────────
1185
+ Idle Nothing happening
1186
+ Starting Work just began
1187
+ Loading Work is active
1188
+ Progress Measurable work
1189
+ Paused Work temporarily stopped
1190
+ Offline Connection unavailable
1191
+ Success Work completed
1192
+ Partial Some work completed
1193
+ Error Work failed
1194
+ Cancelled User/system stopped it
1195
+ Unknown Result cannot be confirmed
1196
+ ```
1197
+
1198
+ .
1199
+
1200
+ # 105. AGENT DECISION TREE
1201
+
1202
+ ```text
1203
+ Is content currently available?
1204
+ ├── No → Initial loading / skeleton
1205
+ └── Yes
1206
+ ↓
1207
+ Is fresh content being fetched?
1208
+ ├── Yes → Preserve content + refresh indicator
1209
+ └── No
1210
+ ↓
1211
+ Is an action processing?
1212
+ ├── Yes → Local action feedback
1213
+ └── No → Normal state
1214
+ ```
1215
+
1216
+ .
1217
+
1218
+ # 106. PROGRESS DECISION
1219
+
1220
+ ```text
1221
+ Can progress be measured?
1222
+ ↓
1223
+ YES
1224
+ ↓
1225
+ Determinate progress
1226
+
1227
+ NO
1228
+ ↓
1229
+ Indeterminate activity
1230
+ ```
1231
+
1232
+ Never invent progress.
1233
+
1234
+ # 107. LOADING DECISION
1235
+
1236
+ ```text
1237
+ Does the entire application need to wait?
1238
+ ↓
1239
+ YES → Global loading
1240
+
1241
+ NO → Local loading
1242
+ ```
1243
+
1244
+ .
1245
+
1246
+ # 108. LONG OPERATION DECISION
1247
+
1248
+ ```text
1249
+ Operation takes significant time
1250
+ ↓
1251
+ Can user continue elsewhere?
1252
+ ├── YES → Background-capable state
1253
+ └── NO
1254
+ ↓
1255
+ Progress
1256
+ +
1257
+ Cancellation where safe
1258
+ ```
1259
+
1260
+ .
1261
+
1262
+ # 109. ASYNC UX FLOW
1263
+
1264
+ ```text
1265
+ User action
1266
+ ↓
1267
+ Immediate acknowledgement
1268
+ ↓
1269
+ Operation starts
1270
+ ↓
1271
+ Appropriate loading state
1272
+ ↓
1273
+ Progress if measurable
1274
+ ↓
1275
+ Completion / partial result / error
1276
+ ↓
1277
+ Recovery
1278
+ ```
1279
+
1280
+ .
1281
+
1282
+ # 110. REVIEW CHECKLIST
1283
+
1284
+ ```text
1285
+ [ ] Correct loading state chosen
1286
+ [ ] Loading belongs to affected component
1287
+ [ ] Existing content preserved where possible
1288
+ [ ] No false progress
1289
+ [ ] No unnecessary blocking
1290
+ [ ] Duplicate actions prevented
1291
+ [ ] Cancellation considered
1292
+ [ ] Retry considered
1293
+ [ ] Errors preserve user work
1294
+ [ ] Offline state considered
1295
+ [ ] Partial success handled
1296
+ [ ] Unknown result handled
1297
+ [ ] Accessibility considered
1298
+ [ ] Large text works
1299
+ [ ] Reduced motion works
1300
+ [ ] Layout remains stable
1301
+ [ ] Performance is acceptable
1302
+ ```
1303
+
1304
+ .
1305
+
1306
+ # 111. QUALITY SCORE
1307
+
1308
+ ```text
1309
+ State modeling 10
1310
+ Feedback clarity 10
1311
+ Perceived performance 15
1312
+ Content stability 10
1313
+ Error recovery 10
1314
+ Progress accuracy 10
1315
+ Interaction continuity 10
1316
+ Accessibility 10
1317
+ Performance 10
1318
+ Resource efficiency 5
1319
+ ──────────────────────────────
1320
+ Total 100
1321
+ ```
1322
+
1323
+ Interpretation:
1324
+
1325
+ ```text
1326
+ 95–100 Exceptional
1327
+ 90–94 Excellent
1328
+ 80–89 Strong
1329
+ 70–79 Needs refinement
1330
+ 60–69 Weak
1331
+ <60 Redesign
1332
+ ```
1333
+
1334
+ # 112. FINAL PRINCIPLE
1335
+
1336
+ Never make the user wonder:
1337
+
1338
+ ```text
1339
+ "Did it work?"
1340
+ "Is it still working?"
1341
+ "Did the app freeze?"
1342
+ "Should I tap again?"
1343
+ "Did I lose my data?"
1344
+ ```
1345
+
1346
+ The interface should answer those questions through state, feedback, and
1347
+ continuity.
1348
+
1349
+ # 113. FINAL AGENT DIRECTIVE
1350
+
1351
+ For every asynchronous operation, explicitly model:
1352
+
1353
+ ```text
1354
+ START
1355
+ PROGRESS
1356
+ SUCCESS
1357
+ FAILURE
1358
+ CANCELLATION
1359
+ RECOVERY
1360
+ ```
1361
+
1362
+ and add:
1363
+
1364
+ ```text
1365
+ PARTIAL
1366
+ OFFLINE
1367
+ PAUSED
1368
+ UNKNOWN
1369
+ ```
1370
+
1371
+ when the product actually needs them.
1372
+
1373
+ Prefer **local, contextual, truthful feedback** over global spinners and
1374
+ invented progress.
1375
+
1376
+ The goal is not to make waiting look beautiful.
1377
+
1378
+ The goal is to make **waiting feel understandable**.