Repository navigation
Closed
Labels
Description
Decision
Reject --fullscreen for macOS desktop and menubar surfaces, and keep it for macOS app sessions. This decision was cross-checked with a second model and against the code at 01328de411.
Facts
- The macOS helper reads only non-app surfaces: see
usesMacOsHelperSurface/usesMacOsSurfaceScreenshotinpackages/platform-apple/src/interactor.ts:417-425. App sessions go through the runner, which handles--fullscreencorrectly by choosing between the full display and the app window (apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandExecution.swift:2058). Don't change that path. - For desktop and menubar surfaces, the helper parses
--fullscreen(apple/macos-helper/Sources/AgentDeviceMacOSHelper/main.swift:439), ignores it (:550-551_ = fullscreen), always captures the main display (:557-566), and echoes the flag back (:441,ScreenshotResponse.fullscreenat:78). TS sends the flag (packages/platform-apple/src/os/macos/helper.ts:476-485) and reports it (core/screenshot.ts:157,169,234). - This has been the behavior since feat: close macOS parity gaps #311 (876f091, v0.11.2).
Required behavior
- On macOS, a
screenshotwith an explicitfullscreenandsurfaceset todesktopormenubarfails withINVALID_ARGS, saying these surfaces always capture the main display. It fails before any capture. Withoutfullscreen, the behavior is unchanged. - macOS app sessions and every other platform keep accepting
--fullscreenunchanged. - Remove
--fullscreenfrom the helper: the argument parse, the parameter, and thefullscreenresponse field. Remove it from the TS helper argv and from the result metadata for helper surfaces. The reported metadata must describe what was actually captured, the main display. - Update the surface-specific help text for
screenshot.
Completion conditions
- TS routing tests cover desktop and menubar with
fullscreen(refused), desktop without it (helper argv has no--fullscreen), and a macOS app session withfullscreen(runner path, unchanged). - A helper Swift test in
apple/macos-helperasserts the argument is gone from the response. pnpm check:macos-helper,pnpm check:affected --runandpnpm check:command-docsare green.- Live check on a Mac: a desktop capture, an app session with
--fullscreenand one without, where the with and without dimensions differ. Record the commands and dimensions in the PR.
Activity
[-]decide: macOS helper ignores `--fullscreen` but reports it[/-][+]fix(macos): reject --fullscreen for macOS desktop/menubar helper surfaces[/+]