Skip to content

feat: add wait-download command and fix responsive layout in .pw skills (#829)#909

Merged
stevez merged 1 commit into
mainfrom
feat/wait-download-829
Jun 23, 2026
Merged

feat: add wait-download command and fix responsive layout in .pw skills (#829)#909
stevez merged 1 commit into
mainfrom
feat/wait-download-829

Conversation

@stevez

@stevez stevez commented May 23, 2026

Copy link
Copy Markdown
Owner

Summary

How wait-download works

chrome.downloads.onChanged fires when a download state changes. The command registers a one-shot resolver that fires on state === 'complete' (returns filename path) or state === 'interrupted' (returns error). 30s timeout.

Typical .pw skill flow:

download-as rogers-2026-01.pdf
click "Download bills"
wait-download   → C:\Users\...\Downloads\rogers-2026-01.pdf

Test plan

  • Run download-bill.pw via stagecraft run download-rogers-bill --http -v billing_period="..." -v filename="..." — verify path is returned after download
  • Verify wait-download times out with error after 30s if no download starts
  • Verify Rogers page renders at 1280×800 (desktop layout, "Save PDF" visible)

🤖 Generated with Claude Code

- Add `wait-download` command to extension background.ts — waits for the next
  Chrome download to complete and returns the full saved file path via
  chrome.downloads.onChanged listener (30s timeout, error on interruption)
- Add `wait-download` to COMMANDS map and 'Other' category in resolve.ts
- Fix download-bill.pw: prepend `resize 1280 800` so Rogers shows "Save PDF"
  at desktop width (not the narrow-viewport variant); add `wait-download` at end
- Align SKILL.md parameters with .pw variables (billing_period + filename)
- Document wait-download in AGENT.md commands reference table

Related: #829

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@stevez stevez force-pushed the feat/wait-download-829 branch from b5a8368 to 80ddfc7 Compare May 23, 2026 14:11
@stevez stevez merged commit 6f79aeb into main Jun 23, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant