{"success":true,"name":"every-view-needs-its-loading-empty-and-error-states","description":"Building a screen and only designing what it looks like with perfect data","category":"ai-brimind","path":"ai-brimind/every-view-needs-its-loading-empty-and-error-states/SKILL.md","file":"SKILL.md","content":"---\nname: every-view-needs-its-loading-empty-and-error-states\ndescription: \"Building a screen and only designing what it looks like with perfect data\"\n---\n\n# Every View Needs Its Loading, Empty, and Error States\n\n## When to use\nYou are building a screen or component and have only handled the case where data arrives quickly, correctly, and non-empty.\n\n## Example request\nA list with no items shows a blank white area → the user thinks it's broken; missing the empty state. Data takes 3 seconds and the screen shows nothing meanwhile → users click again and again; missing the loading state. The request fails and the screen stays frozen → no message, no retry; missing the error state. A brand-new user sees a dashboard built for rich data → their first impression is a void; the empty state is a first impression.\n\n## Instructions\nAdopt the mindset of a host who plans for guests who are early, late, or don't show up at all. For every screen that depends on data: (1) Design and build FOUR states, not one: loading (what shows while waiting), success (the happy case), empty (valid response, zero items — with a helpful message or next action, never a blank void), and error (something failed — an honest message and a way to retry). (2) Walk through each state deliberately: slow the network in your head, imagine a new user with no data, imagine the server down. (3) Make the empty and error states USEFUL, not decorative — tell the user what this means and what they can do. (4) Test at least the empty and error states for real, not just the happy path. If you don't know what the empty state should say, ask the product owner — it's a product decision, not a technical one. Only call the screen done when all four states are confirmed to exist and make sense to a confused user.\n\n## Metadata\n- role: UX lead\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #275\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}