You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/action/dist/index.js
+42-19Lines changed: 42 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -41787,7 +41787,6 @@ function buildScriptGenerationPrompt(options) {
41787
41787
## Rules
41788
41788
- Navigate to the affected pages
41789
41789
- Interact with new/changed UI elements (click buttons, fill forms, hover states)
41790
-
- Add \`await page.waitForTimeout(1500)\` pauses on key visual states so the recording captures them clearly
41791
41790
- Use resilient selectors in priority order: text content > ARIA roles > test IDs > CSS classes
41792
41791
- The script must be self-contained and immediately runnable
41793
41792
- Total demo should be under ${options.maxDuration} seconds
@@ -41796,6 +41795,16 @@ function buildScriptGenerationPrompt(options) {
41796
41795
- Do NOT inject code into the page via \`page.evaluate\`, \`page.addInitScript\`, or inline \`<script>\` / \`<style>\` tags. The recording infrastructure handles visual overlays \u2014 the script should not.
41797
41796
- Always call \`await page.waitForLoadState('networkidle')\` after navigation
41798
41797
41798
+
## Timing
41799
+
- Keep pauses short: use \`await page.waitForTimeout(300)\` between most actions
41800
+
- Only use a longer pause (\`await page.waitForTimeout(800)\`) directly after an interaction whose visual result (animation, state change, panel opening) is the point of the demo
41801
+
- Avoid stacking multiple pauses in a row \u2014 one pause per meaningful moment is enough
41802
+
41803
+
## Mouse movement
41804
+
- Move the mouse naturally between interactions: before clicking or hovering a target, briefly move to a nearby point first so the cursor doesn't teleport
41805
+
- Use \`await page.mouse.move(x, y)\` for a single intermediate waypoint \u2014 keep it simple, one waypoint is enough
41806
+
- Coordinates should be plausible screen positions relative to the viewport (${options.viewport.width}x${options.viewport.height})
0 commit comments