From 58767cb53e5285ad7596332e41661f0fb6a61b27 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 9 Sep 2026 16:05:20 +0200 Subject: [PATCH] Say what the comment is for, not what the bug was --- AGENTS.md | 4 ++-- e2e-tests/visual.spec.ts | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 62a2de1..36e4390 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -289,8 +289,8 @@ Revisit only if the stated reason stops holding. the two in step. - **One scroller, the document** (priority 1). `.app` is `min-height: 100dvh`. `.nav`'s `overflow-y: auto` and `.side-footer`'s `flex: 0 0 auto` are not leftovers of a bounded frame: - they are what makes the off-canvas panel usable with a long tree. `#nav-toggle` is `position: fixed` - for the same reason — a label click focuses it, and a browser scrolls a focused element into view. + they are what makes the off-canvas panel usable with a long tree. `#nav-toggle` is `position: fixed` — + a label click focuses it, and a browser scrolls a focused element into view. - **`ICON_NAMES` (`src/ui/icons.ts`) is a host-owned registry, not a frozen plugin contract**, so it is deliberately not re-exported from `@plainpages/plugin-api`. The palette may narrow when the last reference to an id goes, and a plugin needing one gets it re-registered in the same change. Accepted cost: an diff --git a/e2e-tests/visual.spec.ts b/e2e-tests/visual.spec.ts index 4e5c93d..ce75af7 100644 --- a/e2e-tests/visual.spec.ts +++ b/e2e-tests/visual.spec.ts @@ -47,10 +47,7 @@ for (const [name, path, tail] of [ } } -// The drawer is an overlay, so the document keeps scrolling behind it. Closing it must then leave -// the reader where they were: the toggle is focusable and its label is what a tap hits, and a -// browser scrolls a focused element into view — from the top of the document that meant jumping -// there. `#nav-toggle` is `position: fixed` so there is nothing to scroll to. +// Green only while #nav-toggle is position: fixed — a label tap focuses it, and focus scrolls into view. test("closing the mobile drawer leaves the reader where the scrim found them", async ({ page }) => { await page.setViewportSize({ width: 390, height: 200 }); await page.goto("/dashboard");