docs(browse): warn that hover scrolls and the daemon tab persists across sessions

Fixes #2445. Both behaviors are by design but produced confidently wrong
verification output: hovering a below-the-fold element scrolls the page
before a "rest state" screenshot (exit 0, wrong section), and the daemon's
tab survives sessions so a bare `reload` can act on whatever earlier work
left open. The screenshot-evidence section now names both traps with the
concrete guards (assert window.scrollY; always goto before verifying).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-08-16 09:23:31 -07:00
co-authored by Claude Fable 5
parent 0f70ea827c
commit 9cd1e875ea
2 changed files with 24 additions and 0 deletions
+12
View File
@@ -619,6 +619,18 @@ $B screenshot /tmp/bug.png # plain screenshot
$B console # error log
```
Two behaviors that silently invalidate screenshots (#2445 — designed, but
surprising):
- **`hover` scrolls its target into view.** Hovering anything below the fold
scrolls the page first, so a "rest state" shot taken afterwards captures
the wrong section with exit 0. Before a rest-state screenshot, hover only
something already visible, and assert position when it matters:
`$B js "window.scrollY"` should be `0` (or your intended offset).
- **The tab persists across sessions.** The daemon keeps its tab between your
sessions, so `reload` or `screenshot` without a preceding `goto` can act on
whatever page earlier work left open. Start verification passes with an
explicit `$B goto <url>`, never a bare `reload`.
### 5. Find all clickable elements (including non-ARIA)
```bash
$B snapshot -C # finds divs with cursor:pointer, onclick, tabindex
+12
View File
@@ -65,6 +65,18 @@ $B screenshot /tmp/bug.png # plain screenshot
$B console # error log
```
Two behaviors that silently invalidate screenshots (#2445 — designed, but
surprising):
- **`hover` scrolls its target into view.** Hovering anything below the fold
scrolls the page first, so a "rest state" shot taken afterwards captures
the wrong section with exit 0. Before a rest-state screenshot, hover only
something already visible, and assert position when it matters:
`$B js "window.scrollY"` should be `0` (or your intended offset).
- **The tab persists across sessions.** The daemon keeps its tab between your
sessions, so `reload` or `screenshot` without a preceding `goto` can act on
whatever page earlier work left open. Start verification passes with an
explicit `$B goto <url>`, never a bare `reload`.
### 5. Find all clickable elements (including non-ARIA)
```bash
$B snapshot -C # finds divs with cursor:pointer, onclick, tabindex