Files
openhuman/scripts
d4f5b9a357 fix(overlay): fullscreen visibility, voice server reliability, and resize (#528) (#585)
* fix(overlay): shrink initial overlay window to match idle orb dimensions (#528)

The Tauri overlay window was 248×228 px while the idle orb renders at
50×50. The excess transparent area wasted compositing resources and
created an invisible click-absorbing region. Reduce to 60×60 to tightly
frame the idle orb with minimal padding.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(overlay): add native drag support with position persistence (#528)

- Mouse-down on the orb initiates Tauri startDragging() for native
  window drag
- Dragged position is saved to localStorage and survives mode changes
  (idle ↔ active) so the orb stays where the user placed it
- Double-click resets to the default bottom-right corner
- Cursor changes to grab/grabbing for affordance
- Skip default repositioning when a saved position exists

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(overlay): reclass NSWindow to NSPanel for fullscreen visibility (#528)

macOS fullscreen apps run in separate Spaces where standard NSWindow
cannot follow. Use object_setClass() to reclass the Tauri overlay
window from NSWindow to NSPanel at runtime, then configure it with
NonactivatingPanel style mask and Transient collection behavior —
matching the working Swift accessibility helper pattern.

Key configuration that makes this work:
- object_setClass(NSWindow → NSPanel) — in-place reclass, no reparenting
- NSWindowStyleMask::NonactivatingPanel — critical for panel behavior
- NSWindowCollectionBehavior::Transient (not Stationary) — follows Spaces
- Window level 25 (NSStatusWindowLevel) — floats above fullscreen apps
- setFloatingPanel(true), setHidesOnDeactivate(false)

Previous approaches that failed:
1. CGShieldingWindowLevel + CanJoinAllSpaces — hidden (NSWindow limitation)
2. Window level i32::MAX-17 + Stationary — hidden (Space membership issue)
3. CGS private API CGSSetWindowTags sticky bit — blocked on Sonoma
4. object_setClass WITHOUT NonactivatingPanel mask — hidden
5. Create new NSPanel + reparent webview — CRASH (Tao delegate panic)

Also removes unused objc2-core-graphics and objc2-foundation deps.

Ref: https://github.com/tauri-apps/tauri/issues/11488

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(sidecar): make dev signing non-fatal in stage script

codesign failures no longer call process.exit(), preventing
yarn tauri dev from hanging when the dev signing identity is
missing or the keychain rejects the request.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(voice): prevent race condition and fix restart after stop

- Atomically transition Stopped → Idle at start of run() to prevent
  duplicate run() calls during slow globe listener compilation
- Wrap CancellationToken in Mutex so run() creates a fresh token on
  each start — a cancelled token cannot be reused after stop()
- Reset state to Stopped if hotkey listener fails to start

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(voice): capture server errors from spawned run() task

Store errors from the background server.run() task via
set_last_error() so they surface in voice_server_status RPC
responses instead of being silently lost.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(overlay): enable programmatic resize and shrink idle dimensions

- Change overlay window from 60x60 to 50x50 to match idle orb size
- Remove minWidth/minHeight constraints that blocked dynamic resize
- Set resizable: true so setSize() calls work for bubble expansion

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(overlay): simplify window resize and bubble rendering

- Clear min/max constraints before resizing to avoid clamping
- Replace CSS transition-based bubble visibility with conditional
  mount for more reliable rendering when mode changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: fix fmt and remove unused bubbles variable

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(voice): enforce lock ordering to prevent race between run() and stop()

Acquire cancel lock before state lock in run() — same order as stop() —
so stop() cannot cancel a stale token between setting Idle and swapping.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(overlay): restore saved position on resize and format with prettier

Parse and apply saved drag coordinates instead of just using their
presence as a sentinel. Also reformats for prettier compliance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(sidecar): fail-fast on dev signing failure in CI environments

Add CI detection so signing failures abort the build in CI but remain
non-fatal for local development.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: fix cargo fmt on Tauri shell import

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 04:52:14 +05:30
..
2026-03-26 17:04:46 -07:00
2026-02-05 19:29:21 +05:30
2026-03-30 17:52:32 -07:00
2026-03-29 10:30:18 -07:00