screenshots: make the capture project work on macOS - #14
Open
philipph-askui wants to merge 4 commits into
Open
Conversation
For the maintainer: 'npm run screenshots' now picks the right driver per platform — regenerate.ps1 on Windows, the new regenerate.sh on macOS/Linux (same flow; additionally falls back to the controller the desktop app installed and documents the Screen Recording permission). setup.md launches the app via Start menu or Spotlight and scopes to the right window per platform (process 'AskUI.Desktop.Windows' vs 'AskUI Desktop', ignoring the controller's tiny helper windows; maximise via the zoom button, not full-screen mode, which would hide the title bar). Verified on macOS against the real pipeline: local controller start, list_windows, set_active_window, and a clean window-scoped PNG of the AskUI Desktop Mac app — everything up to the model call, which needs the operator's .env. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Window matching is now by title ('AskUI Desktop…'), not process name — a
dev build launched via run-mac.sh runs under the 'dotnet' process, and
setup.md now prefers an already-open app window over launching the
installed one. Verified on macOS: the dev-build window (process 'dotnet',
title 'AskUI Desktop (Beta)') scopes and screenshots cleanly.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Author
|
Added dev-build support: window matching is title-based now, so you can start a fresh build from the app repo ( |
The default sibling name only covered one layout; the driver now probes integrated-task-plattform (and the -platform spelling) next to the docs repo plus the 2-DesktopApp/main layout, with APP_REPO still winning, and lists the probed paths when nothing matches. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…t .env The driver reads both from screenshots-capture/.env (the file the CLI already uses for credentials); environment variables still win. The display is passed to the CLI as --display, default 1. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Enables #13 (screenshot recapture) to run on a Mac instead of requiring a Windows machine.
What changed
regenerate.sh— macOS/Linux driver mirroringregenerate.ps1: resolves the sibling app repo (APP_REPO=override), setsDOCS_SCREENSHOTS_DIR, runs the CLI. Additionally exportsASKUI_CONTROLLER_PATHfalling back to the controller the desktop app installed.npm run screenshots— picks the driver per platform.tests/setup.md— platform-aware: launch via Start menu (Windows) or Spotlight (macOS); window scoping matchesAskUI.Desktop.WindowsvsAskUI Desktopand ignores the controller's 1×1 helper windows; maximise via the zoom button (full-screen mode would move the app to its own space and hide the title bar).Verified on macOS
Drove the real pipeline (SDK → local controller) on a Mac without a model: controller auto-start ✓, full-screen screenshot ✓,
list_windowsfindsprocess='AskUI Desktop'✓,set_active_window✓, and a clean window-scoped PNG of the app ✓. The only remaining run-time prerequisites are the operator's.envcredentials and a signed-in app.One caveat: Mac captures show macOS window chrome (traffic lights) instead of Windows chrome — fine for most shots, but worth a conscious call before replacing the whole set from a Mac.
🤖 Generated with Claude Code