<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Zeeland</title>
    <description>The latest articles on DEV Community by Zeeland (@zeeland).</description>
    <link>https://dev.to/zeeland</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1315487%2Fbe27dfa6-0ebc-4bdd-91b4-947b42d65832.jpeg</url>
      <title>DEV Community: Zeeland</title>
      <link>https://dev.to/zeeland</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zeeland"/>
    <language>en</language>
    <item>
      <title>Why AI Agent Teams Stall Without an Execution Loop (Goals, Issues, Heartbeats, and Approvals)</title>
      <dc:creator>Zeeland</dc:creator>
      <pubDate>Thu, 03 Dec 2026 17:36:16 +0000</pubDate>
      <link>https://dev.to/zeeland/why-ai-agent-teams-stall-without-an-execution-loop-goals-issues-heartbeats-and-approvals-1bi5</link>
      <guid>https://dev.to/zeeland/why-ai-agent-teams-stall-without-an-execution-loop-goals-issues-heartbeats-and-approvals-1bi5</guid>
      <description>&lt;p&gt;Most AI agent setups work fine for a single prompt and fall apart by week two.&lt;/p&gt;

&lt;p&gt;You spin up Claude Code, Codex, Cursor, or a shell agent to ship a feature, audit a service, or run a recurring growth check. One run succeeds, another silently stalls, a third repeats the exact mistake you corrected yesterday, and nobody can tell how much it cost or which run touched which file.&lt;/p&gt;

&lt;p&gt;The bottleneck is rarely the underlying coding agent runtime. The missing layer is an execution loop that keeps work durable, reviewable, and able to improve from real feedback.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why chat threads fail as an operating system for agent teams
&lt;/h2&gt;

&lt;p&gt;Single-session chat interfaces assume a human is watching every turn and carrying context forward in their own head. Once you coordinate multiple specialized agents across days or weeks, four failure modes show up immediately:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Work disappears into closed sessions&lt;/strong&gt;: prompts do not become durable issues with clear ownership, acceptance criteria, and linked execution traces.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No scheduled cadence&lt;/strong&gt;: agents only move when someone remembers to paste another prompt, instead of waking up on structured heartbeats to inspect open work and report concrete deltas.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;All-or-nothing autonomy&lt;/strong&gt;: either you babysit every command or you let an agent trigger public, costly, or irreversible actions without explicit approval gates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero compounding memory&lt;/strong&gt;: review comments stay trapped in chat history instead of becoming reusable skills and memory loaded into future runs.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The execution loop behind Rudder
&lt;/h2&gt;

&lt;p&gt;We built &lt;a href="https://rudderhq.dev/" rel="noopener noreferrer"&gt;Rudder&lt;/a&gt; (Apache-2.0, open source at &lt;a href="https://github.com/Undertone0809/rudder" rel="noopener noreferrer"&gt;Undertone0809/rudder&lt;/a&gt;) as a local agent harness designed around one repeatable loop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Goal -&amp;gt; Issue -&amp;gt; Agent run -&amp;gt; Review -&amp;gt; Feedback -&amp;gt; Learning -&amp;gt; Better future runs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Rudder does not try to replace Codex, Claude, Cursor, Bash, HTTP tools, or OpenClaw. Instead, it sits above those runtimes and coordinates them inside an organization workspace with shared structure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Organizations and goals&lt;/strong&gt;: each agent team works toward explicit goals, spend budgets, and governance rules.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agents&lt;/strong&gt;: named workers with defined roles, runtime adapters, skills, memory, and reporting lines.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Issues&lt;/strong&gt;: durable work objects that capture ownership, status, linked execution traces, and concrete output rather than ephemeral chat replies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Heartbeats&lt;/strong&gt;: scheduled check-ins where agents inspect assigned issues, run checks, and surface results on a predictable cadence.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Approval gates&lt;/strong&gt;: explicit human sign-off checkpoints before risky, expensive, or public-facing actions execute.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run traces and spend tracking&lt;/strong&gt;: inspectable records of what context was loaded, which tools ran, what changed, and what each run cost.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Skills and memory&lt;/strong&gt;: feedback from real reviews turns into durable playbooks and workspace memory so the next run avoids repeating the same failure.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What makes self-improvement practical (instead of hand-wavy)
&lt;/h2&gt;

&lt;p&gt;"Self-improving agents" often sounds like fine-tuning weights or letting prompts rewrite themselves with no guardrails. In day-to-day engineering work, real improvement is much more concrete:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every run leaves behind verifiable evidence: the issue spec, the trace, the diff or artifact, the cost, and the review outcome.&lt;/li&gt;
&lt;li&gt;When a human reviewer rejects an output or catches a recurring edge case, that correction maps directly to a reusable skill or memory update tied to that workflow.&lt;/li&gt;
&lt;li&gt;Future runs inherit that updated context automatically while remaining bounded by budgets and approval gates.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Over dozens of runs, the team gets noticeably more reliable because the operational know-how lives in inspectable files and structured issue history rather than inside one forgotten terminal tab.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running Rudder locally
&lt;/h2&gt;

&lt;p&gt;Rudder runs locally and coordinates the runtimes you already use. You can start a local instance directly via npm:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @rudderhq/cli@latest start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From there, you can define an organization goal, configure your agents against existing runtimes (such as Codex, Claude, Cursor, or Bash), create tracked issues, attach heartbeat schedules, and review run traces and approvals in one place.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Website: &lt;a href="https://rudderhq.dev/" rel="noopener noreferrer"&gt;rudderhq.dev&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Documentation: &lt;a href="https://docs.rudderhq.dev/" rel="noopener noreferrer"&gt;docs.rudderhq.dev&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Source code (Apache-2.0): &lt;a href="https://github.com/Undertone0809/rudder" rel="noopener noreferrer"&gt;github.com/Undertone0809/rudder&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you are already running more than one AI agent across real repos or recurring workflows, moving work out of disposable chat tabs and into a governed issue-and-review loop is the highest-leverage step you can take.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>programming</category>
    </item>
    <item>
      <title>MCP vs. Shell Loops for AI Coding Agent Disk Cleanup on macOS APFS</title>
      <dc:creator>Zeeland</dc:creator>
      <pubDate>Thu, 03 Dec 2026 17:27:15 +0000</pubDate>
      <link>https://dev.to/zeeland/mcp-vs-shell-loops-for-ai-coding-agent-disk-cleanup-on-macos-apfs-270o</link>
      <guid>https://dev.to/zeeland/mcp-vs-shell-loops-for-ai-coding-agent-disk-cleanup-on-macos-apfs-270o</guid>
      <description>&lt;p&gt;When a Mac runs low on disk space in the middle of a multi-worktree Rust or Go session, letting a coding agent clean up via raw shell commands is slow and token-heavy. The agent typically chains &lt;code&gt;du&lt;/code&gt;, &lt;code&gt;find&lt;/code&gt;, &lt;code&gt;lsof&lt;/code&gt;, &lt;code&gt;rm -rf&lt;/code&gt;, and &lt;code&gt;df&lt;/code&gt; across multiple turns, dumps noisy directory listings into its context window, and risks touching active build directories or misreading APFS available space.&lt;/p&gt;

&lt;p&gt;We built &lt;a href="https://cublet.cc/" rel="noopener noreferrer"&gt;Cublet&lt;/a&gt;, an open-source (MIT) macOS disk space analyzer backed by a native Rust scanner and local SQLite index, and bundled a local stdio MCP server (&lt;code&gt;cublet-cleaner&lt;/code&gt;) inside it. Then we ran matched APFS benchmarks comparing the same coding agent using raw shell commands against the same agent using Cublet MCP.&lt;/p&gt;

&lt;p&gt;Full benchmark data and methodology are published on &lt;a href="https://cublet.cc/benchmarks/agent-mcp-vs-shell-cleanup/" rel="noopener noreferrer"&gt;cublet.cc/benchmarks/agent-mcp-vs-shell-cleanup/&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benchmark summary: MCP vs. shell loops on APFS
&lt;/h2&gt;

&lt;p&gt;Across six paired repeated-use runs on controlled APFS volumes (normalizing the shell baseline to 100, lower is better):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Shell baseline&lt;/th&gt;
&lt;th&gt;Cublet MCP&lt;/th&gt;
&lt;th&gt;Observed savings&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Recovery time&lt;/td&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;td&gt;27&lt;/td&gt;
&lt;td&gt;~73% less time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total tokens (input + output)&lt;/td&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;td&gt;34 to 42&lt;/td&gt;
&lt;td&gt;58 to 66% fewer tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Workload tokens (uncached input + output)&lt;/td&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;td&gt;50 to 69&lt;/td&gt;
&lt;td&gt;31 to 50% fewer tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These ranges span the paired medians across three controlled APFS test cases under the same Codex configuration:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Nested Rust Git worktrees&lt;/strong&gt;: multiple branches holding separate rebuildable &lt;code&gt;target/&lt;/code&gt; directories next to an active build.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Changed scope with stale history&lt;/strong&gt;: previously saved scan data no longer matches current directory contents, requiring fresh verification before cleanup.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ongoing disk writes&lt;/strong&gt;: background writes continue during cleanup, testing whether the agent recovers sustained available space rather than a temporary dip.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Every run had to pass the same gate: at least 320 MiB of sustained available space on the APFS volume, followed by a real 96 MiB write check and an offline &lt;code&gt;cargo&lt;/code&gt; continuation check.&lt;/p&gt;

&lt;p&gt;These numbers come from controlled APFS development fixtures rather than a universal guarantee across every machine or MCP client, but the structural reason for the gap is straightforward: structured tool responses keep raw directory trees out of the LLM context window and fold scope checks, active-build protection, deletion, and space verification into one local call.&lt;/p&gt;

&lt;h2&gt;
  
  
  Native Rust scanner and SQLite baseline restore
&lt;/h2&gt;

&lt;p&gt;Cublet's scanning core is written in Rust (&lt;code&gt;rust-core&lt;/code&gt;). It uses macOS bulk metadata reads (&lt;code&gt;getattrlistbulk&lt;/code&gt;) with bounded parallel workers and stores completed directory totals in a local SQLite index. That lets both the desktop app's Growth diff view and the MCP server compare scans over time without blindly re-walking unchanged trees.&lt;/p&gt;

&lt;p&gt;In development timings on macOS (5-run median, warm OS cache, empty 256 MiB app cache):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;8,329 folders / 643 file entries&lt;/strong&gt;: 193 ms complete scan, 21 ms stored measurement restore from SQLite.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;52,009 folders / 4,003 file entries&lt;/strong&gt;: 1,128 ms complete scan, 75 ms stored measurement restore from SQLite in a fresh process.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The 75 ms number is restoring an already-saved SQLite measurement in a new process, not a cold full-disk crawl.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why APFS cleanup needs explicit guardrails
&lt;/h2&gt;

&lt;p&gt;Deleting files on APFS does not always immediately raise reported free space. Local Time Machine snapshots, APFS clones, hard links, and purgeable space can hold blocks even after &lt;code&gt;rm&lt;/code&gt; returns success. We documented the verification steps in our &lt;a href="https://cublet.cc/guides/apfs-purgeable-space/" rel="noopener noreferrer"&gt;APFS purgeable space guide&lt;/a&gt; and our &lt;a href="https://cublet.cc/guides/rust-target-git-worktree-cleanup/" rel="noopener noreferrer"&gt;Rust target/ and Git worktree cleanup guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Because disk deletion is destructive, &lt;code&gt;cublet-cleaner&lt;/code&gt; enforces three boundaries by default:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Connecting MCP does not authorize deletion&lt;/strong&gt;: you still explicitly authorize the task and target scope before cleanup runs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Active-build protection&lt;/strong&gt;: rebuildable Rust &lt;code&gt;target/&lt;/code&gt; and Go build caches are checked for active or uncertain inputs before removal, and receipts report deleted allocation separately from observed APFS available space.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local-only scanning&lt;/strong&gt;: scans stay on your Mac; only the structured paths, metadata, and cleanup receipts returned to your connected agent are processed by whichever AI model provider you use.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try Cublet and the local stdio MCP server
&lt;/h2&gt;

&lt;p&gt;Cublet is MIT-licensed, free, and ships signed and notarized macOS 13+ builds for both Apple Silicon and Intel:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew install --cask undertone0809/tap/cublet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or download the signed DMG directly from &lt;a href="https://cublet.cc/#download" rel="noopener noreferrer"&gt;cublet.cc&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To wire &lt;code&gt;cublet-cleaner&lt;/code&gt; into Claude Code, Codex, or Cursor over local stdio:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"cublet-cleaner"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"/Applications/Cublet.app/Contents/Resources/bin/cublet-cleaner"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"--mcp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"--profile"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"cleanup"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"--allow-cleanup"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Full tool contracts, safety flags, and client setup instructions are at &lt;a href="https://cublet.cc/mcp-disk-cleaner/" rel="noopener noreferrer"&gt;cublet.cc/mcp-disk-cleaner/&lt;/a&gt;, and the full source code is on GitHub at &lt;a href="https://github.com/Undertone0809/Cublet" rel="noopener noreferrer"&gt;Undertone0809/Cublet&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>ai</category>
      <category>rust</category>
      <category>macos</category>
    </item>
    <item>
      <title>React Loading States: Spinner, Skeleton, or Progress?</title>
      <dc:creator>Zeeland</dc:creator>
      <pubDate>Thu, 03 Dec 2026 17:24:41 +0000</pubDate>
      <link>https://dev.to/zeeland/react-loading-states-spinner-skeleton-or-progress-a3b</link>
      <guid>https://dev.to/zeeland/react-loading-states-spinner-skeleton-or-progress-a3b</guid>
      <description>&lt;p&gt;Choose a loading state from the information your application actually has. A spinner says that work is happening. A skeleton shows the shape of content that has yet to arrive. A progress indicator reports measured completion. None of these can tell a user what happens after a request fails unless you build that state too.&lt;/p&gt;

&lt;p&gt;The practical question is: what does the person waiting need to know, and what can the application truthfully tell them?&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Situation&lt;/th&gt;
&lt;th&gt;Start with&lt;/th&gt;
&lt;th&gt;What to communicate&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A local action is pending and you do not know its completion percentage&lt;/td&gt;
&lt;td&gt;A small spinner or dots beside the action&lt;/td&gt;
&lt;td&gt;What is happening, with the action guarded against duplicate submission&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A known card, list, or profile layout is waiting for its first content&lt;/td&gt;
&lt;td&gt;A skeleton shaped like that content&lt;/td&gt;
&lt;td&gt;Where the content will appear, without inventing text or fake completion estimates&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;An upload or other task reports a meaningful completed amount and total&lt;/td&gt;
&lt;td&gt;A progress indicator&lt;/td&gt;
&lt;td&gt;The measured fraction and which stage it describes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Existing content is being refreshed&lt;/td&gt;
&lt;td&gt;Keep useful content visible and add a pending message&lt;/td&gt;
&lt;td&gt;Which content is refreshing, without presenting stale content as a fresh response&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These are implementation choices based on what your state machine knows. Test each choice against the actual task and every state your application can enter.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with the state model
&lt;/h2&gt;

&lt;p&gt;A boolean named &lt;code&gt;loading&lt;/code&gt; is rarely enough. A results panel can be idle, loading, ready, empty, or in error. An upload can be sending bytes, processing on the server, complete, cancelled, or failed. Decide how each state appears before choosing the animation.&lt;/p&gt;

&lt;p&gt;Keep the loading message close to the affected content. When one card updates, replacing the whole page with a spinner hides useful context. When a request fails, replace the pending state with a clear explanation and a real recovery action. Retry should start a new request instead of merely restarting an animation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use a spinner or dots for unknown progress
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://mova-ui.com/components/loaders" rel="noopener noreferrer"&gt;Mova UI Loaders&lt;/a&gt; includes small animated indicators such as Pulse Dots, whose public source renders three staggered dots. The visual component does not know whether your request is pending, and it does not supply an accessible loading announcement on its own. Your application code needs to provide both.&lt;/p&gt;

&lt;p&gt;In an existing React project, you can copy the component source directly into your repo with the &lt;a href="https://mova-ui.com/cli" rel="noopener noreferrer"&gt;Mova CLI&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @mova-ui/react@0.8.0 add pulse-dots
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The CLI writes &lt;code&gt;src/components/mova/pulse-dots.tsx&lt;/code&gt; and &lt;code&gt;styles.css&lt;/code&gt; (requiring React 18.2+ or 19 and React DOM). Import the generated CSS once at your app entry. Check the &lt;a href="https://mova-ui.com/cli" rel="noopener noreferrer"&gt;CLI documentation&lt;/a&gt; or the &lt;a href="https://github.com/Undertone0809/mova-ui" rel="noopener noreferrer"&gt;Mova UI GitHub repository&lt;/a&gt; for the latest package version and component catalog.&lt;/p&gt;

&lt;p&gt;The example below makes a real HTTP request when the user activates the button. Its endpoint returns &lt;code&gt;{ items: string[] }&lt;/code&gt;, so you can test delayed responses, HTTP errors, invalid JSON shapes, and empty arrays over real HTTP instead of toggling a fake local boolean.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;useId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;useRef&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;useState&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'react'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nc"&gt;PulseDots&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'./components/mova/pulse-dots'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="s1"&gt;'./components/mova/styles.css'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="s1"&gt;'./loading.css'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nc"&gt;ResultState&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;phase&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'idle'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="s1"&gt;'loading'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;phase&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ready'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;phase&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'error'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// The endpoint must return JSON: { items: string[] }.&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nc"&gt;Results&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;endpoint&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'/api/results'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;endpoint&lt;/span&gt;&lt;span class="o"&gt;?:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;useState&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;ResultState&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;phase&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'idle'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;useRef&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;AbortController&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;generation&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useRef&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;regionId&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useId&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;phase&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'idle'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;generation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;current&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;abort&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;endpoint&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;current&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;controller&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;AbortController&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;controller&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="n"&gt;generation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;current&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nf"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;phase&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'loading'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;endpoint&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;signal&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;controller&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;signal&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nc"&gt;Accept&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'application/json'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sb"&gt;`HTTP ${response.status}`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;unknown&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt;
        &lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="s1"&gt;'object'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt;
        &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'items'&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt;
        &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isArray&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt;
        &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;every&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'string'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Invalid results response'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="n"&gt;generation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;current&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;phase&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ready'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;controller&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;signal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;aborted&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="n"&gt;generation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;current&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;detail&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;error&lt;/span&gt; &lt;span class="k"&gt;instanceof&lt;/span&gt; &lt;span class="nb"&gt;Error&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'Request failed'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nf"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;phase&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'error'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sb"&gt;`Results could not load (${detail}).`&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;finally&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="n"&gt;generation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;current&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;pending&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;phase&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'loading'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pending&lt;/span&gt;
    &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="s1"&gt;'Loading results...'&lt;/span&gt;
    &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;phase&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'ready'&lt;/span&gt;
      &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;
        &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="sb"&gt;`${state.items.length} results ready.`&lt;/span&gt;
        &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'No results found.'&lt;/span&gt;
      &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;button&lt;/span&gt; &lt;span class="n"&gt;onClick&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;load&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="n"&gt;aria&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;disabled&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;pending&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="n"&gt;aria&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;controls&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;regionId&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;pending&lt;/span&gt;
          &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="s1"&gt;'Loading...'&lt;/span&gt;
          &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;phase&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'error'&lt;/span&gt;
            &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="s1"&gt;'Try again'&lt;/span&gt;
            &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;phase&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'ready'&lt;/span&gt;
              &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="s1"&gt;'Reload results'&lt;/span&gt;
              &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'Load results'&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;button&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="n"&gt;role&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"status"&lt;/span&gt; &lt;span class="n"&gt;aria&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;atomic&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"true"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;phase&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'error'&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="n"&gt;role&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"alert"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;section&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;regionId&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="n"&gt;aria&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"Search results"&lt;/span&gt; &lt;span class="n"&gt;aria&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;busy&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;pending&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;pending&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
          &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;div&lt;/span&gt; &lt;span class="n"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"loading-motion"&lt;/span&gt; &lt;span class="n"&gt;aria&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;hidden&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"true"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;PulseDots&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
          &lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;phase&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'ready'&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
          &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;ul&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;li&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;li&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
          &lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;ul&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;section&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;/&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;prefers-reduced-motion&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nc"&gt;.loading-motion&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A few implementation details matter here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keep the request button mounted so a keyboard user keeps focus across retries. &lt;code&gt;aria-disabled&lt;/code&gt; communicates the pending state while the ref guard prevents duplicate requests.&lt;/li&gt;
&lt;li&gt;Check &lt;code&gt;response.ok&lt;/code&gt; explicitly. A resolved &lt;code&gt;fetch&lt;/code&gt; promise does not mean HTTP 200. Validate the JSON shape before rendering. See &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch" rel="noopener noreferrer"&gt;MDN: Using the Fetch API&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Keep the decorative dots hidden from assistive technology (&lt;code&gt;aria-hidden="true"&lt;/code&gt;) while keeping the &lt;code&gt;role="status"&lt;/code&gt; region mounted outside the &lt;code&gt;aria-busy&lt;/code&gt; results container. Always verify announcements with your target browser and screen reader before shipping. See &lt;a href="https://www.w3.org/TR/wai-aria-1.2/#status" rel="noopener noreferrer"&gt;WAI-ARIA status and busy definitions&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Respect OS motion settings with &lt;code&gt;prefers-reduced-motion&lt;/code&gt;. Hiding decorative motion leaves the status text intact rather than assuming a shorter animation duration works for every user. See &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@media/prefers-reduced-motion" rel="noopener noreferrer"&gt;MDN: prefers-reduced-motion&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Use a skeleton when you know the layout
&lt;/h2&gt;

&lt;p&gt;A skeleton works best when it closely matches the content that will replace it. A profile placeholder can reserve an avatar and two text lines. A table placeholder should match the real column layout. Avoid showing arbitrary rows that promise a structure the API response will never return.&lt;/p&gt;

&lt;p&gt;If you want a starting point for a compact avatar-and-lines placeholder, Mova ships &lt;code&gt;skeleton-loader&lt;/code&gt; (a compact 120px-max visual you should resize to your real container after inspecting its source):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @mova-ui/react@0.8.0 add skeleton-loader
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also inspect other loading patterns such as &lt;a href="https://mova-ui.com/components/loaders/border-trail-loading" rel="noopener noreferrer"&gt;Border Trail Loading&lt;/a&gt; in the &lt;a href="https://mova-ui.com/components/loaders" rel="noopener noreferrer"&gt;Mova UI catalog&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Treat skeleton shapes as decorative and provide one clear loading message for the region. Reserve space deliberately in the surrounding layout, and verify transitions across real text lengths, images, and responsive breakpoints instead of assuming a skeleton automatically eliminates layout shift.&lt;/p&gt;

&lt;p&gt;For React code that suspends, a &lt;code&gt;&amp;lt;Suspense&amp;gt;&lt;/code&gt; boundary can show the matching fallback. A &lt;code&gt;fetch&lt;/code&gt; call inside &lt;code&gt;useEffect&lt;/code&gt; does not trigger a Suspense boundary by itself, so follow your framework's data-loading layer or manage explicit request state as shown above. See &lt;a href="https://react.dev/reference/react/Suspense" rel="noopener noreferrer"&gt;React: Suspense&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use progress when completion is measurable
&lt;/h2&gt;

&lt;p&gt;When an upload or multi-step job reports real bytes sent and total bytes, a native &lt;code&gt;&amp;lt;progress&amp;gt;&lt;/code&gt; element communicates that measurement directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&amp;gt;&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;label&lt;/span&gt; &lt;span class="n"&gt;htmlFor&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"upload-progress"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nc"&gt;Uploading&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;progress&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"upload-progress"&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="n"&gt;max&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="n"&gt;bytes&lt;/span&gt; &lt;span class="n"&gt;uploaded&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Derive &lt;code&gt;value&lt;/code&gt; from real completed progress rather than a fake timer. If the total size is unknown, omit the &lt;code&gt;value&lt;/code&gt; attribute to render an indeterminate native indicator. Always label the control explicitly, because text placed inside &lt;code&gt;&amp;lt;progress&amp;gt;&lt;/code&gt; is not its accessible label. See &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/progress" rel="noopener noreferrer"&gt;MDN: progress&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Finishing the transfer does not always mean server processing is done. Switch the label or state once bytes finish uploading and server-side processing starts. Reserve &lt;code&gt;&amp;lt;progress&amp;gt;&lt;/code&gt; for task completion; use &lt;code&gt;&amp;lt;meter&amp;gt;&lt;/code&gt; for a scalar measurement within a known range. See &lt;a href="https://www.w3.org/WAI/ARIA/apg/patterns/meter/" rel="noopener noreferrer"&gt;W3C APG: Meter Pattern&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Verify transitions before picking the animation
&lt;/h2&gt;

&lt;p&gt;Before polishing timing curves, walk through five real cases: a slow success, an empty result, an HTTP failure, a keyboard retry, and a refresh while stale data is already on screen.&lt;/p&gt;

&lt;p&gt;Check three things every time:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Changing request parameters aborts the in-flight browser fetch and invalidates its generation counter so an older response cannot overwrite newer state. Note that aborting in the browser does not guarantee the server cancels work already accepted; see &lt;a href="https://react.dev/reference/react/useEffect" rel="noopener noreferrer"&gt;React: useEffect&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Keyboard focus stays predictable on retry and never gets trapped or dropped when a button disables or unmounts.&lt;/li&gt;
&lt;li&gt;Pending indicators disappear cleanly when work settles, leaving the next useful user action visible.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you want copy-paste React motion primitives and loading components with live playgrounds and zero lock-in, explore &lt;a href="https://mova-ui.com/" rel="noopener noreferrer"&gt;Mova UI&lt;/a&gt; or install individual components with &lt;code&gt;npx @mova-ui/react add &amp;lt;component&amp;gt;&lt;/code&gt;.&lt;/p&gt;

</description>
      <category>react</category>
      <category>typescript</category>
      <category>frontend</category>
      <category>webdev</category>
    </item>
    <item>
      <title>An agent can finish a task. Can it stay with a goal for three months?</title>
      <dc:creator>Zeeland</dc:creator>
      <pubDate>Mon, 17 Aug 2026 11:41:01 +0000</pubDate>
      <link>https://dev.to/zeeland/an-agent-can-finish-a-task-can-it-stay-with-a-goal-for-three-months-5nn</link>
      <guid>https://dev.to/zeeland/an-agent-can-finish-a-task-can-it-stay-with-a-goal-for-three-months-5nn</guid>
      <description>&lt;p&gt;I've been stuck on a question lately: have we designed agents too narrowly around finishing one task?&lt;/p&gt;

&lt;p&gt;Most agent products still revolve around a run. You give the agent a task. It reads the request, makes a plan, calls tools, checks its work, and returns something.&lt;/p&gt;

&lt;p&gt;Multi-agent systems, workflows, and subagents make that run more capable, but the unit of work is mostly unchanged. We are still asking: how do we get this task done?&lt;/p&gt;

&lt;p&gt;A lot of work I care about does not fit that shape.&lt;/p&gt;

&lt;p&gt;There is no complete plan at the beginning. The answer depends on feedback that has not arrived yet. The useful next move may happen tomorrow, next week, or after someone else acts.&lt;/p&gt;

&lt;p&gt;That kind of work is less like a task and more like a loop that stays alive.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvxt5v71fg168n17svlqu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvxt5v71fg168n17svlqu.png" alt="A long goal is made of short, verifiable cycles" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Cold email is not one task
&lt;/h2&gt;

&lt;p&gt;Take cold email.&lt;/p&gt;

&lt;p&gt;You could write the task like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Find 100 prospects, write the emails, and send them.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;An agent can probably do that in one run. But sending 100 emails is rarely the goal. The goal is closer to this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Find an outbound approach that produces useful customer conversations at a repeatable rate.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That can take weeks.&lt;/p&gt;

&lt;p&gt;You can only send so many emails each day. Once the batch is out, there is little value in keeping the agent busy. It needs to wait.&lt;/p&gt;

&lt;p&gt;Some people reply the same day. Others reply three days later. One subject line may get opens but no replies. Another message may get replies from people who are a poor fit.&lt;/p&gt;

&lt;p&gt;The work looks more like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Read yesterday's results
Check replies, bounces, and today's sending limit
Find the biggest gap in the current approach
Choose one audience or message to test
Send a bounded batch
Save the evidence
Wait for the outside world
Decide again tomorrow
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each day is a small cycle. The goal lives across many of them.&lt;/p&gt;

&lt;p&gt;The second day cannot be a replay of the first prompt. The agent needs to use what happened yesterday and make a fresh decision.&lt;/p&gt;

&lt;h2&gt;
  
  
  Waiting is part of the work
&lt;/h2&gt;

&lt;p&gt;Most agent systems are awkward around waiting.&lt;/p&gt;

&lt;p&gt;If an agent stops acting during a run, it looks idle, failed, or blocked. But waiting is often the correct state for a longer goal.&lt;/p&gt;

&lt;p&gt;You may be waiting for replies, CI, code review, an app store review, a week of product data, or a human decision. None of those necessarily mean the work is stuck.&lt;/p&gt;

&lt;p&gt;Sometimes the honest state is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;There is nothing worth doing right now, but the goal is still active.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This changes how I think about heartbeats.&lt;/p&gt;

&lt;p&gt;A heartbeat should not simply wake an agent on a timer and tell it to work. It should give the agent a chance to look at the world again and decide whether action is due.&lt;/p&gt;

&lt;p&gt;A healthy heartbeat might produce:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;No new feedback
No reason to change the current strategy
Keep waiting
Check again tomorrow at 9:00
Wake earlier if a customer replies
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No new task. No expensive tool calls. No performance theater.&lt;/p&gt;

&lt;p&gt;The loop is still doing its job.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5mho1p48ld5j1gfp6a03.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5mho1p48ld5j1gfp6a03.png" alt="A heartbeat decides whether action is due" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Our release work made this concrete
&lt;/h2&gt;

&lt;p&gt;We have been trying to make Rudder releases faster and more predictable.&lt;/p&gt;

&lt;p&gt;"Release v0.6.5" is a task. It has a version number, a script, and a finish line.&lt;/p&gt;

&lt;p&gt;The goal we care about is different:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Make every release finish inside a predictable time window.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;One lucky fast release does not prove that the release system improved.&lt;/p&gt;

&lt;p&gt;We need to know how long it takes from locking the source commit to verifying every public surface. We need separate timing for npm, the GitHub release, Desktop builds, and the docs site. We need to see how much time went into actual machine work and how much disappeared into queues, repeated checks, failures, and recovery.&lt;/p&gt;

&lt;p&gt;The p90 matters more than a flattering average.&lt;/p&gt;

&lt;p&gt;Over the past few releases, we have tightened the link between a release and the exact commit that passed CI. We have cut repeated validation where the same source was already verified, moved cheap failure checks earlier, reduced competition between canary and stable releases, and made the handoff to the next version less fragile.&lt;/p&gt;

&lt;p&gt;Each change can be filed as a feature or a fix. If we stop when the pull request merges, we miss the point.&lt;/p&gt;

&lt;p&gt;The next real release has to tell us whether the change worked.&lt;/p&gt;

&lt;p&gt;The loop looks something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Run a real release
Save timing and failure evidence for every stage
Find the longest tail
Form one improvement hypothesis
Make the smallest useful change
Test it during the next real release
Keep it, change it, or roll it back
Find the next bottleneck
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The goal does not belong to any single release. It learns from all of them.&lt;/p&gt;

&lt;p&gt;That is a different kind of software work. The code change is only one move. The evidence arrives later.&lt;/p&gt;

&lt;h2&gt;
  
  
  Feature work has the same problem at a smaller scale
&lt;/h2&gt;

&lt;p&gt;We recently worked on scroll performance in long Rudder Messenger conversations.&lt;/p&gt;

&lt;p&gt;"Fix blank areas while scrolling" fits neatly into an issue.&lt;/p&gt;

&lt;p&gt;The outcome we want is broader:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Messenger should remain stable and readable under the load of real agent work.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;One code change cannot prove that.&lt;/p&gt;

&lt;p&gt;We reproduce the problem, form a theory, change a small part of the system, run a pressure test, open the actual interface, and look for new failure modes.&lt;/p&gt;

&lt;p&gt;Passing the automated test gives us evidence, but not enough evidence. Maybe the blank area is gone and the scroll position now jumps. Maybe one conversation works and a stream of live updates makes it slow again.&lt;/p&gt;

&lt;p&gt;For feature work, a useful loop should end when we have learned something concrete, not when we have written a certain amount of code.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Fast scrolling through 1,000 messages no longer creates blank areas, and we verified it in both the real interface and the pressure test.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is a small, falsifiable cycle.&lt;/p&gt;

&lt;p&gt;"Keep Messenger smooth under real workloads" is the longer goal that contains it.&lt;/p&gt;

&lt;h2&gt;
  
  
  A bigger goal should not become a bigger task
&lt;/h2&gt;

&lt;p&gt;I do not think we should model a three-month goal as a three-month agent session that never ends.&lt;/p&gt;

&lt;p&gt;An ever-growing context window is a poor substitute for durable work state.&lt;/p&gt;

&lt;p&gt;The continuity should live in saved decisions, evidence, and checkpoints. At the end of a run, the agent should leave enough behind for the next run to answer a few plain questions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Where are we now?
What changed?
What evidence did we get?
What gap remains?
Which gap matters most?
What should we test next?
Should we act now or wait?
What event or time should wake us again?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The next run could start in a fresh session, or even with a different agent. It should still understand why the goal exists, what the last run learned, and what deserves attention now.&lt;/p&gt;

&lt;h2&gt;
  
  
  I think there are at least three loops
&lt;/h2&gt;

&lt;p&gt;The first is the run loop. It lasts minutes or hours.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Understand the local objective
Choose the next move
Act
Observe the result
Compare it with the objective
Adjust or stop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Its job is to produce one piece of verified progress.&lt;/p&gt;

&lt;p&gt;The second is the heartbeat loop. It lasts days or weeks.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Read the last checkpoint
Check time, events, and outside feedback
Decide whether action is due
Create or execute the next piece of work
Update the state
Set the next wake condition
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Its job is to preserve continuity across runs without manufacturing work.&lt;/p&gt;

&lt;p&gt;The third is the goal loop. It can last for weeks or months.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Check whether the outcome is improving
Ask whether the current strategy still works
Find the new bottleneck
Change the tasks, process, skills, or resources
Learn from the next real result
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This loop cares about the state of the outside world. A pile of completed tasks is not enough.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu18ulqso6h9btqasvdiv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu18ulqso6h9btqasvdiv.png" alt="The run, heartbeat, and goal loops operate at different timescales" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  This creates a lot of uncomfortable product questions
&lt;/h2&gt;

&lt;p&gt;How should an agent distinguish healthy waiting from a stalled goal?&lt;/p&gt;

&lt;p&gt;Should heartbeats run on a fixed schedule, or should events, metric changes, and timeouts wake them?&lt;/p&gt;

&lt;p&gt;What is the smallest checkpoint that lets another agent take over without losing the plot?&lt;/p&gt;

&lt;p&gt;Should the goal owner choose the next move, or should a workflow constrain that choice?&lt;/p&gt;

&lt;p&gt;How do we stop an agent from creating busywork because it wants to look active?&lt;/p&gt;

&lt;p&gt;How should token budgets and permission boundaries work across a goal that lasts for months?&lt;/p&gt;

&lt;p&gt;Who decides that the goal is done: the agent, a metric, or a human reviewer?&lt;/p&gt;

&lt;p&gt;What should the system show when every local task is complete but the outcome has not moved?&lt;/p&gt;

&lt;p&gt;Can an agent change its strategy while remaining unable to quietly rewrite its own success criteria?&lt;/p&gt;

&lt;p&gt;I find these questions more interesting than squeezing a few more tool calls into one run.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Undertone0809/rudder" rel="noopener noreferrer"&gt;Rudder&lt;/a&gt; turns goals, tasks, chats, issues, agent runs, reviews, and feedback into a work loop for agent teams. It gives humans and agents a shared operating structure for moving work forward, running agents, reviewing outputs, controlling spend, and preserving the lessons that should make the next run better.&lt;/p&gt;

&lt;p&gt;We are now asking whether a goal can become more than a durable reason attached to work. Can it actively carry a loop across many runs, keep watching the gap, and decide when to act again?&lt;/p&gt;

&lt;p&gt;That would mean treating waiting as a first-class state. Every run would leave a usable checkpoint. Goals would have access to real metrics, outside feedback, cost, and evidence. The system would need to know when to act, when to stop, when to change its approach, and when it has enough evidence to call the goal achieved.&lt;/p&gt;

&lt;p&gt;I do not think we have the full answer yet. I am not even sure "goal controller" is the right abstraction.&lt;/p&gt;

&lt;p&gt;But I keep coming back to the same thought.&lt;/p&gt;

&lt;p&gt;The next step for agents may have less to do with making one run more powerful. It may be whether an agent can return to the same goal tomorrow, next week, or next month, understand what changed, and make a better decision than it made today.&lt;/p&gt;

&lt;p&gt;If an agent can finish tasks but cannot stay with an outcome, wait for feedback, or change its strategy, is it working toward a goal or just following instructions?&lt;/p&gt;

&lt;p&gt;I would love to see how other people are thinking about this.&lt;/p&gt;

</description>
      <category>softwareengineering</category>
      <category>ai</category>
      <category>agents</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
