Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
2efdc57
Plan: Bot chat activity slice B (status line and Chat activity)
sambitcreate Oct 14, 2026
ab74d94
Bots: shared status words and tool phase classifier
sambitcreate Oct 14, 2026
03eda73
Bots: tool steps carry kind, label, safe detail, and ok/failed/blocke…
sambitcreate Oct 14, 2026
5f802f8
Bots: command steps never show the command; stopped steps; stricter d…
sambitcreate Oct 14, 2026
6c70fdd
Bots: project the live activity phase from pi.live, cards, Stop and R…
sambitcreate Oct 14, 2026
69c06da
Bots: run-scoped Stop/Resume flags; renew startedAt for follow-up turns
sambitcreate Oct 14, 2026
85a21f3
Bots: key a turn on its first input, not the generation task
sambitcreate Oct 14, 2026
e354e48
Bots: store a per-Bot chat activity choice, kept across identity edits
sambitcreate Oct 14, 2026
70cf237
Bots: pin save/reload revision equality for chat activity
sambitcreate Oct 14, 2026
bd8bf9f
Bots: one calm status line while a Bot works
sambitcreate Oct 14, 2026
5bdb77b
Bots: status line announces through text; stays visible during tools
sambitcreate Oct 14, 2026
fe04d13
Bots: Summary and Detailed recaps, failed versus blocked steps, stopp…
sambitcreate Oct 14, 2026
99f4584
Bots: progress narration is a bubble; remove the Updates line
sambitcreate Oct 14, 2026
6daa18c
Bots: queued follow-ups show faded with Remove; steers show at once
sambitcreate Oct 14, 2026
e2c96aa
Bots: queued list by request id; turns split on every user entry
sambitcreate Oct 14, 2026
d6f02bc
Bots: queued classification fails closed
sambitcreate Oct 14, 2026
4f894c7
Bots: Advanced → Chat activity with live previews, saved on pick
sambitcreate Oct 14, 2026
434f475
Bots: faces glance while their Bot works
sambitcreate Oct 14, 2026
3c4465f
Bots: Chat activity still frames per level; tested save queue
sambitcreate Oct 14, 2026
224d832
Bots: stable face tests; shared photo-cache reset
sambitcreate Oct 14, 2026
5450405
Docs: slice B rulings, plan index, project memory; e2e Bot mocks carr…
sambitcreate Oct 14, 2026
585ab04
Bots: a Stop during a tool run ends with "You stopped this reply."
sambitcreate Oct 14, 2026
7fa7955
Bots: one always-mounted status region; no still-going note while wai…
sambitcreate Oct 14, 2026
6a92b36
Bots: under Reduce Motion a working face holds a look-aside pose
sambitcreate Oct 14, 2026
9a6e430
Bots: un-export module-only names, share the discard text; memory notes
sambitcreate Oct 14, 2026
ec86a63
Bots: a resumed reply that finishes never reads as stopped
sambitcreate Oct 14, 2026
f6fe667
Merge remote-tracking branch 'origin/claude/bot-creation-flow-model-s…
sambitcreate Oct 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .memory/bot-chat-activity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Bot chat activity (2026-10-14)

Spec: docs/superpowers/specs/2026-10-14-bot-chat-activity-design.md (§17 lists the slice B rulings). Slice B plan: docs/superpowers/plans/2026-10-14-bot-chat-activity-b-status-line.md. Branch `claude/bot-chat-activity-b-status-line`, stacked on PR #475.

## Slice B (desktop) — what shipped
- Phase vocabulary and tool classifier: `renderer/shared/bot-activity.ts` (shared with main, the CLI, and slice D's phones). Unknown ids → `working`. Always "Thinking" keeps waiting/stopping/reconnecting.
- Main derives `BotLiveSnapshot.activity` + `activity` event in `live-projection.ts` (`liveBotActivity`), gated on session state `running` (a paused Bot still has `pi.live.run`). Stop reaches it through `notifyStopping` in the `bots:stop` handler; Resume reaches it through the service's `onResumed` callback (`bot-session-main.ts`) → `notifyResuming`, so a Resume from any surface marks it; approvals refresh it via `botApprovals.onChange`.
- Run identity is the run's first input (`inputs[0]`), not the generation task id. Resume is marked by the service's `onResumed` callback inside the per-Bot serialize; Stop/Resume flags are run-scoped (a double Stop never leaks "Stopping" into the next turn). `startedAt` renews for a queued follow-up turn.
- Transcript tool calls carry `kind/label/detail/app` (`bot-activity-detail.ts`). Command steps never show the command: only the model's `description`, redacted with `sanitizeDiagnosticText` before cutting to 80. Tool results carry `status: ok|failed|blocked|stopped` (Pi's `blocked` diagnostic; `stopped` for Stop/restart, rendered neutrally) and `durationMs`.
- `BotDefinition.chatActivity?` `{ level: quiet|summary|detailed, wording: follows|thinking }`; absent = Quiet/Follows; an update without it keeps the stored value. It is stored last in the Bot record (the revision hashes the record JSON); identity updates merge a partial `chatActivity` onto the freshly read Bot. Remote identity PATCH still rejects it (slice D).
- Renderer: `BotStatusLine` (hides only while reply text streams with no active tool step; the visible line is a `role="group"` named by its words; announcements go to `BotStatusAnnouncer`, one always-mounted, initially empty `role="status"` region in the pane that clears while words stream, 2 s throttle), `BotActivityRecap` (Bot-specific, not ActivityFeed), progress narration as bubbles (`BotUpdates` and `bot-reply-projection.ts` deleted), "You stopped this reply." derived from an `aborted` reply or a `stopped` tool result (a Stop during a tool run writes only the round's results; a later `interrupted` notice turns it back into a restart). The still-going note hides while the line reads Waiting or Stopping. Every user entry begins a turn (pi-durable places steers after a round's tool results).
- Queue/Steer: `pi.inbox` projected as `snapshot.queued` — the person's own inputs only, classified by durable submission requestId (`routine:`/`intro:`) plus the hidden flag, failing closed. Follow-ups show faded with Remove (`bots:withdraw` → `Harness.abortSubmission`: withdrawn | started | gone); steers are normal bubbles.
- Advanced → Chat activity (`?page=chat-activity`, `bot-chat-activity-page.tsx`): saves on pick through a serial queue, per-level Reduce Motion still frames, Reduce Motion read live.
- `BotAvatar` faces glance via `data-working` with a shared off-screen observer; list's green dot removed. Under Reduce Motion (setting or OS) a working face holds the glance's look-aside pose (`translateX(-2.6px)` on the eyes, no animation), so it still differs from idle.
- Onboarding: the Bots gallery tile (`BotsArt`: name pill, one exchange, routine chip) shows neither the list nor the Updates line, so it needed no redraw.

## For slice D (phones)
- Remote wire is unchanged by B. D adds `activity` (phase, app ≤ 40, startedAt only) to the session stream and `chatActivity` to detail/PATCH behind `bot-activity-v1`; reuse `botActivityDisplay`, `botElapsedLabel` and `nextBotAnnouncement` semantics and the §5 table as the shared fixture.
- Remote Stop bypasses the `bots:stop` handler, so a phone Stop doesn't show Stopping on the Mac; D's planned `botTurnIntents` covers it. A phone Resume already shows "Picking up where it left off" on the Mac (the same runtime resume fires `onResumed`).
- Choosing Chat activity changes the Bot revision, so a phone's next identity edit gets `revision_conflict` and refreshes (safe).

## Follow-ups and deferred minors
- Pre-existing on main: adding a description to a Bot that had none gives a save/reload revision mismatch (projectBot key order vs update append), a spurious conflict after restart. A canonical-JSON hash would fix it but changes every revision once.
- Accessibility: the always-mounted status region is in place (final fix wave); it still needs a manual VoiceOver check before merge.
- `botToolApp` derives the app label from the sanitized MCP tool name (lossy for punctuation or ~50+ char names); a real label from `facts.mcpTools()` would be better. `botToolPhase(toolName, app?)` gives `working` if `app` is forgotten.
- Untested step phrases (editing, photo, computer, helper, remembering plural, routine, waiting, working); "Using an app" fallback is not in the spec.
- Model-authored command descriptions pass only the generic redactor (a repeated `-pSecret` flag would show). Infrastructure throws in `checkPolicy` also yield "blocked".
- Recap: rows/header are not memoised per partial delta; `aria-controls` points to an unrendered region; truncated header has no title; `durationMs` default 0 shows "Worked for 1s"; missing tests for non-adjacent repeats, interrupted-with-unfinished-call, toggle across turn change; stale previous-turn recap when running precedes the new user entry.
- Transcript: live recap may jump after commit when the partial becomes narration; possible one-frame duplicate partial/committed bubble and remount flash on commit (key "partial" vs entry id) — check manually; desktop no longer de-dupes repeated paragraphs (phones still do).
- Queue: Remove focus moves before the withdraw resolves; the fade couples to `MessageBubble`'s private `bg-control` class (prefer a variant prop); the hidden flag is not durable (latent); a missing-id streak is never logged; no backoff on permanent inspect failure (1/s per live feed); an `openFeed` failure could orphan a retry timer.
- Runtime: `deps.state` rejection at run end leaves `{preparing}` stuck (pre-existing fallback); interrupted-with-run and approval-flip lack projection-level tests; `onResumed` → projection wire (`bot-session-main.ts`) is untested end to end and unguarded inside serialize.
- Chat activity page: `useReducedMotion` subscribe closure re-subscribes every render (hoist); Summary still-frame folded state not asserted; Pause under Reduce Motion freezes mid-loop.
13 changes: 7 additions & 6 deletions .memory/bots-rework-ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

Status: implemented on PR #377 (`feature/bot-ui-durable-sessions-2f4474`). Physical-device acceptance is pending. Spec: `docs/superpowers/specs/2026-10-07-bots-rework-design.md`. Plan: `docs/superpowers/plans/2026-10-07-bots-rework.md`. Runtime: `.memory/bot-durable-runtime.md`.

See `.memory/bot-chat-activity.md` for the status line, Chat activity and recaps.

## Screen map (desktop, iOS, Android)
- **List:** one list of Bots, with search and +. Row: avatar with an activity dot, name, subtitle pill, last-message preview, relative time. A paused Bot shows "Paused — tap to resume". Tapping a row opens its chat. Long-press or context menu: Profile, Memory (phones: only when the Mac serves `bot-memory-v1`), Advanced, separator, Delete Bot (2026-10-14; phones label it Delete). Bots from a paired Mac show a small Mac badge.
- **List:** one list of Bots, with search and +. Row: avatar whose face glances while working, name, subtitle pill, last-message preview, relative time. A paused Bot shows "Paused — tap to resume". Tapping a row opens its chat. Long-press or context menu: Profile, Memory (phones: only when the Mac serves `bot-memory-v1`), Advanced, separator, Delete Bot (2026-10-14; phones label it Delete). Bots from a paired Mac show a small Mac badge.
- **First run ("Meet your first Bot"):** a carousel of starter presets. Start chat creates the preset (idempotent, keyed `preset:<id>`) and opens its chat. Create my own opens the create flow.
- **Create (two steps):** name and "What should it help with?", then optional connect-now chips (Back + Create). The self-intro runs only on genuine creation, with a model configured.
- **Chat:** header with back, a name pill that opens Profile, and ••• (Profile, Files, Memory, Advanced, separator, Delete Bot). Phones show Memory only when the Mac serves `bot-memory-v1`. Model choice in New Bot and Advanced (2026-10-14): desktop uses `BotModelPicker`, iOS a Model row pushing `AidenBotModelListView`, Android `AidenModelPickerField`. iOS New Bot and Advanced share `AidenBotEditorDraft.photoModelNeed` (none / choose / unavailable); with no usable image model on the Mac a text-only Bot saves without one. Android New Bot mints its Create key through `AidenBotCreateAttempts` (reuse only for the same request after an uncertain failure) and refetches the catalog after a failed Create so a vanished model is named. Plain bubbles, file chips, A–E quick replies (up to 5 options), connect cards, and one collapsible "Working…" / "Updates" line. Long-press gives Copy and Reply. Desktop chat mode hides workspace, git, permission, model and thinking pickers.
- **Chat:** header with back, a name pill that opens Profile, and ••• (Profile, Files, Memory, Advanced, separator, Delete Bot). Phones show Memory only when the Mac serves `bot-memory-v1`. Model choice in New Bot and Advanced (2026-10-14): desktop uses `BotModelPicker`, iOS a Model row pushing `AidenBotModelListView`, Android `AidenModelPickerField`. iOS New Bot and Advanced share `AidenBotEditorDraft.photoModelNeed` (none / choose / unavailable); with no usable image model on the Mac a text-only Bot saves without one. Android New Bot mints its Create key through `AidenBotCreateAttempts` (reuse only for the same request after an uncertain failure) and refetches the catalog after a failed Create so a vanished model is named. Plain bubbles, file chips, A–E quick replies (up to 5 options), connect cards, a status line while it works (Chat activity: Quiet/Summary/Detailed), recaps for Summary/Detailed, faded Queued bubbles with Remove. Long-press gives Copy and Reply. Desktop chat mode hides workspace, git, permission, model and thinking pickers.
- **Profile:** photo (Choose photo, Generate on iOS only, Remove photo), inline name and subtitle, Character (colour and shape, Reset to default), Instructions full-screen editor, Routines, and ••• (Advanced, Delete Bot).
- **Advanced:** model and image model (auto by default), Full or Custom access, opening greeting, and the Telegram binding (desktop only).
- **Advanced:** model and image model (auto by default), Full or Custom access, opening greeting, a Chat activity row that opens its own page (`?page=chat-activity`: Quiet/Summary/Detailed and Follows the work / Always “Thinking”, saved on pick; desktop only until slice D), and the Telegram binding (desktop only).
- **Delete:** a confirmation dialog with a destructive button.

## Desktop layout and save model (2026-10-09 redo)
Expand All @@ -22,14 +24,14 @@ Status: implemented on PR #377 (`feature/bot-ui-durable-sessions-2f4474`). Physi
- Routines group: inset-separated rows with chevrons, an "Add routine" row, skeleton/empty/error rows. Routine editor uses `FieldLabel`/`Input` (date, time)/`Select` (month day) and a red `Callout` for errors. Files dialog has a single Close, a friendly title (Bot's files / file name with its path as description), skeletons, Try again, and an empty state.

## Key files
- Desktop: `renderer/main/bots-view.tsx` (route shell), `renderer/main/bots/*` (`bot-page-shell.tsx`, `bot-page-search.ts`, `bot-list.tsx`, `bot-starter-carousel.tsx`, `bot-create-flow.tsx`, `bot-model-choice.ts`, `bot-model-picker.tsx` (`BotModelPicker`), `bot-chat-pane.tsx`, `bot-chat-header.tsx`, `bot-profile.tsx`, `bot-advanced.tsx`, `bot-delete-dialog.tsx`, `bot-routines.tsx`, `bot-routine-editor.tsx`, `bot-character-card.tsx`, `bot-updates.tsx`, `bot-session-state.ts`, `use-connection-setup.tsx`), `renderer/components/bots/connect-card.tsx`, `connection-chips.tsx` and `bot-notice-card.tsx`, shared helpers `renderer/shared/bot-presets.ts`, `bot-routine-label.ts`, `bot-routine-schedule.ts`, `bot-connections.ts`, live hook `renderer/lib/use-bot-live.ts`.
- Desktop: `renderer/main/bots-view.tsx` (route shell), `renderer/main/bots/*` (`bot-page-shell.tsx`, `bot-page-search.ts`, `bot-list.tsx`, `bot-starter-carousel.tsx`, `bot-create-flow.tsx`, `bot-model-choice.ts`, `bot-model-picker.tsx` (`BotModelPicker`), `bot-chat-pane.tsx`, `bot-chat-header.tsx`, `bot-profile.tsx`, `bot-advanced.tsx`, `bot-delete-dialog.tsx`, `bot-routines.tsx`, `bot-routine-editor.tsx`, `bot-character-card.tsx`, `bot-status-line.tsx`, `bot-activity-recap.tsx`, `bot-activity-steps.ts`, `bot-chat-activity-page.tsx`, `bot-session-state.ts`, `use-connection-setup.tsx`), `renderer/components/bots/connect-card.tsx`, `connection-chips.tsx` and `bot-notice-card.tsx`, shared helpers `renderer/shared/bot-activity.ts`, `main/services/bot-runtime/bot-activity-detail.ts`, `renderer/shared/bot-presets.ts`, `bot-routine-label.ts`, `bot-routine-schedule.ts`, `bot-connections.ts`, live hook `renderer/lib/use-bot-live.ts`.
- iOS: `ios/AidenOnTheGo/Features/Bots/*` (`AidenBotsHomeView`, `AidenBotPresetsView`, `AidenBotCreateView`, `AidenBotSessionChatView`, `AidenBotSessionModel`, `AidenBotProfileView`, `AidenBotAdvancedView` (also `AidenBotModelRow`, `AidenBotModelListView`, `aidenBotModelListSections`), `AidenBotRoutinesView`, `AidenBotCharacter`, `AidenBotImagePlaygroundView`), models `Models/AidenBotSession.swift` and `Models/AidenBotRoutine.swift`.
- Android: `android/app/src/main/java/sbtbiswas/AidenOnTheGo/features/bots/*` (`AidenBotsHomeScreen`, `AidenBotPresetCarousel`, `AidenBotSessionScreen`, `AidenBotSessionController`, `AidenBotProfileScreen`, `AidenBotAdvancedScreen`, `AidenBotModelChoice.kt` (`aidenBotModelPickerProviders`, `aidenBotRecommendedModel`), `AidenBotRoutines`, `AidenBotDeleteDialog`, `AidenBotCharacterCard`, `AidenBotChatHeader`, `AidenBotCanonicalAvatarView`).
- Remote host: `main/services/aiden-remote-protocol.ts` (revision and feature tokens), `main/services/aiden-remote-router.ts` (routes), `main/services/aiden-remote-bot-session.ts`.
- Main: `main/services/bot-runtime/*`, `main/services/bot-connection-setup.ts`, `main/services/bot-connection-dismissals.ts`, `main/services/scheduled-bot-routines.ts`.

## Deleted
- Desktop: the Conversations section and `startConversation`, the `BotEditor` wizard, `BotAccessSummary`, `BotFaceStudio`, the LLM avatar generator (`bot-avatar-generator-core.ts`, `bots:suggestAvatar`, `cancelAvatarSuggestion`), archive UI, `bots:openChat`.
- Desktop: the Conversations section and `startConversation`, the `BotEditor` wizard, `BotAccessSummary`, `BotFaceStudio`, the LLM avatar generator (`bot-avatar-generator-core.ts`, `bots:suggestAvatar`, `cancelAvatarSuggestion`), archive UI, `bots:openChat`, `bot-updates.tsx` and `bot-reply-projection.ts` (2026-10-14).
- iOS: `Prototype/BotFirstPrototype.swift` and its snapshot test, `AidenBotEditorView`, `AidenBotCustomAccessFlowView`, Favorites, the compose chooser, the Full Access notice wall, the "Set Up Image Understanding" alert.
- Android: `prototype/BotFirstPrototype.kt`, `AidenBotCustomAccessFlowScreen.kt`, `features/remote/AidenBotChatToolsView.kt`, `AidenBotImagePlaygroundView.kt`, Favorites, FAB chooser, Recent Chats, eye and accessory pickers.
- Remote: `/bot-favorites`, `/chats/:chatId/capabilities` for Bots, `/bots/:id/archive|restore` (now refused). Delete is `DELETE /bots/{botId}`.
Expand Down Expand Up @@ -65,7 +67,6 @@ Status: implemented on PR #377 (`feature/bot-ui-durable-sessions-2f4474`). Physi
- The Bot model picker popover keeps a tall fixed list height with empty space under short lists.
- **iOS simulator flake:** on Xcode-beta iOS 27, `AidenRemoteClientTests` failed to launch the host in parallel mode and passed serially. Record the run link on the PR.
- Monthly routines are limited to days 1–28.
- The Updates fold shows narration only (one line per reply on desktop).
- Telegram turns and routine turns that hit an approval-gated tool wait for an answer on desktop or phone.
- Android has no Generate (Image Playground) option.
- Phones show no inline file chips: Remote session entries carry no file metadata.
Expand Down
2 changes: 1 addition & 1 deletion docs/plans/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Last refreshed 2026-10-01 against `main` at `d2197dfef` (0.51.0 plus later merge

- [Bot memory, soul and proactivity](2026-10-09-bot-memory-soul-proactivity.md) — Merged in [PR #433](https://github.com/sambitcreate/aiden-agent/pull/433) after PR #428; ships in 0.56.0. Spec: [design](../superpowers/specs/2026-10-09-bot-memory-soul-proactivity-design.md). Hermes-style bounded per-Bot memory (`MEMORY.md`/`USER.md` under `<profile>/bots/<id>/memory/`, main-owned `bot_memory` tool, frozen prompt snapshot, compaction flush and steered summary, add-only background review every 10 person turns) with Profile → Memory on desktop, iOS and Android; routine results to phones and Telegram, catch-up after pause, approve/Not now routine proposals, per-routine notes and a daily check-in suggestion; `openingGreeting` removed. Persona stays in the Bot record (no `SOUL.md` file). Three parallel tracks (A memory core, B proactivity + Remote, C clients); Remote contract revision 27 is provisional and is claimed at merge (`bot-memory-v1`, `bot-proactive-v1`, device capability `bot:cards`).

- [Bot chat activity, Bots sidebar and side panel](../superpowers/specs/2026-10-14-bot-chat-activity-design.md) — Active (2026-10-14). Five stacked slices: A quick fixes ([plan](../superpowers/plans/2026-10-14-bot-chat-activity-a-quick-fixes.md): model choice in New Bot on desktop/iOS/Android, Advanced and Memory in every ••• menu, Advanced model control fix), B quiet status line + per-Bot Chat activity setting, C1 workbench shell extraction, C2 Bots-only sidebar + Bot side panel (stacked on C1), D phones (Remote revision 30, `bot-activity-v1`). B–D plans are written before each starts.
- [Bot chat activity, Bots sidebar and side panel](../superpowers/specs/2026-10-14-bot-chat-activity-design.md) — Active (2026-10-14). Five stacked slices: A quick fixes ([plan](../superpowers/plans/2026-10-14-bot-chat-activity-a-quick-fixes.md): model choice in New Bot on desktop/iOS/Android, Advanced and Memory in every ••• menu, Advanced model control fix), B quiet status line + per-Bot Chat activity setting ([plan](../superpowers/plans/2026-10-14-bot-chat-activity-b-status-line.md); implemented on `claude/bot-chat-activity-b-status-line`, stacked on PR #475, 2026-10-14), C1 workbench shell extraction, C2 Bots-only sidebar + Bot side panel (stacked on C1), D phones (Remote revision 30, `bot-activity-v1`). B–D plans are written before each starts.

- [Bots rework (Grok-style Bots + Pi Durable sessions)](../superpowers/specs/2026-10-07-bots-rework-design.md) — Implemented on [PR #377](https://github.com/sambitcreate/aiden-agent/pull/377); physical-device acceptance pending. Plan: [implementation plan](../superpowers/plans/2026-10-07-bots-rework.md). Bots are single-thread chats on desktop, iOS and Android, each with one Pi Durable session on `@earendil-works/pi-durable` 1.0.3 (`<profile>/bots/<botId>/session.sqlite`) and explicit Resume/Dismiss after an interruption. Also shipped: per-Bot routines, starter presets, consent-first connection cards and a permanent Delete that replaces Archive. Aiden Remote is at contract revision 25 (`bot-delete-v1`, `bot-durable-session-v1`, `bot-routines-v1`, `bot-connection-requests-v1`, `bot-presets-v1`). Known follow-ups are listed in `.memory/bots-rework-ui.md`.

Expand Down
Loading
Loading