Skip to content

fix(ios): keep the waiting-for-approval ask on stale Live Activities - #351

Merged
sambitcreate merged 2 commits into
mainfrom
fix/la-stale-keeps-waiting
Oct 6, 2026
Merged

sambitcreate merged 2 commits into
mainfrom
fix/la-stale-keeps-waiting

Conversation

@sambitcreate

Copy link
Copy Markdown
Owner

Summary

When a Live Activity went stale, the Lock Screen's activity line always said "Latest status shown". That also happened when the run was waiting for approval, so the one state that needs the user looked like generic stale progress.

  • New pure, shared (app + widget) AgentRunStalePresentation.copy(for:systemMarkedStale:) in AgentRunActivityAttributes.swift:
    • stale + waitingForApproval → lead "Waiting for approval", action "Open to answer"
    • stale + any other non-final status → lead "Latest status shown", no action
    • fresh or final → nil (each surface keeps its existing lead)
  • Lock Screen: activity line uses the stale lead. The transcript panel shows the action line above the excerpt, and the excerpt drops to one line.
  • Expanded Dynamic Island bottom: a stale waiting run shows "Waiting for approval · Open to answer" in place of older reply text.
  • AgentRunActivityStateReducer.stale() falls back to the same lead when the activity line is empty.
  • Stale styling (status dot, keyline, freshness chip, trailing "Latest") is unchanged. Fresh states are unchanged.

The approach follows the Hermex stale-Bot fix (uzairansaruzi/hermex#842) but without Bot-specific "Not connected" copy, which Aiden doesn't have.

Decisions

  • Only waitingForApproval gets the exception. Aiden has no separate clarification status.
  • On the Lock Screen, the action takes the excerpt's first line rather than adding a new row, so the activity height stays the same.
  • No ContentState field changes. The decision is computed at render time, so states encoded by older builds decode as before. A test covers a legacy payload.

Testing

  • xcodebuild test (Xcode-beta, iPhone 17e simulator, derived data inside the worktree) -only-testing:AidenOnTheGoTests/AidenNativeIntegrationTests: TEST SUCCEEDED, 29 passed, 0 failed. This build also compiled the AidenLiveActivityWidget target.
    • New tests: matrix over every AgentRunActivityStatus × fresh / reducer-stale / system-stale; finished run never presents as stale waiting; legacy-encoded stale waiting state decodes and keeps the waiting lead.
  • Release Xcode (~/Downloads/Xcode.app) could not run simulator tests locally: CoreSimulator version mismatch.
  • No shared server contract or Android changes (this is iOS widget presentation only).

🤖 Generated with Claude Code

A run waiting for approval is still blocked on the user after the phone
stops receiving updates, but staleness replaced its Lock Screen line with
"Latest status shown". A shared pure AgentRunStalePresentation now picks
the stale copy: waitingForApproval keeps its title and adds "Open to
answer" on the Lock Screen and expanded Dynamic Island; every other stale
status keeps "Latest status shown". Stale styling is unchanged.

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.

✅ No new issues found.

Reviewed changes across the shared iOS state helper, both Live Activity presentations, regression tests, and the project memory update.

  • Stale approval copy: Preserves “Waiting for approval” and adds “Open to answer” for stale waiting states, while retaining generic stale copy for other non-final states.
  • Widget presentation: Updates the Lock Screen lead and transcript panel, and prioritizes the approval action over older reply text in the expanded Dynamic Island without changing stale styling or navigation.
  • Reducer fallback: Uses the waiting title when a stale waiting state has an empty activity line, without changing persisted fields or progress timestamps.
  • Behavioral coverage: Adds exact-output assertions for fresh and both stale signals, final-state suppression, and legacy state decoding; documents the behavior in project memory.

Swift syntax parsing passed for all three changed Swift files. Native XCTest and widget rendering could not be independently run on this Linux runner because xcodebuild is unavailable; the exact-head iOS simulator CI job was still running when checked, so merge remains contingent on its success.

Pullfrog  | View workflow run | Using gpt-6.1-sol | 𝕏

@sambitcreate
sambitcreate merged commit 1af5b63 into main Oct 6, 2026
19 checks passed
@sambitcreate
sambitcreate deleted the fix/la-stale-keeps-waiting branch October 6, 2026 03:36
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