Repository navigation
Bot bubbles: floating Bot heads with a mini chat - #930
sambitcreate wants to merge 11 commits into
Conversation
Any Bot chat can shrink into a round head. On macOS heads float over every app in a click-through overlay per display; on Linux, or with Float over other apps off, they stay inside the Aiden window. Clicking a head opens a mini chat with the live transcript, approval and question cards and a composer. Up to 5 heads; the oldest moves to a recent list. Heads show an unread count, a Needs-you mark and a working ring, and come back after a restart. Entry points: a header button, Bubble in the Bot menus, and Bubble this Bot (Option-Command-B). The main window shows an in-a-bubble card while a Bot is bubbled. Settings -> Bots -> Bubbles has Allow bubbles and Float over other apps.
# Conflicts: # renderer/main/bots/bot-chat-pane.tsx # renderer/main/remote-bot-chat-view.tsx
…ed approval answer plainly
There was a problem hiding this comment.
Important
The overlay authorization boundary is broader than the trusted document and per-display head set, and two advertised interactions break in the in-window and mini-chat surfaces.
Reviewed changes Reviewed the full initial Bot bubbles implementation through d5124a68b.
- Bubble lifecycle and persistence Adds validated, atomic state for active heads, recents, settings, placement, display changes, and deleted-Bot pruning.
- Overlay window and IPC boundary Adds per-display transparent windows, focus and pointer management, recovery, a restricted preload, and guarded Bot/bubble handlers.
- Heads and mini chat Adds status badges, previews, drag and keyboard controls, shared transcript and approval UI, sending, questions, and bring-back behavior.
- Product integration Adds chat, menu, sidebar, command, settings, onboarding, documentation, and focused behavioral test coverage.
@v0 or keep the SHA fresh with Dependabot | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using GPT Sol | 𝕏
- Load bot-bubbles.css from the main-window entry, not window-host.tsx, so chat-transition tests can import the component under tsx. - Give the scheduled-notification harness the new is-Aiden-in-front seam the delivery funnel imports, instead of bundling the real Electron registry. - Point the Bot IPC gating contract at the bots block that now also registers the bubble handlers.
There was a problem hiding this comment.
ℹ️ No new issues in these commits; the three existing must-address threads remain open.
Reviewed changes Reviewed the Bot bubble changes since the prior Pullfrog review through 97f430eab.
- Refreshed restored heads Invalidated a Bot's definition, canonical photo, and live summary when it newly appears or returns as an overlay head.
- Handled settled approvals Let stale approval clicks reach the real handler and report an undecided result while retaining Bot scoping for active waits.
- Repaired merge fallout Updated the host-policy contract, notification test harness, CSS loading, and CI compatibility after merging
main.
@v0 or keep the SHA fresh with Dependabot | Fix it ➔ | View workflow run | Using GPT Sol | 𝕏
- Overlay Bot IPC now requires the overlay's trusted main document and scopes every request, Bot list and notification to the heads on that overlay's display. - Heads inside the Aiden window show the exact unread count from new recentReplyAt reply times on the live summary, still without subscribing. - Settings receipts in the mini chat no longer show an Undo that can't work.
There was a problem hiding this comment.
Important
The prior fixes close the three original threads, but live-stream authorization and unread-count equivalence still have behavioral gaps.
Reviewed changes Reviewed the Bot bubble changes since the prior Pullfrog review through 51a6e4d63.
-
Tightened overlay authority Required the trusted overlay main document, scoped Bot IPC and broadcast notifications to heads on the sender's display, and added register-and-invoke coverage.
-
Added summary unread counts Projected up to 100 person-facing reply times so in-window heads can show a numeric count without opening a live feed.
-
Removed nonfunctional Undo Hid settings-receipt Undo actions on surfaces, including the mini chat, that cannot perform the mutation.
@v0 or keep the SHA fresh with Dependabot | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using GPT Sol | 𝕏
# Conflicts: # package.json
- An overlay's live feed for a Bot ends once that Bot's head leaves the overlay's display or closes, checked on every event (mayFollow). - Floating and in-window heads count unread replies from the same person-facing reply times, capped at 100 and shown as 99+.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes Reviewed the Bot bubble changes since the prior Pullfrog review through de48f29aa.
-
Revoked moved live feeds Rechecked per-display head authority before every live event and released an old overlay's feed when its head moved or closed, including subscribe-completion and replacement-subscribe races.
-
Unified unread counting Counted both overlay and in-window heads from the same capped person-facing reply times, preserving delegated-turn semantics and matching
99+badge and accessible text.
@v0 or keep the SHA fresh with Dependabot | View workflow run | Using GPT Sol | 𝕏
- Tucking a mini chat no longer calls blur(), which on macOS orders the overlay out and back in and blinked every head. The overlay is made unfocusable and a throwaway 1 px panel takes the key window; blur() is only a fallback. - The tucked chat stays mounted, inert, until its exit animation ends; re-opening mid-exit keeps the same element and draft. - Shrink: when the display already has an overlay, the captured chat is laid over the window first (transitionShown ack, 250 ms cap), so the swap to the "in a bubble" card happens underneath. The picture is decoded before it shows and moves only once its head exists. - Grow is skipped with Reduce Motion or no known head instead of flashing a window-sized sheet. - A head dropped on the close target stays there until it is removed; other heads keep their photo while the cache reloads, and a new head fades in only once its Bot and photo are known.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes Reviewed the flicker-removal changes since the prior Pullfrog review through 383f41e0e.
-
Stabilized focus handoff Replaced the normal macOS overlay blur with a non-activating key-window sink while retaining a safe last-resort fallback.
-
Sequenced shrink transitions Painted and acknowledged decoded chat captures before adding heads, then waited for each destination head without flashing an empty transition sheet.
-
Preserved mini-chat identity Kept tucked chats mounted and inert through their exit animation so reopening preserves drafts and heads no longer remount.
-
Smoothed head lifecycle Held canonical photos through cache refreshes, delayed first paint until Bot identity settled, and kept dropped heads on the close target until the close completed.
@v0 or keep the SHA fresh with Dependabot | View workflow run | Using GPT Sol | 𝕏
# Conflicts: # docs/plans/README.md # main/services/bot-runtime/live-projection.ts # renderer/main/bots/bot-chat-pane.tsx # renderer/shared/bot-live.ts
There was a problem hiding this comment.
Important
The latest main merge introduced two avatar-state integration regressions that should be fixed before merge.
Findings
[P1] Include lastTurnEnd in the sidebar row memo boundary (renderer/main/bots/bot-sidebar.tsx:100-115)
BotRowAvatar now renders failed/stopped poses from row.lastTurnEnd, but sameRowProps does not compare that field. If a summary refresh changes only lastTurnEnd while state, preview, and the other compared references remain stable, React.memo returns the old row and the failed/stopped pose is never shown. Compare a.lastTurnEnd === b.lastTurnEnd and add a test that updates only that value; the current test changes state at the same time, so it cannot catch this case.
Reviewed changes
Reviewed the merge of main into the Bot-bubbles branch, focusing on the new live avatar state contract, conflict resolutions, and focused renderer coverage. All prior Pullfrog threads are resolved.
Validation
npm run test:bot-bubblespassed.npx tsx --test renderer/main/bots/bot-sidebar.test.tsx renderer/components/bot-avatar.test.tsxpassed (49 tests).npx tsc --noEmitpassed.
Review metadata
- Files reviewed: 95
- Commits reviewed: 1
- Prior Pullfrog review: 383f41e0
- Base:
main(f3302e5e)
Reviewed commits:
a9a9498656be2d4194efd2515803bec346fccf2f— Merge remote-tracking branchorigin/mainintofeature/bot-bubbles
@v0 or keep the SHA fresh with Dependabot | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using GPT Sol | 𝕏
| const showPhoto = photo && failed !== photo.assetRevision; | ||
| return ( | ||
| <span className="bot-bubble-face" aria-hidden="true" title={name}> | ||
| <AvatarFace avatar={avatar} /> |
There was a problem hiding this comment.
[P2] Opt bubble faces into the merged live sprite contract. This bare AvatarFace stays in its default idle pose, and its ancestor is not .bot-avatar[data-live], so the new sprite CSS cannot animate it even when status.working is true. The ring moves, but the fallback face no longer delivers the documented working glance. Route this through BotAvatar or provide the equivalent live wrapper and state, then cover the working fallback face behavior.

Any Bot chat can now shrink into a round head (Edge heads). On macOS the heads float over every app; clicking one opens a mini chat beside it. This implements the 2026-11-25 plan with the assumed answers 1a, 2a, 3a, 4a, 5a, 6a and 7b, plus the decisions taken that day: no bounce, the Bot's photo or else its face, no Android Bubbles.
What people get
How it is built
main/services/bot-bubbles/holds the state. It is saved atomically to<userData>/bot-bubbles.json, and Bots that are deleted are pruned.main/handlers/bot-bubbles.tshas the IPC handlers.main/windows/bot-bubbles-window.tscreates one see-through overlay panel per display. Clicks pass through it except over its own UI. It takes focus only while a mini chat is open, and a crashed or reloaded overlay is rebuilt (at most 3 times a minute per display).renderer/bot-bubbles/. The approval cards and transcript were moved out ofbot-chat-pane.tsxintobot-approvals.tsxandbot-transcript-entries.tsxso the mini chat can reuse them.Platform notes
Tests
npm run test:bot-bubblesand the CI registry:ipc-contract,bot-live, portable config, the command system, the settings sections and the onboarding gallery.tsc, ESLint on every changed file,check:aiden-rulesandtest:ci:registryare all clean. bot-bubbles passed 95/95, the contract, settings and onboarding suites 150/150, the command system 233/233, andrenderer/main/bots/*plus the remote Bot chat 488/488.Still owed: a hands-on check of the overlay on a Mac
I did not run the overlay on a real Mac, because that would have opened windows on the owner's desktop. Please check:
Screenshots
These come from the real overlay components with stubbed IPC.
Docs
README.md, PRODUCT.md, docs/bot-bubbles.md (new), docs/keyboard.md, docs/plans/bot-bubbles.md and the docs/plans/README.md row.
CI and review fixes (2026-11-25)
main. Fixed three real CI failures:chat-transition.test.tsximportedbot-bubbles.cssthroughwindow-host.tsx(the CSS now loads from the main-window entry); the scheduled-notification harness now stubs the funnel's newisAidenAppWindowFocusedseam; the Bot IPC gating contract now matches thebotsblock that also registers bubble handlers.recentReplyAt); the mini chat no longer shows a settings Undo that can't work. The badge change was not screenshotted: it now shows the number where it used to show an empty dot.