mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-09 22:48:57 +02:00
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:
co-authored by
Claude Fable 5
parent
0f70ea827c
commit
9cd1e875ea
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user