feat: add full-page screenshots to extension and CLI - #226
Open
iuyo5678 wants to merge 9 commits into
Open
Conversation
iuyo5678
marked this pull request as ready for review
September 11, 2026 03:28
Reconnect screenshot content scripts in already-open documents instead of silently switching to manual capture. Track top-level navigation so loading subframes do not interrupt capture.
Scope completed popup state to its source page and discard it when browsing elsewhere. Preserve the capture preview during tab creation and keep open previews available for export.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds long screenshots to Quick actions and
bsk screenshot --full-page. The popup supports automatic document scrolling, manual scrolling, visible-area capture, pause/resume, early finish, cancellation, tiled preview and PNG download. Quick Actions works independently of the CLI. Finished popup state is cleared when the user changes pages; existing previews remain usable.Agents can use
bsk screenshot --session <id> --full-page --out page.png, with an optional--timeout(default: two minutes for capture and encoding). This reuses the same scrolling, disk tiles and PNG encoder. The extension excludes the Agent overlay, restores page position/styles, and serves the PNG in session-scoped 256 KiB chunks. The CLI atomically replaces the output after receiving all bytes and releases the export after success or failure. Ctrl-C and the page Escape control cancel the operation. Full-page scrolling obeys session ownership and user-interrupt gates; viewport and ref screenshots retain their existing route and output shape.Captures use 512-row OPFS tiles and streaming PNG encoding, avoiding a full-page canvas or whole-image base64 transport. Preview only loads nearby tiles. There is no fixed 32K-height or megapixel cutoff; storage capacity, PNG bounds and viewer capabilities still apply. Quick Actions can retain durable partial results, while Agent failures never report a partial image as a completed capture. Expired and abandoned Agent exports are cleaned separately from user previews.
Automatic capture reconnects its content script after extension reload and observes top-level navigation rather than subframe loading. Restricted browser/store pages support user-invoked manual or visible-area capture; Agent automatic capture requires a scriptable HTTP(S) document. Nested scroll containers and virtualized lists remain outside automatic full-page support. Manual alignment rejects ambiguous overlaps instead of guessing seams.
Validation:
CLI help, protocol schemas, English/Chinese READMEs, the bundled Agent skill and
docs/long-screenshot.mdare updated. Use matching CLI and extension builds and restart an already-running daemon after upgrading the CLI.