{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "haplollc-thinkingorbs--show-agent-phase-status-in-swiftui",
 "repo": "haplollc/ThinkingOrbs",
 "repo_url": "https://github.com/haplollc/ThinkingOrbs",
 "repo_slug": "haplollc-thinkingorbs",
 "title": "Show live agent status in a SwiftUI chat app",
 "page_title": "How to show live agent status in a SwiftUI chat app with Thinking Orbs",
 "summary": "Map each agent step to a matching orb so users see what the AI is doing.",
 "who": "An iOS developer building a chat or assistant screen where the agent moves between searching, reasoning, calling tools and writing.",
 "problem": "A plain spinner says nothing about what the agent is doing, so users cannot tell a web lookup from a long reasoning step.",
 "outcome": "Each agent phase shows its own orb design, with a smooth crossfade between phases and a status line beside it.",
 "steps": [
  "In Xcode, choose File > Add Package Dependencies and paste https://github.com/haplollc/ThinkingOrbs, or add the package line to Package.swift and add Thinking Orbs to your target's dependencies.",
  "Define an enum for your agent phases and a computed property that returns an OrbDesign for each case, such as .searching for web lookups and .solving for reasoning.",
  "Place ThinkingOrb(phase.orb) in a ZStack with .id(phase.orb) and a .transition(.opacity.animation(.easeInOut(duration: 0.25))) so the old and new orb share one slot.",
  "Add ThinkingOrbLabel(\"Searching the web…\", design: .searching) next to the orb where the status text should appear.",
  "Run the app in a simulator and step through each phase to confirm the orb and label change together."
 ],
 "agent_prompt": "In the ThinkingOrbs repo (https://github.com/haplollc/ThinkingOrbs), read the README's Recipes section and add a phase-to-OrbDesign mapping for <target agent app>. Output the Swift enum, the ZStack view code and one ThinkingOrbLabel per phase. Verify that every case in the enum returns a valid OrbDesign case from the README table.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "1 hour",
 "basis": "readme",
 "caveat": "The package only draws the indicator, so your app still has to decide which agent phase is active and when it changes.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "swift",
 "requirements": [
  "Xcode 16 or later with Swift 6, on a Mac",
  "An app targeting iOS 17+, macOS 14+, tvOS 17+, watchOS 10+ or visionOS 1+",
  "Node, only if you want to run Scripts/differential-sweep.sh (inferred from the README, which says the script runs the original engine under Node)"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/haplollc-thinkingorbs/show-agent-phase-status-in-swiftui/",
 "md": "https://dedupedai.com/use-cases/haplollc-thinkingorbs/show-agent-phase-status-in-swiftui/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/haplollc-thinkingorbs--show-agent-phase-status-in-swiftui.json",
 "api_version": "v1"
}
