# 098 - Docked Speech Bubbles with Avatar and Close ## User Story As the operator, I want a speech bubble that sits at the bottom screen edge to show who speaks by their avatar and to close with one click, so that I know the speaker without an avatar on screen and can skip a message I do not need. ## Decisions (operator-confirmed 2026-11-28; do not re-litigate) 1. **Avatar inside the docked bubble**: a bubble that has no visible avatar to point at sits in the bottom bar (`.bubble-bar`); there it shows the speaker's avatar (the same `face()` as everywhere in the hub) on the left, next to the name. A bubble anchored to an avatar keeps its tail and shows neither the avatar nor the close icon. Rejected: avatar only without close; a chat dock with history; a mini avatar in the top bar as anchor. 2. **Close icon on every docked bubble**: a visible ร— button (not only on hover, so touch works), keyboard reachable, with a tooltip naming what it does. Rejected: ร— on hover only; one ร— for the whole bar. 3. **ร— skips the message**: on the bubble being read aloud the voice stops that message and goes on with the next; a silent bubble leaves with the usual fade (086); a queued one leaves the queue. Rejected: hide the bubble while the voice reads on; stop all speech. 4. **Own requirement**: 052 (bubbles beside modes) stays as it is. ## Approach ```mermaid flowchart TD subgraph P["๐Ÿงญ 0 ยท Preparation"] P1["๐Ÿ“‹ Write requirement"] --> P2{"โœ… Operator approves?"} P2 -- "โœ๏ธ corrections" --> P1 end P2 -- "๐Ÿค– yes" --> A1 subgraph A["๐Ÿ’ฌ A ยท Docked bubble"] A1["๐Ÿง‘ Avatar in the docked bubble"] --> A2["โœ–๏ธ Close button skips the message"] A2 --> A3{"๐Ÿงช Unit and E2E green?"} A3 -- "๐Ÿ”ด no: fix" --> A1 A3 -- "๐ŸŸข yes" --> AF{"๐Ÿ’ฌ Operator feedback on screenshots?"} AF -- "โœ๏ธ changes" --> A1 end AF -- "๐Ÿ‘ fits" --> D1["๐Ÿ Review, commit with operator OK, hand-over"] ``` ## Acceptance Criteria ### Avatar - [ ] A bubble in `.bubble-bar` shows the speaker's `.avatar[data-face]` left of the name. - [ ] A bubble anchored to an avatar shows no avatar and no close button. - [ ] The avatar inside a bubble is never used as an anchor for a bubble. ### Close - [ ] Every docked bubble has a `button` with an accessible name and a tooltip; it takes clicks although the bubble layer ignores the pointer. - [ ] A click on ร— of the message being read aloud stops its audio, and the next pending message starts. - [ ] A click on ร— of a silent bubble removes it through `vanish()`, and it does not come back on the next poll. - [ ] A click on ร— of a queued message removes it from the queue. ### Tests - Unit: - [ ] The skip of the current, a queued and a silent item (node). - Integration: - n/a: no server change. - E2E: - [ ] `tests/e2e/test_bubble_dock_e2e.py`: a docked bubble shows avatar and ร—, an anchored one neither, ร— removes the silent bubble.