Skip to content

Add native desktop fallback for screenshot capture#486

Merged
BunsDev merged 1 commit intomainfrom
okcode/fix-screenshot-tool
Apr 21, 2026
Merged

Add native desktop fallback for screenshot capture#486
BunsDev merged 1 commit intomainfrom
okcode/fix-screenshot-tool

Conversation

@BunsDev
Copy link
Copy Markdown
Member

@BunsDev BunsDev commented Apr 21, 2026

Summary

  • Add a desktop IPC path to capture the current window as a data URL and expose it through the preload bridge.
  • Wait for the backend TCP server to be ready before creating the main window, reducing startup races.
  • Refactor screenshot capture to prefer the native desktop image and fall back to DOM rendering when native capture is unavailable.
  • Add unit coverage for backend startup polling and screenshot capture selection/filtering behavior.

Testing

  • bun fmt
  • bun lint
  • bun typecheck
  • Added/updated Vitest coverage for waitForTcpServer and captureBaseScreenshotDataUrl
  • Not run: bun run test

- Capture the Electron window before falling back to DOM rasterization
- Wait for the backend TCP server before creating the main window
- Add IPC plumbing and tests for startup and screenshot capture
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
okcode-marketing Ready Ready Preview Apr 21, 2026 2:13am
v0-compute-the-platform-to-build Ready Ready Preview, Open in v0 Apr 21, 2026 2:13am

@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Apr 21, 2026
@BunsDev BunsDev merged commit 34e9511 into main Apr 21, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant