Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

fix(ui): reveal pet dismiss controls on hover (#2798)

Maxb1c0c6783b02
diff --git a/docs/plans/2026-10-12-desktop-mini-main-agent.md b/docs/plans/2026-10-12-desktop-mini-main-agent.md
index 4176e8ed0..8dc6c7940 100644
--- a/docs/plans/2026-10-12-desktop-mini-main-agent.md
+++ b/docs/plans/2026-10-12-desktop-mini-main-agent.md
@@ -144,7 +144,7 @@ the main agent; there is no Follow up on cards.
| Container | Radius 28px; padding 20px × 14px; background `#2a2a2e`; border 1px `white / 8%`; no shadow (§3.2). |
| Title | 15px, semibold, tight tracking, white, one line, ellipsis. The full text is the tooltip. |
| Subtitle | 13px, `white / 45%`, 2px below the title, one line, ellipsis, with the full text as the tooltip. While running it has a 6px pulsing dot (`emerald-400`) before the text. |
-| × (dismiss) | Expanded list only, never on the main agent card. 20px circle at the top-left corner, offset −6px/−6px. Background `#3a3a3e`, glyph 11px `white / 70%`; on hover `#4a4a50` with a white glyph. Sits above the card content. |
+| × (dismiss) | Expanded activity cards only. 20px circle at the top-left corner, offset −6px/−6px. Hidden until the card is hovered or receives focus within; always visible when hover is unavailable. Background `#3a3a3e`, glyph 11px `white / 70%`; on hover `#4a4a50` with a white glyph. Sits above the card content. |
| Stop | Expanded list only, running sub-tasks only (§6). A 32px circle with background `white / 10%` and a filled rounded-square SVG icon at `white / 80%`. Its right gap and top gap to the card edge are both 16px. |
- There is **no reply/return button** and **no Follow up** (owner decisions).
diff --git a/ui/e2e/pet-mini/layout.spec.ts b/ui/e2e/pet-mini/layout.spec.ts
index fae489928..871432130 100644
--- a/ui/e2e/pet-mini/layout.spec.ts
+++ b/ui/e2e/pet-mini/layout.spec.ts
@@ -252,6 +252,63 @@ test('the reply bubble names Vibey as written', async ({ page }) => {
expect(await eyebrow.evaluate((node) => node.innerText)).toContain('Vibey');
});
+test('expanded dismiss controls stay local to hover and focus', async ({ page }) => {
+ await page.goto('/e2e/pet-mini/fixture.html?scenario=personal&activities=2');
+ await page.locator('.pet-mini-collapsed').click();
+ await page.locator('.pet-mini-swap').evaluate(async (node) => {
+ await Promise.all(node.getAnimations().map((animation) => animation.finished));
+ });
+ await page.mouse.move(0, 0);
+ const cards = page.locator('.pet-mini-card');
+ const dismisses = page.locator('.pet-mini-dismiss');
+ await expect(cards).toHaveCount(2);
+ await expect(dismisses).toHaveCount(2);
+ const before = await cards.evaluateAll((nodes) => nodes.map((node) => node.getBoundingClientRect().toJSON()));
+ for (const dismiss of await dismisses.all()) {
+ await expect(dismiss).toHaveCSS('opacity', '0');
+ await expect(dismiss).toHaveCSS('pointer-events', 'none');
+ }
+
+ await cards.nth(0).hover();
+ expect(await cards.evaluateAll((nodes) => nodes.map((node) => node.getBoundingClientRect().toJSON()))).toEqual(before);
+ await expect(dismisses.nth(0)).toHaveCSS('opacity', '1');
+ await expect(dismisses.nth(0)).toHaveCSS('pointer-events', 'auto');
+ await expect(dismisses.nth(1)).toHaveCSS('opacity', '0');
+ await expect(dismisses.nth(1)).toHaveCSS('pointer-events', 'none');
+
+ await page.mouse.move(0, 0);
+ await cards.nth(1).locator('.pet-mini-card-reference').focus();
+ await expect(dismisses.nth(0)).toHaveCSS('opacity', '0');
+ await expect(dismisses.nth(1)).toHaveCSS('opacity', '1');
+ await expect(dismisses.nth(1)).toHaveCSS('pointer-events', 'auto');
+});
+
+test.describe('expanded dismiss controls on touch', () => {
+ test.use({ hasTouch: true });
+
+ test('remain visible when hover is unavailable', async ({ page }) => {
+ await page.goto('/e2e/pet-mini/fixture.html?scenario=personal&activities=2');
+ await page.locator('.pet-mini-collapsed').click();
+ await expect(page.locator('.pet-mini-card')).toHaveCount(2);
+ expect(await page.evaluate(() => matchMedia('(hover: none)').matches)).toBe(true);
+ for (const dismiss of await page.locator('.pet-mini-dismiss').all()) {
+ await expect(dismiss).toHaveCSS('opacity', '1');
+ await expect(dismiss).toHaveCSS('pointer-events', 'auto');
+ }
+ });
+});
+
+for (const theme of ['light', 'dark']) {
+ test(`captures expanded dismiss hover state (${theme})`, async ({ page }, testInfo) => {
+ await page.goto('/e2e/pet-mini/fixture.html?scenario=personal&activities=2');
+ await page.evaluate((theme) => { document.documentElement.dataset.theme = theme; }, theme);
+ await page.locator('.pet-mini-collapsed').click();
+ await expect(page.locator('.pet-mini-card')).toHaveCount(2);
+ await page.locator('.pet-mini-card').first().hover();
+ await page.screenshot({ path: testInfo.outputPath(`expanded-dismiss-${theme}.png`), scale: 'css', animations: 'disabled' });
+ });
+}
+
test('attention leads the list and referencing sends only through the main composer', async ({ page }) => {
await page.goto('/e2e/pet-mini/fixture.html?scenario=personal');
@@ -357,6 +414,7 @@ test('a close during a main outage lasts until the mini document reopens', async
window.petFixtureConnection(true);
});
await expect(page.getByText("Couldn't open the conversation with Vibey. Try again in a moment.")).toBeVisible();
+ await card.hover();
await card.locator('.pet-mini-dismiss').click();
await expect(card).toHaveCount(0);
await page.evaluate(() => {
diff --git a/ui/src/pet/pet-mini.css b/ui/src/pet/pet-mini.css
index 9c26fd399..5b967888a 100644
--- a/ui/src/pet/pet-mini.css
+++ b/ui/src/pet/pet-mini.css
@@ -198,7 +198,17 @@ to {
border-radius:999px;
background:var(--pet-dismiss);
color:color-mix(in srgb,var(--pet-ink) 70%,transparent);
- cursor:pointer}
+ cursor:pointer;
+ opacity:0;
+ pointer-events:none;
+ transition:opacity 120ms ease}
+.pet-mini-card:hover .pet-mini-dismiss,
+.pet-mini-card-wrap:hover .pet-mini-dismiss,
+.pet-mini-card:focus-within .pet-mini-dismiss,
+.pet-mini-card-wrap:focus-within .pet-mini-dismiss,
+.pet-mini-dismiss:focus-visible {
+ opacity:1;
+ pointer-events:auto}
.pet-mini-dismiss:hover {
background:var(--pet-dismiss-hover);
color:var(--pet-ink)}
@@ -545,6 +555,9 @@ to {
opacity:1;
transform:none;
pointer-events:auto}
+ .pet-mini-dismiss {
+ opacity:1;
+ pointer-events:auto}
}
@media(prefers-reduced-motion:reduce) {
.pet-mini-cards,.pet-mini-slot,.pet-mini-slot-body,.pet-mini-detail,.pet-mini-row,.pet-mini-panel {