Repository navigation
Add capability-gated native Bot Queue and Steer controls - #223
sambitcreate wants to merge 11 commits into
Conversation
# Conflicts: # .memory/mobile-bot-cockpit.md # ios/AidenOnTheGoTests/AidenChatTests.swift
There was a problem hiding this comment.
Important
This PR has two integration correctness issues that should be addressed before merging: the stacked OpenAPI contract can drop required UTF-8/nonblank metadata, and Android can apply stale chat data after a pairing switch during receipt reconciliation.
Reviewed changes
- Native Bot controls — Adds feature-gated Steer and Queue controls, current-stream checks, and composer/send-state changes to the Android and iOS Bot chat surfaces.
- Admission contract — Adds request and receipt models, strict identity/shape validation, native
POST /streams/{streamId}/inputsclients, shared fixtures, and protocol documentation. - Durable uncertainty handling — Persists unconfirmed submissions, preserves drafts across unknown outcomes and restarts, refreshes accepted receipts, and extends native/onboarding coverage.
GPT Luna | 𝕏
# Conflicts: # .memory/mobile-bot-cockpit.md # ios/AidenOnTheGoTests/AidenChatTests.swift
There was a problem hiding this comment.
Important
The new Android fence still leaves a title-refresh path that can publish stale data after a pairing switch; this should be addressed before merging.
Reviewed changes This incremental review covers the Android receipt-refresh fence and the synchronized run-input schema added since the prior Pullfrog review.
- Fenced Android receipt reconciliation — Added a post-read check for the bound client and current paired instance/device, plus a held pairing-switch regression.
- Synchronized host schema metadata — Restored the nonblank pattern and UTF-8-byte extension in
ChatRunInputRequestand asserted them in the protocol tests.
GPT Luna | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes This incremental review covered the Android pending-title reconciliation changes added after the prior Pullfrog review.
- Fenced title refreshes — Added bound-client and paired instance/device checks before and after each pending-title retry read, preventing old-pairing transcript or cache publication.
- Added pairing-switch regression — Held the retry response during a pairing switch and verified the admitted message remained in the chat and its original cache.
GPT Luna | 𝕏
# Conflicts: # .memory/mobile-bot-cockpit.md # ios/AidenOnTheGoTests/AidenChatTests.swift
There was a problem hiding this comment.
Important
The approval fallback can still hide a current approval indefinitely when the read it coalesces fails or is canceled. On iOS, the marker can also remain set after the snapshot has already published an approval, so a failed response can skip the required refresh.
Reviewed changes This incremental review covers the approval-fallback changes merged from the stacked branch after f72d3eab; the later b4fc1e1b merge adds no consumer behavior.
- Coalesced approval recovery — Reused a matching in-flight approval snapshot for ambiguous responses and added held-order Android/iOS regressions.
⚠️ Fallback coalescing can strand the current approval
The fallback returns as soon as it sees a matching in-flight snapshot, but that request can subsequently fail or be canceled and leave the state in RECONCILING with no later read. On iOS, the marker remains in flight while liveActivities.approvalRequired awaits after publishing the card, so a failed response during that await can also return without starting a fresh read.
Technical details
# Keep fallback coalescing tied to a live authoritative read
## Affected sites
- `android/app/src/main/java/sbtbiswas/AidenOnTheGo/features/chat/AidenChatViewModel.kt:1092-1124, 1281-1288` — `isFallback` suppresses a second read for a matching marker, but a later read failure or cancellation only publishes `RECONCILING`.
- `ios/AidenOnTheGo/Features/Remote/AidenChatFeature.swift:2093-2105, 2419-2427` — the same coalescing path has no retry when the matched read fails or is canceled.
- `ios/AidenOnTheGo/Features/Remote/AidenChatFeature.swift:2450-2459` — the approval is published before `liveActivities.approvalRequired` completes, while the marker is still retained by the surrounding `defer`.
## Required outcome
- Skip the fallback only while the matching authoritative request is still active and able to publish; if it fails or is canceled, leave a later authoritative read able to recover the current approval.
- Clear or advance the iOS in-flight marker when the snapshot has been validated and published, before unrelated awaited side effects, and add held failure/cancellation and post-publication response regressions.GPT Luna | 𝕏
An ambiguous approval response that coalesced with a matching in-flight snapshot read returned immediately, so a later failure or cancellation of that read left the chat in RECONCILING with no card. The fallback now awaits the read's outcome and issues its own read unless the matching read actually published the Mac's snapshot. On iOS the in-flight marker is also settled right after publication, before awaiting Live Activity updates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GAkZRgQzUoKWGpgupF3a4D
|
Run failed. View the logs →
|
2 similar comments
|
Run failed. View the logs →
|
|
Run failed. View the logs →
|
Hermes Review BotConfidence: 5 Engine: SummaryAdds capability-gated native Bot Steer and Queue controls to iOS and Android when the paired host advertises Confidence Score: 5/5Full trace of both Android and iOS implementations, persistence stores, network clients, OpenAPI/protocol specifications, and adversarial test scenarios verified without gaps. 📁 Important Files Changed
FindingsNo findings. Sequence DiagramsequenceDiagram
autonumber
actor User
participant Composer as Mobile Composer (View/VM)
participant DraftStore as Local DraftStore
participant Server as Mac Remote Server (PR #220)
User->>Composer: Tap Steer or Queue (with draft text)
Composer->>DraftStore: save(draft) & setUnconfirmedRunInput(true)
Composer->>Server: POST /streams/{streamId}/inputs (Idempotency-Key)
alt Admission Accepted
Server-->>Composer: 200 ChatRunInputReceipt (accepted: true, admission: "queued", messageId)
Composer->>DraftStore: save("") [if unedited] & setUnconfirmedRunInput(false)
Composer->>Server: GET /chats/{chatId} (reconcile transcript)
Server-->>Composer: 200 AidenChat (refreshed messages)
Composer-->>User: Show notice ("Queued on your Mac...")
else Admission Rejected
Server-->>Composer: 200 ChatRunInputReceipt (accepted: false, reason: "not-active" | ...)
Composer->>DraftStore: setUnconfirmedRunInput(false) [keep draft]
Composer-->>User: Show notice ("Your Mac did not queue...")
else Network Interrupted / Timeout
Server--xComposer: Connection Lost / Timeout
Note over Composer,DraftStore: Unconfirmed marker remains on disk
Composer-->>User: Show review banner; block Send until acknowledged
end
[]
|
|
Run failed. View the logs →
|
1 similar comment
|
Run failed. View the logs →
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Run failed. View the logs →
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(plans): refresh plan index and status for 0.51.0 Supersedes #274. Moves 22 completed plans into docs/plans/completed/, refreshes active plan status against main after 0.51.0, records unlinked shipped changes (#265, #275, #280), and updates .memory notes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(plans): note #220/#223 superseded and Steer moved to #298 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(plans): record desktop and Telegram Steer shipped in #298 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Adds Queue and Steer to iOS and Android Bot chats when the Mac advertises
chat-run-input-v1. Actions bind the displayed stream, require current grants, accept bounded plain text, and validate exact admission receipts. Accepted means durably queued, not consumed by the model.Drafts remain until confirmed admission. A device-local uncertainty marker blocks accidental resend after disconnect/restart and across open chat views; an explicit review action clears it. Newer edits survive receipts. Late accepted receipts refresh the transcript, with an explicit stale notice if that read fails. Native onboarding and the existing Bots tour explain the supported controls.
Dependencies: stacked on #218 (approval/Stop hardening). Requires the host contract/runtime in #220, which depends on #216. Merge alongside #217 while retaining both its recovery/active-owner guards and this PR’s uncertainty guards. No new clarification, secret collection, or child-interrupt contract is introduced.
Validation: combined code
948c4def4includes #217bf5ddba1, #2180d0ca7716(approval fallback fix5fed6040plus a separable capacity-test stability fix), #2201c381bc5, and this PRb4fc1e1b0. All 204 Android JVM tests, lint and instrumentation compilation pass; 157 host/protocol/admission/onboarding checks and the focused capacity test pass. The combined iOS app and XCTest target compile via unsigned generic-device build-for-testing. Two independent Sol integration reviews are clear.The previously published consumer
f72d3eabpassed all hosted checks. Those results do not cover the newer approval fallback fix: hosted checks for the current head are pending. Physical XCTest remains unexecuted because the coordinated iPhone was locked. No merge, release or deployment occurred.