feat(screenshot): --native-density keeps the display's own pixels

TU
2d ago
+162-21

iOS simulator screenshots default to 1x points. --pixel-density <n> gets more, but the caller must know each device's scale, and a wrong guess resamples the image: 3 upscales a 1x simulator. A host that shows screenshots beside a device-pixel stream, such as T3 Code on a Simlock lease, has no way to ask for what the display shows.

--native-density skips the density step and keeps the captured pixels. It's refused together with --pixel-density, and off iOS-family simulators, like --pixel-density.

Tested: pnpm typecheck, unit-core for capture-kit, command-surface, the daemon execution, platform-apple core, the CLI and repo guards (3005 passed). On a live iPhone 17 Pro simulator (3x), --native-density gave 1206x2622, the default stayed 402x874, and combining both flags was refused.

A native capture also returns the measured pixelDensity and logicalWidth/logicalHeight, so a caller can map pixels to tap coordinates. On a live iPhone 17 Pro simulator: 1206x2622, density 3, logical 402x874; the default stayed 402x874 at density 1. A tap at a row's pixel position divided by 3 opened that row.

šŸ¤– Generated with Claude Code