When the desktop restored a terminal from mobile-fit, the notification
only reached the Electron renderer via IPC. Mobile WebSocket clients
were never informed, leaving the phone UI stuck in fitted mode.
Add fit-override change listeners to the runtime (parallel to existing
dataListeners) and emit fit-override-changed events through the
terminal.subscribe stream. The mobile session screen handles the event
by clearing fitted state and resubscribing for a fresh scrollback
snapshot at the restored desktop dimensions.
Co-authored-by: Orca <help@stably.ai>
- Add network interface selector so users can choose LAN or overlay
network (Tailscale, ZeroTier) address for QR code pairing
- Fall back to OS-assigned port when preferred port is in use
- Filter paired devices list to only show actually connected devices
- Poll device list after QR generation until phone connects
- Mark device lastSeenAt on first WebSocket connection
- Make CustomKeyModal toggle and button monochrome (remove blue accent)
- Make clear filters text and group options monochrome
Co-authored-by: Orca <help@stably.ai>
- Redesign home screen with "Welcome back" hero and usage stats cards
(agents spawned, agent time, PRs created) fetched via stats.summary RPC
- Add dedicated notifications settings page with monochrome push toggle
- Add troubleshooting page with diagnostics and common issues accordion
- Add splash screen with Orca logo using expo-splash-screen
- Fix pin sync: prioritize pinned/unread worktrees in compareWorktreePs
sort so they survive the 200-worktree truncation limit in worktree.ps
- Sync local pin state from server on each poll to reflect desktop pins
- Add isPinned support to worktree.set RPC handler
- Add stats.summary and notification subscription RPC methods
- Clean up debug logging from notification handlers
Co-authored-by: Orca <help@stably.ai>
Parallel e2e workers each launch an isolated Electron instance. All
instances were racing to bind the same fixed WebSocket port (6768),
causing EADDRINUSE crashes that manifested as "Target page, context
or browser has been closed" in every Playwright spec.
Pass port 0 when ORCA_E2E_USER_DATA_DIR is set so the OS assigns a
random available port per instance. The full WebSocket startup path
is still exercised, preserving coverage for future mobile pairing
e2e tests.
Co-authored-by: Orca <help@stably.ai>
- Add shouldRunSetupForCreate to hooks mock in orca-runtime tests
- Fix send() helper to use rest args, avoiding extra undefined in IPC calls
Co-authored-by: Orca <help@stably.ai>
The mobile-fit-override code calls safeFit with ManagedPane (from
getPanes()), but safeFit was typed to require ManagedPaneInternal.
Widen the parameter type since safeFit only needs fields on ManagedPane.
Co-authored-by: Orca <help@stably.ai>
Remove duplicate onPtyData call in pty.ts that caused every daemon-backed
PTY data event to be dispatched twice through dataListeners, doubling all
terminal output sent to mobile clients.
Also: clean up registerSubscriptionCleanup to evict stale listeners on
reconnect, add regression tests, fix CI lint/type errors, add mobile UX
improvements (worktree creation, settings, about screen).
Co-authored-by: Orca <help@stably.ai>
- Add missing randomUUID import in pty.ts
- Add getForegroundProcess to RuntimePtyController test mocks
- Add terminalFitOverrideChanged to RuntimeNotifier test mocks
- Fix vi.fn() type assertions in e2ee-integration tests
Co-authored-by: Orca <help@stably.ai>
- Extract send helper in attach-main-window-services to stay under max-lines
- Remove unused startup parameter in useIpcEvents
Co-authored-by: Orca <help@stably.ai>
Replace the disabled TLS cert pinning approach with application-layer
E2EE using tweetnacl (Curve25519 ECDH + XSalsa20-Poly1305). The
WebSocket stays plain ws:// but all RPC traffic is encrypted after
a one-round-trip handshake.
Desktop: generate persistent Curve25519 keypair, E2EE channel module
handles handshake state machine and transparent encrypt/decrypt.
Mobile: ephemeral keypair per connection for forward secrecy, expo-crypto
PRNG polyfill for Hermes compatibility.
Pairing schema updated from v1 (certFingerprint) to v2 (publicKeyB64).
Mock server updated with E2EE support. 24 tests covering crypto,
channel handshake, and integration.
Co-authored-by: Orca <help@stably.ai>
Add end-to-end mobile-fit override system that lets a phone client resize
a PTY to phone dimensions and restore to desktop dimensions on disconnect
or user request.
Key changes:
- Runtime: resizeForClient() manages override lifecycle with ownership,
clamping, and auto-restore on client disconnect. Always resizes PTY
directly on restore instead of relying on fragile renderer chain.
- RPC: terminal.resizeForClient method for mobile clients via WebSocket.
- Renderer: safeFit() respects active overrides, desktop banner with
Restore button, override change listener with rAF + fallback safety net.
- Mobile: fit-to-phone with CSS scale zoom, auto-fit only for terminals
created during the mobile session (not existing desktop terminals).
- Tests: 14 unit tests + 3 integration tests for override lifecycle.
Co-authored-by: Orca <help@stably.ai>
React Native's built-in WebSocket rejects self-signed TLS certs with no
way to pin by fingerprint. Use plain ws:// for now — per-device token
auth still prevents unauthorized access. TLS will be re-enabled once the
Expo native module for certificate pinning is built (Phase 1 checklist).
Co-authored-by: Orca <help@stably.ai>
The hand-rolled X.509 certificate generation produced malformed certs
that OpenSSL and Node's HTTPS server couldn't parse, silently preventing
the WebSocket transport from starting. Replace with openssl CLI call
which is available on all target platforms.
Also enable WebSocket transport by default so mobile clients can connect.
Co-authored-by: Orca <help@stably.ai>
Adds the Orca Mobile companion app (Expo SDK 55 / React Native 0.83) with:
- QR code pairing flow: scan orca://pair# URL, validate auth, save host profile
- WebSocket RPC client with auto-reconnect, exponential backoff, streaming support
- Three screens: host list, worktree list, terminal session with live output
- Mock WebSocket server for development without a running Orca desktop instance
- Desktop-side: TLS certificate management, device registry, mobile IPC handlers,
WebSocket transport layer, and pairing offer encode/decode with Zod validation
- Unit tests for WebSocket transport and pairing codec
Co-authored-by: Orca <help@stably.ai>
Electron <webview> elements run in a separate process, so clicks inside
them don't dispatch pointerdown on the renderer document. Radix
DropdownMenu relies on document pointerdown for outside-click detection
and therefore misses webview clicks, leaving the menu stuck open.
Listening for window blur catches the moment focus leaves the renderer
(including into a webview) and closes the menu.
Co-authored-by: Orca <help@stably.ai>
On close/quit (especially auto-updater relaunch via quitAndInstall),
Electron/OS emit resize/move/unmaximize while the window is torn down.
The debounced persistence was capturing those near-minimum bounds, so
the next launch came up at minWidth x minHeight.
- Freeze bounds persistence on window 'close' and app 'before-quit'
(updater strips the window 'close' listener before quitting, so
the app-level latch is needed as a second line of defense).
- Release the freeze on will-prevent-unload so aborted Cmd+Q keeps
saving bounds.
- On restore, discard saved bounds at/below the min dimensions to
recover users who already persisted corrupt bounds.
Co-authored-by: Orca <help@stably.ai>
Before removing a <webview> that currently owns focus, blur the active
element and refocus the window. Without this, macOS hands activation to
the previously-active app (e.g. Slack) because the focused webContents
is gone with no replacement, pulling the user out of Orca on worktree
delete.
Co-authored-by: Orca <help@stably.ai>
Audited and rebased PR 1138. Squashed to remove the original untrusted commit stack; hook execution now requires explicit UI trust or CLI --run-hooks opt-in.
* refactor(settings): move provider accounts into dedicated Agent Accounts pane
Extracts the Claude, Codex, Gemini, and OpenCode Go account/provider sections
out of General and into a new "Agent Accounts" sidebar section so related
controls live together and General stays focused on workspace/editor/updates.
Co-authored-by: Orca <help@stably.ai>
* feat(settings): show provider logos on Agent Accounts headings
Adds the Claude, Codex, Gemini, and OpenCode Go brand icons to each provider
section heading so the Agent Accounts pane reads as a provider list at a
glance instead of a wall of text.
Co-authored-by: Orca <help@stably.ai>
---------
Co-authored-by: Orca <help@stably.ai>
* perf(new-workspace): cache + dedupe Create-from work-item fetches
The Create-from tab was slow because it bypassed the renderer's existing
60s work-items cache: every sub-tab switch or modal re-open fired a fresh
`gh pr list --search is:pr is:open` / `gh issue list --search is:issue is:open`,
which also forces the main-side slow path (`listQueriedWorkItems`, uncached)
instead of the fast `listRecentWorkItems` path that wraps `gh api --cache 120s`.
- Route the PR + issue effects through the store's `fetchWorkItems` so
repeat opens / sub-tab toggles hit the 60s renderer cache + inflight
dedupe, and show cached data instantly while revalidating.
- Drop the `is:pr is:open` / `is:issue is:open` qualifiers when no query
is typed so the backend takes the fast cached recent-items path. Both
effects now share the same cache key on empty query, so PR ↔ Issue
switching issues a single underlying gh call.
- Add a small module-scoped 60s branches cache so `searchBaseRefs` isn't
reshelled out every time the Branches sub-tab becomes visible.
Measured on a cold orca repo: first render dropped from ~1,230 ms
(`is:pr` + `is:issue` sequential) to ~45 ms for the unqualified list,
with subsequent opens and sub-tab swaps serving from cache in <5 ms.
Co-authored-by: Orca <help@stably.ai>
* perf(new-workspace): finish create-from launch sooner
---------
Co-authored-by: Orca <help@stably.ai>