Skip to content

screenshots: make the capture project work on macOS - #14

Open
philipph-askui wants to merge 4 commits into
mainfrom
docs/mac-screenshot-capture
Open

screenshots: make the capture project work on macOS#14
philipph-askui wants to merge 4 commits into
mainfrom
docs/mac-screenshot-capture

Conversation

@philipph-askui

Copy link
Copy Markdown
Contributor

Enables #13 (screenshot recapture) to run on a Mac instead of requiring a Windows machine.

What changed

  • regenerate.sh — macOS/Linux driver mirroring regenerate.ps1: resolves the sibling app repo (APP_REPO= override), sets DOCS_SCREENSHOTS_DIR, runs the CLI. Additionally exports ASKUI_CONTROLLER_PATH falling 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 matches AskUI.Desktop.Windows vs AskUI Desktop and 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).
  • README — macOS prerequisites (Screen Recording permission for the controller).

Verified on macOS

Drove the real pipeline (SDK → local controller) on a Mac without a model: controller auto-start ✓, full-screen screenshot ✓, list_windows finds process='AskUI Desktop' ✓, set_active_window ✓, and a clean window-scoped PNG of the app ✓. The only remaining run-time prerequisites are the operator's .env credentials 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

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>
@philipph-askui

Copy link
Copy Markdown
Contributor Author

Added dev-build support: window matching is title-based now, so you can start a fresh build from the app repo (src/AskUI.Desktop.Mac/run-mac.sh on macOS — note plain dotnet run doesn't assemble the wwwroot; dotnet run --project src/AskUI.Desktop.Windows on Windows), sign in, and run the capture against it. Verified on macOS: the dotnet-hosted dev window scopes and screenshots cleanly.

philipph-askui and others added 2 commits July 30, 2026 17:15
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>
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