Skip to content

Text-only Live Activities and answerable run alerts on iPhone - #881

Open
sambitcreate wants to merge 17 commits into
mainfrom
feature/aiden-ios-notifications-activities-62cf67
Open

sambitcreate wants to merge 17 commits into
mainfrom
feature/aiden-ios-notifications-activities-62cf67

Conversation

@sambitcreate

@sambitcreate sambitcreate commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

What was wrong

On iPhone, run alerts and Live Activities were behind. The Live Activity drew a dot, a progress "hill", chips and tints, but you couldn't act on it. Notifications only opened the app. Several runs on one Mac each got their own card. Once the app went to the background, a run that was about to finish left its card frozen.

This PR is Plan A (docs/plans/ios-alerts-app-only-plan.md). It is app-only: no push relay, no Remote protocol revision and no server or Android contract change. Plan B, the push relay, is not part of this PR.

What changed

  • Text-only Live Activity and Dynamic Island. The card is plain text on a clean background: the chat title, one status line and "… ago". The dot, hill, chips and tints are gone. A stale card says "Latest status shown".

  • Act from the Lock Screen. An approval card has Review, which opens the chat, and Deny, which runs in the app through LiveActivityIntent. Once the approval is answered, the card shows the answer.

  • Act from the notification. Run alerts offer Approve, Deny and Reply. Reply needs an unlocked phone. If an answer can't reach the Mac, the alert comes back, so it never looks answered.

  • Settings → Notifications on iPhone. Switches for:

    • approvals and questions
    • a response is ready
    • a response fails
    • a Bot hands me a step
    • message text in alerts
    • reply text on the Lock Screen
    • quiet for the open chat

    The old Appearance → Privacy excerpt toggle is replaced, with no migration (pre-1.0).

  • One summary card per Mac. When a Mac has more than one run going, the runs merge into one card with a row per run. A tap opens the most urgent chat. The card ends 300 s after every run is final.

  • Background grace. When the app goes to the background with a live run, it asks iOS for a short background task. That keeps the stream open long enough for a finishing run to update its card. The task ends 3 s after the last run ends, or when the app returns to the foreground.

Fixes from the final whole-branch review

  • If the Mac already had an answer, the card shows the Mac's decision, or "No longer waiting" if that decision isn't known, instead of the phone's choice.
  • On a run this phone didn't start, Deny appears only when the phone is allowed to answer.
  • The summary card is marked stale like a single-run card, showing "Latest status shown" and how long ago it updated.
  • A run that finishes while its card is being merged into the summary still ends the summary.
  • A Lock Screen Deny that can't reach the Mac posts an alert, "Deny didn't reach your computer", that opens the chat.

Docs

  • ios/CHANGELOG.md (unreleased)
  • docs/aiden-on-the-go-remote-access.md
  • docs/plans/README.md and both plan files
  • .memory/live-activity-freshness-bot-deeplinks.md

Tests

Device checks before TestFlight

These weren't verified on hardware. The simulator's demo Mac never connected under load, so they rest on unit tests:

  • Background grace keeps a finishing run's card updating after the app goes to the background.
  • The summary card's stale line looks right on the Lock Screen at full brightness.
  • Lock Screen Deny works before first unlock after a reboot.

Known follow-ups (minor, deferred)

  • 409 operation_stale (run already finished) opens the chat instead of being treated as answered.
  • Approve always sends a one-time scope. The category should follow card.offers(.allow, .once).
  • A revoked Mac reads as unreachable, so the notification action posts again.
  • A run reattaching inside a summary resets its row to "Starting".
  • After a successful Reply, the card keeps "Has a question" until the run moves on.

@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 iOS release gate is currently red because its reviewed source and widget contracts were not updated with this change.

Reviewed changes across the full 11-commit branch, including the iOS notification-action path, Live Activity lifecycle, summary-card merge and reconciliation, background grace, settings, docs, and behavioral tests.

  • Text-only activity surfaces — Replaces status decoration with bounded title, status, timing, optional reply text, small-family layouts, and reduced-luminance behavior.
  • Answerable alerts and cards — Adds authenticated Approve, Deny, Reply, Review, Remote response routing, resolved-race handling, and fallback alerts when card actions cannot reach the Mac.
  • Notification preferences — Adds device-local per-kind, message-text, reply-text, and quiet-open-chat controls under iPhone Settings.
  • Per-Mac summaries — Merges concurrent runs into urgency-ordered summary Live Activities with stale-state and final-state handling.
  • Background grace — Tracks active runs independently of ActivityKit and briefly extends execution after backgrounding.
  • Documentation and coverage — Adds the app-only and future push-relay plans, product/user docs, changelog entries, and focused XCTest coverage.

Pullfrog  | ⚠️ this action is pinned to a commit SHA, which freezes the cleanup step — switch to @v0 or keep the SHA fresh with Dependabot | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using GPT Sol | 𝕏

The app and widget source allowlists now include the notification,
approval-intent, summary and background-grace files. The widget check no
longer requires the removed logo status mark; the text-only card is
covered by the Swift text-presentation tests.

@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 since the prior Pullfrog review at 300a97fee, focused on the release-contract repair in fa4e4e20f.

  • Shipping inventories — Added the six new app sources and three new widget sources to the exact Xcode target allowlists, including the Notifications settings source in the combined workspace-shell inventory.
  • Text-only contract cleanup — Removed the obsolete logo-mark source assertion without replacing it with another source grep; native presentation tests cover the intended text-only behavior while the release suite still enforces exact source membership.
  • Release verification — Confirmed npm run test:ios-release passes all 33 Node subtests and 20 Ruby policy tests with 42 assertions.

Pullfrog  | ⚠️ this action is pinned to a commit SHA, which freezes the cleanup step — switch to @v0 or keep the SHA fresh with Dependabot | View workflow run | Using GPT Sol | 𝕏

The card starts without an approval, so on a slow runner the wait for
'no approval' matched the opening state before the approval update
landed. Wait for the approval to show first.

@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 since the prior Pullfrog review at fa4e4e20f, focused on the broker regression test stabilization in 45faccfa5.

  • Waited for the approval state — Made the ActivityKit-backed broker test observe the approval-bearing content before simulating the Mac’s winning answer, so its later approval == nil predicate can no longer accept the card’s opening state.
  • Preserved an independent failure signal — Kept the existing delivered-content helper’s stream and ceiling failures in the path, so a missing approval still fails rather than being hidden by the new sequencing.

Pullfrog  | ⚠️ this action is pinned to a commit SHA, which freezes the cleanup step — switch to @v0 or keep the SHA fresh with Dependabot | View workflow run | Using GPT Sol | 𝕏

…ifications-activities-62cf67

# Conflicts:
#	ios/AidenOnTheGo.xcodeproj/project.pbxproj
#	ios/CHANGELOG.md
#	scripts/check-ios-shipping-target.test.mjs

@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 since the prior Pullfrog review at 45faccfa5, focused on the main merge and its three conflict resolutions.

  • Merged current main — Added the Home quick-action widget and startup dispatch while preserving the PR’s notification broker, background grace, and existing Bot draft-store initialization.
  • Reconciled Xcode target membership — Kept both the Home/quick-action sources from main and the Live Activity, intent, responder, preferences, settings, and summary sources from this branch in their correct app and widget phases.
  • Updated release contracts and history — Kept the shipping-source inventories aligned with the merged Xcode project and retained both sets of unreleased changelog entries; npm run test:ios-release passes all 33 Node subtests and 20 Ruby policy tests.

Pullfrog  | ⚠️ this action is pinned to a commit SHA, which freezes the cleanup step — switch to @v0 or keep the SHA fresh with Dependabot | View workflow run | Using GPT Sol | 𝕏

…ifications-activities-62cf67

# Conflicts:
#	docs/plans/README.md
#	ios/AidenOnTheGo/Config/AidenAppearance.swift
…ifications-activities-62cf67

# Conflicts:
#	ios/CHANGELOG.md
…ifications-activities-62cf67

# Conflicts:
#	docs/plans/README.md

This branch has not been deployed

No deployments
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