Commit Graph

7 Commits

Author SHA1 Message Date
Scott Idem
6cddd69891 fix(display): skip mirror/extend if already in requested state
mirror_displays() now checks CGDisplayMirrorsDisplay() for each secondary
before calling CGBeginDisplayConfiguration — avoids a needless display
reconfiguration (and potential flicker) when already mirrored.
extend_displays() already had this check; no change needed there.
2026-05-20 18:24:33 -04:00
Scott Idem
54308c6d4a feat(display): add list-modes and set-mode commands
display_control.m:
  list-modes  — JSON array of all online displays with every usable mode
                (width, height, refresh, pixel_width, pixel_height, hidpi, is_current)
  set-mode <display_index> <width> <height> [--refresh <hz>] [--hidpi] [--no-hidpi]
              — picks best matching CGDisplayMode; auto-prefers HiDPI on
                built-in and non-HiDPI on externals; highest refresh wins on ties

system_handlers.ts:
  native:list-display-modes  — runs binary, parses JSON, returns displays[]
  native:set-display-mode    — runs binary with supplied args

preload/index.ts + shared/types.ts:
  list_display_modes() / set_display_mode() exposed through bridge with full types
2026-05-20 18:16:43 -04:00
Scott Idem
ce2832a584 fix(build): replace scp with ssh+cat to handle space in username
scp's own user@host:path parser splits on the space in 'speaker ready'
even when the shell argument is quoted. ssh already handles it correctly.
Upload: ssh cat < file; Download: ssh cat > file.
2026-05-20 17:22:34 -04:00
Scott Idem
b6b902ad4a feat(build): add remote-build-display-control.sh for workstation → Mac builds
Copies display_control.m to laptop 01 via SSH, compiles universal binary
(x86_64 + arm64) on the remote Mac, pulls binary back to resources/bin/.
Defaults to 192.168.32.101; accepts optional IP override as $1.

README: restructure display_control build section — Option A (remote from
workstation, preferred) and Option B (direct on Mac).
2026-05-20 17:16:25 -04:00
Scott Idem
3da3b187ec build(display): universal binary — compile x86_64 + arm64 and lipo into fat binary
Compiles both arches separately then links with lipo -create.
Prevents silent failure when a binary built on Apple Silicon is deployed
to Intel venue Macs (MacBook Air 2018 fleet).
2026-05-20 17:10:56 -04:00
Scott Idem
a14c7c7a3f feat(display): add display_control CoreGraphics binary, replace displayplacer as primary path
Derived from OSIT MasterKey app (LegacyUtilities.m, Ian Kohl 2019).
Uses CGConfigureDisplayMirrorOfDisplay — native macOS API, no Homebrew dependency.
Handler now tries display_control first; falls back to displayplacer for missing binary
or per-device configStr overrides. Build the binary via scripts/build-display-control.sh
on a Mac (requires Xcode CLT only), then commit resources/bin/display_control.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 16:48:19 -04:00
Scott Idem
bab08cd8a7 fix(packaging): workaround yauzl/Node 26 hang + fix API bootstrap contract
Packaging was silently hanging forever because yauzl 2.10.0 read streams
emit no data events under Node 26, causing extract-zip to block indefinitely
inside @electron/packager 20. Fix: postinstall script patches
@electron/packager/dist/unzip.js to use bsdtar (libarchive) instead.
bsdtar was chosen over 7z because 7z refuses chained symlinks in macOS
.app framework bundles. Both package:linux and package:mac now produce
correct output.

Also corrects the V3 API bootstrap contract in api_client.ts:
- SearchQuery body was wrapped in an extra {search_query: ...} layer — removed
- x-no-account-id header standardised to 'bypass'
- Redundant x-no-account-id removed from file download headers
- Smoke test rewritten to validate the real two-step bootstrap path

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 16:48:15 -04:00