Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions packages/cuttle/internal/cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ cuttle downloads page.png # pull it to this host
logs stay in the container: `cuttle pw console` prints them.
- **Never read a content-heavy page whole.** An article's or doc's snapshot
runs to hundreds of KB: `find '<text>'`, `snapshot <ref>` for one subtree,
or an `eval` that returns just what you need.
or an `eval` that returns just what you need. A subtree snapshot replaces
the live refs with its own: `find` again before acting outside it.
- **Another instance?** `--name`/`--context` go BEFORE `pw`: `cuttle --name
scraper pw snapshot` (or set `CUTTLE_NAME`). After `pw`, every arg is the driver's.
- **One driver at a time.** While a `cuttle jev-browse` run holds the session
Expand Down Expand Up @@ -142,8 +143,9 @@ opens or closes a tab.
**3. A blocked page looks like a broken selector.** A native dialog - `alert`,
`confirm`, `prompt`, "Leave site?" (`beforeunload`) - pauses the renderer.
`snapshot` and `click` print a `Modal state` block, but a `goto` into one can
return empty with exit 0. Clear it with `cuttle pw dialog-accept` or
`dialog-dismiss`. **`beforeunload` is inverted: ACCEPT leaves the page, DISMISS
return empty with exit 0. Clear it with `cuttle pw dialog-accept` (a `prompt`
takes its answer: `dialog-accept '<text>'`) or `dialog-dismiss`.
**`beforeunload` is inverted: ACCEPT leaves the page, DISMISS
stays.** If you asked for the navigation, accept. A dialog still open when the
driver session ends (`detach`, `close`, a crashed driver) is dismissed for you,
so a `confirm` left open answers "cancel". Never stub `window.alert` or
Expand Down
Loading