collab-presence 0010: unified draggable overlay menu

One circular FAB (peer-count badge) replaces the top-right overlay row:
draggable anywhere (pointer capture, 4px click-vs-drag threshold — the
comment-pin pattern), position persisted in localStorage, panel opens
toward screen center and stacks composable sections — roster, source chip,
view-only pill, follow row, comments, chrome toggle. Renders at z-50 above
everything (decided: covers wx dialogs; trivially dismissed via click-away/
Esc/drag). CommentLayer portals its bar + list panel into the menu's
comments slot; pins/popovers/composer/click-catcher stay canvas-anchored.
The FAB is the chrome-hidden survivor. e2e specs updated with an
openOverlayMenu helper (panel is closed by default, click-away closes it).

NOTE: Playwright suites updated but not executed here (no local WASM
artifacts) — verify on CI / next session.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A42xfPFNdfsUt9eowkC9eM
This commit is contained in:
Gergő Törcsvári 2026-07-16 14:56:31 +02:00
commit f4d3c3f146
No known key found for this signature in database
GPG key ID: 8E75F2CDE64E5322
11 changed files with 410 additions and 141 deletions

View file

@ -1,4 +1,5 @@
import { test, expect, type Browser, type Page } from '@playwright/test';
import { openOverlayMenu } from './overlay-menu';
/**
* Read-only viewer e2e (read-only-viewer): `?readonly=1` boots the pcbnew
@ -118,6 +119,8 @@ test('viewer boots locked: chrome-less, nothing selectable, hotkey edits inert,
// "View only" pill is the one read-only affordance; Ctrl+\ stays inert.
await expect.poll(() => visibleMenuTitles(viewer), { timeout: 15000 }).toBe(0);
await expect(viewer.getByText(/console \(/)).toHaveCount(0);
// The pill + (absent) chrome toggle live inside the overlay menu (0010).
await openOverlayMenu(viewer);
await expect(viewer.locator('[data-testid="chrome-toggle"]')).toHaveCount(0);
await expect(viewer.getByTestId('view-only-pill')).toBeVisible();
await viewer.keyboard.press('Control+\\');
@ -136,6 +139,7 @@ test('viewer boots locked: chrome-less, nothing selectable, hotkey edits inert,
expect(await visibleMenuTitles(viewer)).toBe(0);
// The writer beside it keeps the full UI (positive control for the above).
await openOverlayMenu(writer);
await expect(writer.locator('[data-testid="chrome-toggle"]')).toBeVisible();
await expect(writer.getByTestId('view-only-pill')).toHaveCount(0);