Skip to content

Bots rework: Grok-style single-thread bots + Pi Durable sessions - #377

Merged
sambitcreate merged 136 commits into
mainfrom
feature/bot-ui-durable-sessions-2f4474
Oct 8, 2026
Merged

sambitcreate merged 136 commits into
mainfrom
feature/bot-ui-durable-sessions-2f4474

Conversation

@sambitcreate

@sambitcreate sambitcreate commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

What

This PR rebuilds Aiden Bots on desktop, iOS and Android for non-technical users ("simple enough for my mom"), modelled on Grok Bots.

  • One thread per Bot everywhere. Screens go List → Chat → Profile. Model, access, opening greeting and Telegram live under ••• → Advanced.
  • Durable Bot sessions on @earendil-works/pi-durable@1.0.3. Each Bot gets its own harness (<profile>/bots/<id>/session.sqlite), with a profile lock and an aiden-bot extension. That extension reuses Aiden's tools, Full/Custom policy, approvals, MCP, skills, web, subagents, companion vision and Computer Use.
    • After a crash or dropped connection, the chat shows "I got interrupted while working on this." with Resume / Dismiss. Nothing auto-restarts.
    • Approvals and quick-reply questions are re-asked under the same waitId and applied exactly once.
  • Chat:
    • plain bubbles, with all tool progress folded into one Updates line per reply;
    • A–E quick-reply cards (ask_user_question, up to 5 options);
    • file chips, Copy/Reply, a ••• menu (Profile, Files, Delete);
    • a typed failed turn with Retry, and Stop.
  • Profile: Character (12 colours × 8 shapes, Reset), Instructions editor, photo (Choose / Remove; iOS also has "Create with Apple Intelligence" with the Private Cloud Compute note), Routines.
  • Routines per Bot: a frequency-first picker (Once / Daily / Weekdays / Weekly / Monthly 1–28) with friendly labels. A [SILENT] reply posts nothing. A routine that fires while its Bot is paused is skipped and does not auto-resume.
  • Connections: consent-first. Create-flow chips and in-chat suggest_connection cards show icons for Gmail, Calendar, Notion, Composio and others. On phones the card offers "Finish on your Mac", which opens setup in one Mac window.
  • "Meet Your First Bot": four starter Bots, as the Bots empty state and as an onboarding step. Start Chat is idempotent across Mac and phone and crash-safe, sends a one-time self-intro, and opens the chat.
  • Delete replaces Archive. It is a permanent hard delete of chat, memory, instructions, routines, files, photo, access and Telegram binding, and shows the exact warning copy.
  • Remote contract revision 25, with tokens bot-delete-v1, bot-durable-session-v1, bot-routines-v1, bot-connection-requests-v1, bot-presets-v1:
    • session snapshot + SSE with <epoch>:<seq> ids;
    • messages / resume / dismiss / stop / question-answer;
    • routines CRUD, presets, connection requests, DELETE /bots/{id}.
    • Retired: favorites, the Full Access notice, per-chat capabilities, restore, archived reads.
  • Removed: about 10k lines of dead or cluttered Bot UI. This covers the iOS and Android prototypes, the multi-conversation UI, three access layers, the four avatar systems (now colour + shape plus an optional photo), and the LLM face generator.

Spec: docs/superpowers/specs/2026-10-07-bots-rework-design.md
Plan: docs/superpowers/plans/2026-10-07-bots-rework.md
Memory: .memory/bot-durable-runtime.md, .memory/bots-rework-ui.md

Process note

Part of this work was implemented by a cheaper model (Haiku). All of it was then deep-audited and fixed on Opus before this PR was marked ready. The audits fixed real defects, including:

  • the Mac never sent the Bot feature tokens, so phones could not reach durable sessions;
  • the iOS SSE parser rejected every real frame;
  • phones without chat:read could read Bot transcripts;
  • revoked devices kept Bot streams open;
  • duplicate starter Bots appeared across Mac and phone;
  • the routine editor opened a stale form;
  • quick replies did not parse on Android.

Tests

Local, on the final head:

  • npm run type-check, npm run lint: clean.
  • Suites: test:bots 569 · test:bot-runtime 97 · test:aiden-remote 876 · test:onboarding 80 · test:ask-user-question 23. All pass.
  • Full npm test: exit 0, no failures (on head 7eb8c84)
  • E2E (bots-starter, guided-setup): 12 passed, no retries.
  • Android :app:testDebugUnitTest :app:assembleDebug: 462 tests, 0 failures.
  • iOS xcodebuild test (iPhone 17 Pro, iOS 27 simulator): 674 tests, 0 failures, 6 skipped.
  • check-ios-shipping-target: 13/13.

Crash recovery is tested with real SIGKILLs against the pi-ai faux provider, counting provider calls: mid-stream, mid-tool, waiting on an approval or question, Dismiss after restart, and two devices pressing Resume at once.

Flaky tests (per AGENTS.md: recorded, not papered over)

  • iOS simulator (Xcode-beta, iOS 27): with parallel testing on, xcodebuild twice failed to relaunch the test host ("No such process") before AidenRemoteClientTests.testWorkspaceListUsesBearerAndStrictAidenProtocolHeader. The class passes alone, and the full run passes with -parallel-testing-enabled NO. This looks like a simulator clone flake and needs a look on a stable toolchain.
  • scripts/verify-macos-package.test.mjs › "package verifier requires a bounded packed subagent inference worker": failed once under the full parallel npm test with SyntaxError: Invalid or unexpected token loading a temp bootstrap probe. It passes 25/25 alone and passed on rerun. Outside Bots code.
  • iOS AidenChatTests.testForeignRunResponseStaysVisibleUntilAFailedTranscriptReadRecovers() — root-caused and fixed (eaf75bc). Failed in CI runs 37721736343 and 37805265233 ("Timed out waiting for failed transcript read", from the xcresult). Chat view-model tests drove the simulator's real, system-wide ActivityKit; on a loaded CI simulator activity.end outlasted the test's wait before the transcript read. Proven by injecting a 6 s finish delay (reproduces the exact CI message). Fix: tests inject AidenRemoteLiveActivityManager(drivesActivityKit: false); production unchanged, no timeouts/retries changed. Pre-existing on main (test added in 0bae07d), not caused by this branch.
  • iOS AidenRemoteClientTests.testBotDeleteSendsTheBotRevisionAndOnlyWhenTheHostAdvertisesIt — fixed (c1d38d0): a cancelled request from the previous test could reach the next test's shared mock handler; requests are now fenced by a per-test epoch.
  • main/services/devices/local-device-host.test.ts › "agent-device starts in HTTP mode only when agent access is requested": failed once in the full parallel npm test (local, after the Create Images v2 main merge); passes 13/13 alone on this branch and on origin/main, and the full suite passed on the permitted rerun. Timing-sensitive (100 ms) device-host test outside Bots code.
  • main/services/git-repo-watcher.test.ts › "unstaged working-tree edits do not notify because only Git metadata is watched": failed in CI run 37829964725 (job 113492595313; expected no notification, got {workspaceId:'ws-1', generation:1}). Also flaky locally (1 of 6 runs). This PR does not touch the git watcher; pre-existing timing race in main's code. Job rerun once; root-cause fix proposed as a separate task.
  • iOS AidenChatTests.testCancelledOlderProgressObserverCannotClearNewerHandle() — root-caused and fixed (38ab09a). CI run 37829964725 xcresult: "Timed out waiting for progress SSE request". Causes: a ~1 s time-based poll for three stub round trips, plus leaked requests from earlier tests' sessions hitting the shared static stub. Fix covers the whole family (incl. main flakes in runs 37549186978 and 37681425743): the shared Live Activity manager no longer drives ActivityKit inside the XCTest host (production unchanged), per-test epoch fence on the chat stub, event-driven waits instead of polls/sleeps, and per-test caches/draft/UserDefaults. No timeouts or retries raised.
  • tests/e2e/custom-model-options.spec.ts:232 › "custom GLM effort selector persists and sends every supported thinking mode" (from main Add per-model effort settings for custom connections #384): failed in CI run 37838142989, Electron E2E 3/3, including Playwright's retry — locator.click timed out because the hover-expanded thinking radiogroup was still collapsed (option opacity-0/max-h-0, parent intercepting pointer events). Passes locally 3/3 and 5/5 with --repeat-each=5 --retries=0; this PR doesn't touch that control. Failed jobs rerun once. Hover-timing flake in the spec; worth a follow-up on main to wait for the expanded state before clicking.

Review follow-ups (Pullfrog #5450990141)

All findings fixed with reproducing tests: per-ingress tool policy for queued turns (100786c), journalled hard delete with startup roll-forward (b993f8f), Telegram delivery after Resume (4fa3720), per-Bot model runtime/OpenCode identity (90df646), phone Bot approvals end to end on host, iOS and Android (0d355f8, 483936b); plus Hermes: routine notifications open the Bot chat (404548c).

Not done / follow-ups

  • Physical iPhone, iPad and Android device acceptance. Packaged Mac restart/crash acceptance with a real provider.
  • Pi Durable is labelled experimental upstream. It is pinned exactly to 1.0.3; upgrade only via replay evaluation.
  • Workspace (non-Bot) chats are unchanged and do not use Pi Durable.
  • Phone file chips need file metadata in Remote session entries.
  • Android has no Generate (Image Playground) option; it uses a Gallery photo picker.
  • Telegram and routine turns that hit an approval-gated tool wait for a desktop or phone answer.
  • Revision-24 phones can't parse the new Bot list. This is accepted pre-1.0; non-Bot routes are unaffected.
  • Visual check needed for the new rose, lime, plum and graphite avatar pastels.

🤖 Generated with Claude Code

sambitcreate and others added 30 commits October 7, 2026 17:07
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pin @earendil-works/pi-durable and @earendil-works/chord at 1.0.3. Add the
exclusive bots/runtime.lock, a lazily opened per-Bot harness host with idle
close, an interrupted-work scan that never starts the scheduler, destroy,
orphan sweep and corrupt-database recovery. Register test:bot-runtime.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add BOT_PRESETS with idempotent preset:<id> creation, shared
connectionSuggestionFor/rankConnections, the Bot-only suggest_connection
tool factory with a guarded per-Bot dismissal store, and the transcript
ConnectCard and create-flow ConnectionChips components.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adapt pi-agent-core AgentTools into Pi Durable tools (validated args,
signal and onUpdate mapping, declared replay). The aiden-bot extension
renders the base/persona/authority sections, rebuilds tools on refresh,
blocks tools the current policy forbids, persists approval waitIds in the
tool task memo so a restart re-asks the same approval, and fails closed on
the first request after open when the Bot's access changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bot routines are scheduled tasks owned by a Bot (`ScheduledTask.botId`,
`routineSchedule`). A firing submits to the Bot's session with
`requestId = routine:<taskId>:<fireTime>` through an injected port, never a
workspace chat.

- Frequency-first schedules (once / daily / weekdays / weekly / monthly)
  with derived cron and friendly labels ("Every Sunday at 8:41 AM").
- `[SILENT]` replies are kept but marked silent, with no notification.
  Failures always notify.
- A routine that fires while its Bot is interrupted records
  `skipped`/`bot_paused` and never resumes or dismisses the paused turn.
- Duplicate fire times dedupe to `skipped`/`duplicate`.
- One-off routines switch themselves off when their run is claimed.
- `deleteRoutinesForBot(botId)` cancels live runs and removes routines
  and their history.
- `bots:routines:list|create|update|delete` IPC.
- Inside a Bot turn the schedule tool is bound to that Bot; a routine run
  gets no schedule tool.
- Generic automation surfaces (IPC, Remote, standard and Assistant tools)
  hide Bot routines.
- Until the Bot session service lands, the port is wired to a temporary
  adapter over the legacy Bot chat send path.

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

# Conflicts:
#	package.json
Rebuild the Android Bot surfaces around List -> Chat -> Profile:

- Home: one newest-first list with avatar and activity dot, name,
  subtitle pill, last message and friendly time; long-press for
  Profile/Delete. Favorites, the FAB chooser and the dock are gone.
- Profile: big avatar with Gallery photo (PickVisualMedia into the
  canonical upload lifecycle) and Remove photo, inline name and
  subtitle, a Character card (colours, 8 shapes, Reset to default),
  an Instructions row, and ••• with Advanced and Delete Bot.
- Advanced: AI model with Use recommended, Full/Custom access shown
  once, and the opening greeting.
- Create: name plus "What should it help with?"; the answer becomes
  the subtitle and instructions, the character is auto-assigned.
- Chat: back, avatar + name pill (to Profile), ••• with Profile,
  Files and Delete; no raw model id; placeholder "Ask {name}".
- Avatars draw colour + shape with one fixed eye mark.
- Delete is hidden unless the Mac advertises bot-delete-v1, the phone
  has bot:write, and a deleter is wired (Remote route lands later).

Delete dead code: AidenBotCustomAccessFlowScreen, AidenBotChatToolsView
(+ androidTest usage), the fake Image Studio and its editor hook, the
BotFirstPrototype fixtures and snapshot test, favorite-order and
multi-chat delete helpers, and tautological tests for removed concepts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…utine and connection wiring

BotSessionService admits every Bot turn into its durable conversation with a
stable requestId, dismisses a paused turn before a new message, and makes
Resume and Dismiss idempotent. Startup sweeps orphaned sessions and records
interrupted Bots without resuming them. Delete aborts the live run and erases
the session before routines, connection dismissals, Telegram binding and the
Bot record are retired.

Routines now submit through the durable session (refusing to dismiss a paused
turn, labelled with the routine name, [SILENT] replies marked) and the legacy
routine adapter is removed. suggest_connection is registered for Bots.
bots:resume, bots:dismiss, bots:delete and bots:sessionState replace the
archive, restore, listChats, createChat and avatar-suggestion channels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bot-bound Telegram messages are admitted to the Bot's durable session with
request id tg:<bot>:<chat>:<thread>:<message> before the update offset
advances. Replies are persisted before they are sent, so a crash after
generation redelivers the saved reply, and a send cut off mid-way is
redelivered once prefixed "(may be a duplicate)". Adds bots:send for the
desktop renderer.

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

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

- Bots home is an identity-first list: avatar, name, subtitle pill,
  preview, relative time, and "Paused — tap to resume"; a tap opens the
  Bot's one chat, the context menu offers Profile and Delete.
- Bot chats hide workspace, Git, access, model, thinking, slash palette,
  editor, environment, quick view, and terminal chrome. The header is a
  back button, a name pill that opens the Profile, and a ••• menu with
  Profile, Files, and Delete.
- Bot replies fold tool activity and narration before the final answer
  into one collapsed "Updates" line, porting the iOS reply projection.
- Avatars render colour and shape with one fixed eye mark; the Character
  card replaces the face studio. The LLM face generator, its IPC, and
  its renderer glue are deleted.
- ask_user_question runs in Bot chats and allows five options (iOS and
  Android parsers raised to match).
- Delete Bot confirms with the exact erase copy and calls bots:delete,
  falling back to Archive until the durable runtime registers it.
- Adds happy-dom and Testing Library for behavioural renderer tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Task 3.1 of the Bots rework (UI and deletions only; no new Remote routes).

- Home: one row per Bot (avatar with activity dot, name, subtitle pill,
  preview, time), search and + in the top bar, context menu Profile/Delete.
  Favorites, the compose chooser, and the bottom dock are gone.
- Profile: one page merging the old profile and editor: photo menu
  (Choose Photo / Generate / Remove), inline name and subtitle, Character
  card (colour, shape, Reset to default), full-screen Instructions editor,
  and ••• with Advanced and Delete Bot. Advanced holds the model, photo
  model, what the Bot can use, and the opening greeting.
- Create: name plus "What should it help with?", which becomes the
  subtitle and seeds the instructions.
- Chat: header pill (small avatar and name) opens the Profile; ••• has
  Profile, Files, Delete; composer reads "Ask {name}". The 60pt floating
  avatar and the "Set Up Image Understanding" alert are removed.
- Delete uses the shared confirmation copy and is shown only when the host
  advertises the `bot-delete-v1` feature.
- Removed the Full Access notice wall, the duplicate Custom Access flow, the
  per-chat access sheet and its UI model types, multi-chat delete helpers,
  and the Bot-first prototype with its snapshot test and app wiring.
- Avatars draw colour and shape with one fixed eye mark, matching desktop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	main/handlers/bots.ts
#	package.json
…reate flow

- Profile replaces the Bot detail page and BotEditor wizard: big avatar,
  inline name and subtitle, Character card, an Instructions row that
  opens a full-page editor with Save (Back discards), and ••• with
  Advanced and Delete Bot.
- Advanced (Settings design primitives) holds the AI model and image
  model with "Use recommended", what the Bot can use (Everything or
  Only what I choose), the opening greeting, and the Telegram link
  moved from the old Bot page.
- New Bot asks only for a name and "What should it help with?"; the
  answer becomes the subtitle and seeds the instructions, character is
  auto-assigned, and Full access uses the first available model. With
  no model the Bot is still created and shows "Needs an AI model".
- Wires the durable runtime: Delete calls bots:delete(botId), list
  rows read bots:sessionState (Paused, Needs an AI model), and the
  removed archive/restore/listChats/createChat renderer calls are gone.
  A small bots:openChat handler returns the Bot's one ChatStore chat
  id for the existing chat view until it moves to the live projection.
- Deletes BotEditor, BotAccessSummary, the Conversations section, and
  the archive UI; bots-view.tsx is now a route shell.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sambitcreate and others added 4 commits October 8, 2026 00:19
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e-sessions-2f4474

# Conflicts:
#	docs/plans/README.md
…e-sessions-2f4474

# Conflicts:
#	package.json
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 findings in the incremental changes. This is not an approval: the concerns in the previous review remain unresolved.

Reviewed changes Reviewed the Android/main integration, startup changes, and subsequent test-chain correction through 63e5b6f.

  • Integrated Android Bot screens with resource-backed copy, shared theme shapes, readable-width layouts, skeleton loading, and foreground list revalidation.
  • Added read-authority fences to Profile, Instructions, Files-list, and legacy chat-route reads, and retained the new single-thread flows while keeping retired screens removed.
  • Extracted recoverable desktop startup into startBotApplication, with behavioral coverage for initialization failure and unsupported hosts, and updated the Remote platform contract for durable sessions.
  • Reconciled later main merges and test registration, preserving the baseline serial test chain while adding test:bot-runtime.

Validation passed: TypeScript; startup/platform and tool-assembly tests; durable-runtime and Remote suites; focused Android Bot tests and Android instrumented-test compilation. The broader Bot suite also passed before the final main merges. Android UI tests were compiled but not executed on an emulator; iOS XCTest and Electron e2e were not rerun.

Scope was the complete incremental range-diff plus relevant full-diff and source context, rather than a fresh exhaustive audit of all 345 files, to keep this re-review focused on new behavior and merge integration. Existing findings were rechecked without duplicating their comments; no thread was resolved.

Pullfrog  | Fix it ➔ | View workflow run | Using gpt-6.1-sol | 𝕏

sambitcreate and others added 2 commits October 8, 2026 00:44
Both clients decode the required, nullable approval key on Bot sessions and
the approval SSE frame (strict keys and host bounds), render the shared
approval card on the durable Bot chat (Allow once and Deny; Deny only when
canAllow is false), and answer through POST /approvals/{waitId}/respond.
A retried decision reuses its Idempotency-Key, another decision gets a new
one, and the card clears on the receipt, approval_expired,
approval_already_resolved or an approval: null frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…legram resume delivery, per-Bot models, phone approvals

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 new Telegram reattachment path can lose a Resume notification during recovery, leaving a completed reply undelivered until another recovery pass.

Reviewed changes Reviewed the changes since 63e5b6f through 6db983a7, including the fixes for the earlier review and their desktop/native integration.

  • Fixed per-input tool policy by deriving request and call restrictions from durable run inputs, including queued turns after restart.
  • Journalled hard deletion before session destruction and added startup roll-forward with pending-session reopen refusal.
  • Reattached Telegram replies after Resume and distinguished dismissed turns from recoverable interruptions.
  • Isolated model runtimes per Bot to preserve stable OpenCode session attribution.
  • Added phone approvals to snapshots/SSE, authenticated host settlement, and iOS/Android cards with retry identity and Computer Use deny-only behavior.
  • Corrected routine notifications to open the Bot chat and added behavioral coverage for the reviewed fixes.

Validation passed: TypeScript, test:bot-runtime (101 tests), test:aiden-remote, focused outbox/notification tests (24 tests), Android revision-25 client/contract and session-controller tests, and Android instrumented-test compilation. A gated reproduction using the real durable session confirmed the lost Resume wakeup. iOS XCTest and Electron e2e were not run on this Linux runner.

Scope was the complete exact 38-file delta plus relevant authoritative full-diff and source context, not a fresh exhaustive audit of all 347 files. The generated incremental range-diff contained extensive alignment noise, so the exact prior-review-to-head delta was used to distinguish actual changes.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.1-sol | 𝕏

If startup recovery's wait had already observed a paused turn when the Bot
was resumed, botStateChanged either found no interrupted row yet or hit the
active-tracking guard and dropped the reattachment; the old wait then
persisted `interrupted` and the completed answer was never delivered.

Remember a pending recheck for tracked rows (awaiting or interrupted) when
the Bot leaves the paused state, and once that wait releases the row,
re-track it if it settled as interrupted. Exactly-once delivery and the
dismissed path are 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 Reviewed the Telegram recovery fix in e2681010 since the previous review at 6db983a7.

  • Retained Resume/Dismiss wakeups for tracked awaiting or interrupted rows, then rechecked interrupted outcomes after the old waiter relinquishes ownership.
  • Added controlled recovery-race coverage using the real durable runtime, verifying that a Resume completed before the stale paused observation returns still delivers the Telegram answer exactly once.

Validation passed: Telegram outbox and ingress suites (94 tests), test:bot-runtime (101 tests), and TypeScript. The previous lost-wakeup concern is addressed; its thread was already resolved by the author.

This was a focused review of the complete two-file incremental delta and its authoritative full-diff/runtime context, rather than a fresh audit of the unchanged 347-file PR. Native and Electron suites were not rerun because this commit changes no native, Remote, or UI contracts.

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

sambitcreate and others added 3 commits October 8, 2026 11:55
…e-sessions-2f4474

# Conflicts:
#	docs/plans/README.md
#	package.json
testForeignRunResponseStaysVisibleUntilAFailedTranscriptReadRecovers
failed intermittently on CI (runs 37721736343 and 37805265233) with
"Timed out waiting for failed transcript read". The chat test models used
AidenRemoteLiveActivityManager.shared, so they drove the simulator's
real ActivityKit. A foreign run's end awaits liveActivities.finish
(activity.end) before it reads the transcript, and on a loaded CI
simulator that await outlasted the test's poll. The xcresult shows live
ActivityKit updates and an XPC interruption inside the test. Delaying
finish by 6 s reproduces the same single failure locally.

The manager gains drivesActivityKit (default true): when false it
requests, updates and ends nothing and sees no system activities. The
chat test helpers inject it. Production behaviour is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
testBotDeleteSendsTheBotRevisionAndOnlyWhenTheHostAdvertisesIt failed
once in a parallel run with "Unexpected Bot delete request: GET
/api/aiden/v1/bot-capabilities". The previous test's bot-tools refresh
cancels its async-let catalog request, but URLSession can still hand it
to the shared mock protocol after the next test installs its handler.

Each makeSession() now carries the current test's epoch header, and the
mock fails requests from an earlier epoch with URLError(.cancelled).

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 Reviewed the two iOS test-isolation commits after the previously reviewed main merge at a0fb1c1.

  • Isolated chat view-model tests from ActivityKit by injecting a disabled manager that neither creates activities nor discovers existing system activities; production defaults and real ActivityKit integration coverage remain unchanged.
  • Fenced stale mock requests with a per-test session epoch, rejecting requests left by an earlier test before they reach the next test's handler.
  • Documented the flaky-test causes and fixes without increasing timeouts, adding retries, or weakening behavioral assertions.

Validation: npm run test:ios-release passed all 20 Ruby tests and 31 Node tests. Native XCTest was not run because this Linux runner has no xcodebuild; the passing checks cover shipping inventory and release policy, not native execution.

This was a complete review of the four-file incremental delta with relevant authoritative full-diff and source context, rather than a fresh audit of the unchanged 349-file PR. Exact commit diffs supplied the Swift bodies omitted from the formatted full diff. The intervening main merge was already reviewed and acknowledged separately.

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

@very-hermes-bot very-hermes-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Inline review — 1 finding(s) anchored to the diff. See the pinned summary comment for the overview.

…id-turn

Only a newly appended assistant answer clears the in-flight partial, matching iOS.

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 Reviewed the Android streaming fix in 8e1f26a4 since the previous Pullfrog review at c1d38d04.

  • Preserved streaming text when cards, notices, or existing-entry updates arrive; only a newly appended assistant answer clears it implicitly, matching iOS.
  • Added behavioral regression coverage for a mid-turn card, an in-place message update, and a new assistant answer.

Validation passed: Android session-controller and revision-25 contract suites (35 tests), plus the host Bot-session suite (25 tests). Emulator, iOS XCTest, and Electron e2e were not run.

Scope was the complete two-file delta and its authoritative full-diff, host, and iOS context. This focused re-review checks the changed event rule and its consumers; unchanged PR code was not re-audited.

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

…e-sessions-2f4474

# Conflicts:
#	android/app/src/main/java/sbtbiswas/AidenOnTheGo/features/bots/AidenBotCustomAccessFlowScreen.kt
#	android/app/src/main/java/sbtbiswas/AidenOnTheGo/features/bots/AidenBotEditorScreen.kt
#	android/app/src/main/java/sbtbiswas/AidenOnTheGo/features/bots/AidenBotImagePlaygroundView.kt
#	android/app/src/main/java/sbtbiswas/AidenOnTheGo/features/bots/AidenBotsHomeScreen.kt
#	android/app/src/test/java/sbtbiswas/AidenOnTheGo/AidenBotPrototypeSnapshotTest.kt
#	ios/AidenOnTheGo.xcodeproj/project.pbxproj
#	ios/AidenOnTheGoTests/AidenBotPrototypeSnapshotTests.swift
#	package.json
#	renderer/components/bot-face-studio.tsx
#	renderer/main/bots-view.tsx
#	scripts/check-ios-shipping-target.test.mjs
#	scripts/ci-test-registry.json
@sambitcreate
sambitcreate enabled auto-merge October 8, 2026 19:24

@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 Reviewed the main merge in b0a033f6 since the previous Pullfrog review at 8e1f26a4, focusing on conflict resolutions and integration with the Bot rework.

  • Preserved single-thread Bot flows and the removal of legacy editors, prototypes, and avatar generation while importing shared theme, palette, and activity-mark changes.
  • Retained native integration coverage by carrying forward Android theme tests without prototype dependencies and registering both durable Bot and activity-mark sources/tests in the iOS project.
  • Reconciled test registration by preserving the complete main serial chain plus test:bot-runtime, and retaining both Bot and upstream activity-mark tests in the CI registry.

Validation passed: TypeScript, e2e type-check, lint, test:bots, test:bot-runtime (101), test:onboarding (80), focused desktop integration suites, CI-policy/runner tests, and iOS shipping/release checks. Android's focused reports show 73 passing tests; main, unit-test, and instrumented-test Kotlin compilation succeeded. Android compiler-cache errors were bypassed with command-only in-process/nonincremental compilation, without changing project settings or tests. iOS XCTest, emulator tests, Electron e2e execution, and visual acceptance were not run.

This was a focused merge-integration review using the supplied incremental diff, relevant authoritative full-diff sections, and exact merge/conflict context, rather than a fresh audit of the unchanged 349-file PR or of the entire upstream theme feature. The exact delta leaves the durable services, Remote contract, and dedicated desktop/iOS Bot implementations unchanged.

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

testCancelledOlderProgressObserverCannotClearNewerHandle failed on CI
(run 37829964725) with "Timed out waiting for progress SSE request".
waitForProgressRequestCount polled for about 1 s while the observer
needs three stub round trips. The xcresult shows the host stalled while
earlier tests' leaked stream requests timed out and reconnected into
the same static stub. A 1.2 s delay on the tasks stub reproduces the
exact failure. main shows the same family: a leaked model pushed
agentRequestCount to 2 in run 37549186978.

- AidenRemoteLiveActivityManager.shared no longer drives ActivityKit in
  the unit-test host (AidenRunAlertNotifier precedent), covering chat
  models and coordinator purges. ActivityKit tests use their own managers.
- AidenChatProgressLifecycleURLProtocol fences requests from earlier
  tests' sessions with a per-test epoch header.
- Request-count waits resume on the stub's count event, with a
  failure-only ceiling. Fixed 150 ms settle sleeps became condition waits.
- makeProgressLifecycleModel defaults to a per-test cache, draft store
  and model-preference suite instead of the shared ones.

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 Reviewed 38ab09a5, the iOS test-isolation commit since the previous Pullfrog review at b0a033f6.

  • Isolated test-host ActivityKit usage through the shared manager, preserving production behavior and explicitly enabled managers in native integration tests.
  • Fenced stale chat mock requests with per-test session epochs and replaced shared cache, draft, and model-preference defaults with per-test stores.
  • Replaced request-count polling with event-driven expectations and synchronized updated assertions with observer freshness and roster state.

Validation: npm run test:ios-release passed all 20 Ruby tests and 31 Node tests. The changed XCTest suite could not be compiled or executed on this Linux runner because xcodebuild is unavailable; these passing checks cover shipping/release policy, not native execution.

Scope was the complete three-file incremental delta with authoritative full-diff and surrounding source context, rather than a fresh audit of the unchanged PR. Exact commit diffs supplied the Swift bodies omitted from the formatted full diff; this kept the re-review focused on the new isolation behavior.

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

@sambitcreate
sambitcreate merged commit 40d7082 into main Oct 8, 2026
49 of 51 checks passed
@sambitcreate
sambitcreate deleted the feature/bot-ui-durable-sessions-2f4474 branch October 8, 2026 21:27
sambitcreate added a commit that referenced this pull request Oct 8, 2026
…-upgrades-compare-42da8d

Main claimed Aiden Remote contract revision 25 for the Bots rework (#377), so
the phone simulator viewer moves to revision 26: the constant, fixture,
desktop/iOS/Android revision assertions, the mobile fixture gate, and the
simulator-scoped docs and OpenAPI text. Also fix main's chat-pane, which
still read the removed bot query after #377 and #373 crossed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sambitcreate added a commit that referenced this pull request Oct 8, 2026
#373 made approval tool labels sentence case after #377's Bot chat test was
written, so main's renderer-other lane fails on 'share image'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants