Skip to content

feat(mobile): Live Activity freshness chips and Bot chat deep links - #276

Merged
sambitcreate merged 4 commits into
mainfrom
feature/live-activity-freshness
Sep 30, 2026
Merged

sambitcreate merged 4 commits into
mainfrom
feature/live-activity-freshness

Conversation

@sambitcreate

Copy link
Copy Markdown
Owner

Summary

This brings Aiden On The Go to Hermex 1.7 parity for two features:

  • Live Activity freshness chips (iOS). The lock screen and the expanded Dynamic Island now show a tool-call chip and an "Updated 12s ago" chip. The chip changes to "Stale … ago" when a run stops making progress.
  • Bot chat deep link (iOS and Android). aiden-otg://bot/{botId}/chat (optionally with ?instance=) opens that Bot's chat. It is handled the same way as the existing aiden-otg links.

Source

  • The Hermex 1.7 parity request.
  • Plan: docs/plans/live-activity-freshness-bot-deeplinks-plan.md.

Changes

iOS Live Activity

  • New state field: ContentState.toolCallCount.
    • The reducer increments it on each tool start and passes it through every other transition.
    • The chip is capped at "99+ tools" and hidden when the count is 0.
  • Older payloads: a custom init(from:) decodes ContentState payloads created before this change. iOS keeps running activities across app updates, so this matters.
  • Stale runs keep their last update time. stale() now leaves updatedAt alone, so "Stale 3m ago" reports the last real progress. Before, the stale transition reset it to the current time.
  • Relative time updates on its own. The freshness chip uses Text(date, style: .relative), so it stays current while the app is suspended.
  • Stale styling. The chip, dot and panel tint use a combined stale state: the reducer's flag, or ActivityKit's context.isStale once the 300 s staleDate passes.
  • Visual rules. The chips use soft pill fills and semantic text colors, with no colored borders.

iOS Bot deep link

  • Parsing. AidenDeepLink.botChatURL builds the link and .botChat is its new destination. Parsing is strict and checks the raw percent-encoded path, so an encoded separator can never decode into a different Bot ID.
  • Routing. AidenProductShellView resolves the link through aidenResolvedBotDeepLink. It uses the same canonical one-chat-per-Bot ordering as Bots Home.
    • When the Bot has a chat, the link opens it.
    • When it has none, the app lands on Bots with that Bot selected and shows a notice.
    • A link never creates a chat.
  • Workspace shell. A Bot link arriving there is refused rather than reinterpreted.

Android

  • Parsing. AidenDeepLink.botChatUrl builds the link, and parse returns a new AidenNavigationDestination.BotChat. It applies the same strict raw-path and query rules as iOS.
  • Routing. MainActivity resolves the link through aidenResolvedBotDeepLink.
    • With a chat, it opens that chat's detail screen after checking the chat belongs to the Bot.
    • Without one, it opens the Bot's profile.

Docs

  • New plan doc, plus a row in docs/plans/README.md.
  • .memory/live-activity-freshness-bot-deeplinks.md.
  • A papercut entry.

Decisions

Tests run

  • iOS: xcodebuild test on the iPhone 16e simulator with Xcode-beta passed 57 of 57. It covered AidenNativeIntegrationTests, AidenBotCacheTests and AidenProductShellTests, and built the Live Activity widget extension along with the app. New tests:
    • Bot link round-trip, plus rejection of 14 ambiguous or unsafe links.
    • The Bot link resolves to the same canonical chat as Bots Home.
    • The tool count accumulates across transitions, and a stale run keeps its last update time.
    • The chip label is capped and uses singular/plural correctly.
    • ContentState encoded before this change still decodes.
  • Android: ./gradlew :app:testDebugUnitTest passed 252 of 252, including the new Bot link parsing and resolution tests.
  • Swift file sizes: ios/scripts/check-swift-file-sizes passed. It is warning-only, and AgentRunActivityAttributes.swift is now 526 LOC.

Follow-ups

  • Freshness chips for Android's live run notification.
  • A compact iPhone Bot profile sheet for the case where the Bot has no chat.
  • Acceptance on a physical device: Lock Screen, Dynamic Island, and opening the link from Notes and Safari on iOS and Android.

🤖 Generated with Claude Code

iOS Live Activities now show a bounded tool-call chip and a self-updating
"Updated Xs ago" / "Stale" chip so a stale run is obvious. Marking a run
stale keeps its last real update time, and older ContentState payloads
still decode.

Adds aiden-otg://bot/{id}/chat on iOS and Android. It opens the Bot's
canonical conversation (same ordering as Bots Home), never creates a
chat from a URL, and falls back to the Bot itself when no chat exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

The freshness chip can show false recency after foreground reconciliation, so its core signal is unreliable until progress and status-refresh timestamps are separated.

Reviewed changes This review covers the full 17-file, single-commit change at 4c7b20e.

  • iOS Live Activity freshness. Adds persisted tool-call counts, legacy payload decoding, relative freshness chips, and ActivityKit stale-state presentation.
  • Cross-platform Bot links. Adds strict aiden-otg://bot/{botId}/chat parsing and routes to the canonical existing Bot chat on iOS and Android without creating chats.
  • Tests and project records. Adds mobile behavior coverage and records the implementation plan, memory, and follow-ups.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using GPT Luna | 𝕏

@pullfrog

pullfrog Bot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Pullfrog stalled

The agent stopped emitting events for 125s and was killed by the activity-timeout watchdog. The model produced no output at all before the stall — the request was sent but nothing came back. This is usually transient; re-running often succeeds.

Recent agent stderr
timestamp=2026-09-27T17:22:28.475Z level=ERROR run=deb7f004 message="stream error" providerID=opencode-go modelID=glm-5.3-flash session.id=ses_f1c21509affeyLU79mslGLExT9 small=false agent=build mode=primary error.error.message="Streaming response failed: [server_error] request failed" error.error.type=server_error error.error.param=null
timestamp=2026-09-27T17:37:26.423Z level=ERROR run=deb7f004 message="stream error" providerID=opencode-go modelID=glm-5.3-flash session.id=ses_f1c21509affeyLU79mslGLExT9 small=false agent=build mode=primary error.error="AI_APICallError: Go usage limit exceeded"

Pullfrog  | Rerun failed job ➔ | View workflow run | via Pullfrog | Using GLM Flash | 𝕏

@sambitcreate
sambitcreate merged commit fe1eacd into main Sep 30, 2026
22 checks passed
@sambitcreate
sambitcreate deleted the feature/live-activity-freshness branch September 30, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant