mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-02 11:45:20 +02:00
docs: handoff section in browse template + TODOS update
Add User Handoff section to browse/SKILL.md.tmpl with usage examples. Update State Persistence TODO noting saveState/restoreState reusability.
This commit is contained in:
@@ -52,7 +52,9 @@
|
||||
|
||||
**Why:** Enables "resume where I left off" for QA sessions and repeatable auth states.
|
||||
|
||||
**Effort:** M
|
||||
**Context:** The `saveState()`/`restoreState()` helpers from the handoff feature (browser-manager.ts) already capture cookies + localStorage + sessionStorage + URLs. Adding file I/O on top is ~20 lines.
|
||||
|
||||
**Effort:** S
|
||||
**Priority:** P3
|
||||
**Depends on:** Sessions
|
||||
|
||||
|
||||
@@ -106,6 +106,32 @@ $B diff https://staging.app.com https://prod.app.com
|
||||
### 11. Show screenshots to the user
|
||||
After `$B screenshot`, `$B snapshot -a -o`, or `$B responsive`, always use the Read tool on the output PNG(s) so the user can see them. Without this, screenshots are invisible.
|
||||
|
||||
## User Handoff
|
||||
|
||||
When you hit something you can't handle in headless mode (CAPTCHA, complex auth, multi-factor
|
||||
login), hand off to the user:
|
||||
|
||||
```bash
|
||||
# 1. Open a visible Chrome at the current page
|
||||
$B handoff "Stuck on CAPTCHA at login page"
|
||||
|
||||
# 2. Tell the user what happened (via AskUserQuestion)
|
||||
# "I've opened Chrome at the login page. Please solve the CAPTCHA
|
||||
# and let me know when you're done."
|
||||
|
||||
# 3. When user says "done", re-snapshot and continue
|
||||
$B resume
|
||||
```
|
||||
|
||||
**When to use handoff:**
|
||||
- CAPTCHAs or bot detection
|
||||
- Multi-factor authentication (SMS, authenticator app)
|
||||
- OAuth flows that require user interaction
|
||||
- Complex interactions the AI can't handle after 3 attempts
|
||||
|
||||
The browser preserves all state (cookies, localStorage, tabs) across the handoff.
|
||||
After `resume`, you get a fresh snapshot of wherever the user left off.
|
||||
|
||||
## Snapshot Flags
|
||||
|
||||
{{SNAPSHOT_FLAGS}}
|
||||
|
||||
Reference in New Issue
Block a user