Commit Graph
401 Commits
Author SHA1 Message Date
brennanb2025 a0de430397 Preserve terminal scrollback when restoring a hidden alternate-screen pane
On Windows, an alternate-screen TUI pane (Claude Code) could lose scroll-up
after being hidden (tab/worktree switch or app backgrounded) and shown again.

Root cause: on hidden->visible restore, applyMainBufferSnapshot
unconditionally wrote a destructive clear (\x1b[2J\x1b[3J\x1b[H) before
replaying the snapshot, wiping xterm's scrollback. The attach/reattach path
already guards this same clear behind !isAlternateScreen (pty-transport.ts);
the snapshot path did not.

Thread an alternateScreen flag from the backend headless serialization
through the pty:getMainBufferSnapshot IPC + preload types into
applyMainBufferSnapshot, and skip the destructive clear when restoring an
alternate-screen buffer. Add a regression test asserting the clear is NOT
emitted for an alt-screen restore (and the existing normal-buffer test still
asserts it IS).

Fixes #5723
2026-06-27 21:51:07 -07:00
Brennan BensonandOrca bf4ed350ae Materialize mobile-only pending session terminals (#6465)
Co-authored-by: Orca <help@stably.ai>
2026-06-26 20:16:52 -07:00
Brennan BensonandOrca 5fd9f0c62c Prevent mobile worktree selection from focusing desktop (#6461)
Co-authored-by: Orca <help@stably.ai>
2026-06-26 19:34:33 -07:00
Jinwoo HongandOrca 4904ffda9a Fix Remote Host downloads and agent status parity (#6436)
* Fix remote host downloads and agent status parity

Co-authored-by: Orca <help@stably.ai>

* Address remote download review comments

Co-authored-by: Orca <help@stably.ai>

* Avoid inefficient SSH chunk fallback

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Orca <help@stably.ai>
2026-06-26 14:28:16 -07:00
Brennan BensonandNeil d188e7d2f6 Recover Windows worktree deletes from long paths (#6433)
Co-authored-by: Neil <neil@stably.ai>
2026-06-26 13:28:10 -07:00
Brennan BensonandOrca 4a98b11e77 Import linked worktrees under one project (#6441)
Co-authored-by: Orca <help@stably.ai>
2026-06-26 13:26:58 -07:00
Brennan Benson 996ab4a224 Preserve terminal output after hidden recovery fallback (#6435) 2026-06-26 12:39:28 -07:00
Brennan Benson af52e418ea Keep sleeping agent panes resumable in place (#6411) 2026-06-26 12:10:08 -07:00
fe53387747 Fix automation run terminal targeting (#6374)
* fix(automations): track exact run terminal targets

Record terminal pane keys and PTY ids on automation dispatches, persist them across run updates, and propagate them through runtime launch results.

Use the recorded pane and PTY for completion detection, session reuse, prompt submission, and View run navigation so split-pane tabs reopen the actual run terminal.

Keep legacy runs compatible by falling back to workspace resume when exact terminal identity is absent.

* chore: address automation targeting review cleanup

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
2026-06-25 20:51:34 -07:00
a12566b962 fix(onboarding): stop wrong-host Open as Folder fallback (#6393)
* fix(onboarding): stop wrong-host folder fallback (#6367)

* test(repos): isolate runtime fallback proofs

* test(repos): cover runtime status RPC failures

* test(repos): drop obsolete max-lines suppression

* Prevent runtime path probes from leaking project groups

* fix(onboarding): gate runtime folder fallback status

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
2026-06-25 18:42:46 -07:00
Damir Vandic e21ddd378c Fix pending remote terminal tab creation (#6353)
* Adopt pending terminal tab reveals

* Materialize pending remote terminal tabs

Wait for mobile terminal creates to produce a ready PTY handle before resolving. If the renderer only publishes a pending tab shell, materialize a headless PTY into the same tab/leaf identity so later renderer focus adopts it instead of duplicating the tab.

Add a pane-key spawn reservation shared by runtime materialization and renderer pty:spawn so focus racing fallback reuses the winning PTY, including when SSH env stripping removes ORCA_PANE_KEY. Cover the pending-surface fallback and both overlapping spawn race directions with regression tests.

* Settle pane spawn reservation on any post-spawn failure

The per-paneKey spawn reservation was only settled on spawn error, persist
error, or final resolve. A throw in the post-spawn region (seedHeadlessTerminal,
registerPty, rememberPaneKeyForPty, track) rejected the IPC promise but left the
reservation in paneSpawnReservationsByPaneKey forever, so every later spawn for
that pane awaited a promise that never settled and hung.

Wrap each post-reservation body (both spawn paths) in a catch-all that rejects
the reservation with the real error and rethrows; reject is a no-op once
resolved. Remove the now-redundant inner reject calls. Add regression tests for
both paths.

* Tear down runtime-owned headless tabs on mobile session close

The renderer-attached branch of closeMobileSessionTab closed the renderer's
pane but never pruned mobileSessionTabsByWorktree or dropped the persisted
binding. For runtime-owned headless terminals — serve/SSH materialized, or a
pending shell the renderer never adopted, all introduced by the pending-surface
materialize fallback — syncMobileSessionTabs then re-hydrates the closed tab
from the persisted session, resurrecting it with a live PTY. "Close others" on
a paired client showed closed remote tabs reappearing with their sessions still
running.

Add isRuntimeOwnedHeadlessMobileTab (serve/SSH-owned, or no live PTY and absent
from the renderer graph). When the whole parent of such a tab is closed, route
through closeHeadlessMobileTerminalTab to kill the PTY, remove the persisted
binding, and prune+emit, then best-effort notify the renderer so no adopted
pane is left dead. Genuinely renderer-owned tabs and exact split-leaf closes
keep the existing path. Cover the serve parent close, renderer-published vs
runtime-unadopted pending tabs, and the serve split-leaf case with regressions.

* Tear down only headless tabs the renderer never published on mobile close

The close-others teardown discriminator returned false for any resolved
non-serve/ssh PTY, so headless tabs carrying a daemon session id
(<worktreeId>@@<shortUuid>) that the host materialized but the renderer never
published leaked into the session snapshot and the client mirrored them
(confirmed live: host published 5 tabs for a worktree the renderer showed 1 for).

That id shape is ALSO minted for ordinary renderer-owned daemon-backed local
terminals, so it can't classify ownership by shape — the renderer graph
(this.tabs) does. Classify a tab as runtime-owned when it is serve/ssh (always,
they're preserved + re-hydrated) or when the renderer graph never published it
(a leaked/unadopted shell); delegate everything the renderer graph lists,
including ordinary @@ local terminals and pending tabs.

Regression tests: renderer-owned @@ tab is delegated (not de-persisted); leaked
@@ tab the renderer never published is torn down + de-persisted.
2026-06-25 14:36:35 -07:00
79d05110ed fix(orchestration): release dispatch lock when worker_done is sent via orchestration.send (#6317)
* fix(orchestration): release dispatch lock when worker_done is sent via orchestration.send (#6090)

* fix: preserve coordinator lifecycle accounting

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
2026-06-24 20:30:55 -07:00
Jinwoo HongandOrca 634a1b27e4 fix: group multi-host projects by git remote identity (#6309)
* test: reproduce multi-host legacy project split

Co-authored-by: Orca <help@stably.ai>

* fix: group multi-host projects by git remote identity

Co-authored-by: Orca <help@stably.ai>

* fix: tolerate lightweight runtime repo list handlers

Co-authored-by: Orca <help@stably.ai>

* fix: make git remote identity enrichment nonblocking

Co-authored-by: Orca <help@stably.ai>

* fix: use projected setups for sidebar grouping

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Orca <help@stably.ai>
2026-06-24 19:19:31 -07:00
0c0367ea88 feat(agents): native Xiaomi MiMo Code support (#6239)
* feat(agents): native Xiaomi MiMo Code support

Add mimo-code TUI agent (detect mimo, --prompt, --session resume).
Inject MIMOCODE_HOME overlay and /hook/mimo-code status plugin on mimo
launch when agent status hooks are enabled; restore via shell-ready
wrappers. Reuse OpenCode-family hook normalization in the listener.

SSH remote MiMo hook overlays are not included (local/daemon first).

Closes #6220

* fix(mimo): remirror overlay config idempotently

rmSync overlay config before mirror so a second mimo launch does not
hit EEXIST in mirrorEntry and fall back to the user MIMOCODE_HOME.

* review: harden mimo code support

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Doan Bac Tam <24356000+doanbactam@users.noreply.github.com>
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
2026-06-24 00:17:49 -07:00
Jinjing 93bf26296f Extract lifecycle message reconciliation to standalone module (#6226)
- Decouple heartbeat and worker_done logic from the main coordinator
  to allow re-use in the orchestration.check RPC method.
- Reconcile unread lifecycle messages during orchestration.check so that
  manual coordinators can authoritatively process completions and
  heartbeats even if they bypass the main coordinator loop.
- Add unit tests validating task completion, heartbeat recording, and
  safety checks against stale or unauthorized worker_done payloads.
2026-06-23 20:41:45 -07:00
Jinwoo HongandOrca 5d8617bc71 Fix mobile workspace parity (#6207)
Co-authored-by: Orca <help@stably.ai>
2026-06-23 17:07:28 -07:00
Brennan BensonandOrca a2fd8c11c2 Reduce source-control background load during refreshes (#6189)
Co-authored-by: Orca <help@stably.ai>
2026-06-23 15:06:38 -07:00
Brennan BensonandOrca 83f49818d3 Detect remote agents from shell PATH (#6157)
Co-authored-by: Orca <help@stably.ai>
2026-06-23 11:31:41 -07:00
65e2bd0557 Fix floating workspace terminal selector_not_found on a remote runtime (#5946)
* Fix floating workspace terminal selector_not_found on a remote runtime

resolveWorktreeSelector threw selector_not_found for the floating-terminal
sentinel id (global-floating-terminal) because it is a repo-less synthetic
session with no entry in the worktree catalog. A remote client paired to this
serve sends that sentinel, so the normal id: lookup failed and the floating
pane rendered black. Resolve the sentinel (bare and id:-prefixed) to a virtual
ResolvedWorktree rooted at the serve user's home so the PTY spawns in a real
existing dir; unknown id selectors still throw selector_not_found. Adds two
regression tests.

Rebased onto current main (was 75 commits stale); net delta unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Scope floating terminal selector to terminal launches

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
2026-06-22 13:33:37 -07:00
JinHyeok Jeong e253d46e72 Harden mobile session tab sync
Harden mobile session-tab snapshot reconciliation and terminal creation. Rejects stale mobile snapshots, tombstones locally closed tabs until the publisher catches up, rolls back half-created terminal tabs when their surface never appears, and scopes terminal-create idempotency by worktree.
2026-06-22 13:31:10 -07:00
Jinjing 36f8056446 Resolve and clear push targets for linked hosted reviews (#6092)
* Resolve push targets for linked hosted reviews

Automatically resolve and persist push targets for linked GitHub PRs
and GitLab MRs to align source control actions with the review branch.

- Add `ensureHostedReviewPushTarget` to hydrate missing push targets
- Implement GitLab MR push target resolution alongside GitHub PRs
- Block actions from fallback to unrelated upstreams while resolving
- Prevent duplicate concurrent API lookups with in-flight tracking

* Clear stale review push targets when unlinking or replacing reviews

- Ensure unlinking a hosted review or replacing it with another provider
  properly clears the previously associated push target, preventing pushes
  from being steered to outdated review heads.
- Encode explicit push target clears as null over JSON-RPC to bypass the
  automatic omission of undefined properties during transit, then map them
  back to undefined in the main runtime database.
- Add stricter validation to ensure pull request and merge request IDs are
  positive integers, ignoring invalid or dummy numbers like zero.
2026-06-22 11:15:09 -07:00
Brennan BensonandOrca fe8fe16c83 Preserve agent settings when sleeping sessions resume (#5916)
Co-authored-by: Orca <help@stably.ai>
2026-06-21 16:44:58 -07:00
Brennan BensonandOrca d517bb7250 Restore agent history after worktree renames (#6000)
Co-authored-by: Orca <help@stably.ai>
2026-06-21 15:48:33 -07:00
Jinwoo HongandOrca 32e6ab7655 Fix mobile workspace list parity (#6001)
Co-authored-by: Orca <help@stably.ai>
2026-06-21 15:11:55 -07:00
Jinjing 954fa0a65e Prevent auto-reloading diff views when status area shifts (#5951)
* Avoid auto-reloading single-file diff tabs if their status row has
  moved to a different area (e.g. from unstaged to staged).
* Prevent auto-reloading combined uncommitted diffs when they are
  backed by an uncommitted entries snapshot.
* This preserves the open tab's original diff context as staging and
  commit status changes, preventing useful context from being lost.
2026-06-20 18:52:04 -07:00
Jinjing 97dc6d63e3 Accept merged fallback PRs during branch lookup (#5908)
Ensure that when a visible fallback PR has been merged (e.g., outside
Orca with a deleted head branch), it is still accepted and refreshed by
branch lookup instead of being discarded as an implicit merged PR.

* Add `acceptMergedFallbackPR` option to GitHub branch lookups
* Enable this option during manual and background refreshes of fallback PRs
* Plumb the new option through preload APIs, IPC handlers, and RPC protocols
2026-06-20 03:30:18 -07:00
Jinjing 1419193bea Add explicit task title and display name to orchestration tasks (#5901)
Introduce optional `task-title` and `display-name` parameters for orchestration tasks, persisting them in the database and propagating them through the RPC and Orca runtime.

This allows the CLI, dashboard, activity page, and sidebar to display concise, user-friendly labels for dispatched worker agents instead of verbose, raw system preambles.
2026-06-20 03:29:21 -07:00
JinjingandOrca 553d47bf4f Fix Windows workspace deletion runtime resolution (#5888)
* Add test file for workspace delete bug

Co-authored-by: Orca <help@stably.ai>

* Fix Windows workspace deletion runtime resolution

Resolve project-created workspace deletion through the selected project runtime so Windows paths are listed strictly without falsely tripping the unregistered worktree guard.

Design doc: docs/delete-workspace-windows-unregistered.md

---------

Co-authored-by: Orca <help@stably.ai>
2026-06-20 03:16:29 -07:00
Jinjing dd8c78c129 Revert "Show worktree delete icon on sidebar row hover" (#5874)
This reverts commit ce253354fe.
2026-06-19 20:48:57 -07:00
Brennan BensonandOrca 8264cd2416 Send notes to working agents (#5748)
Co-authored-by: Orca <help@stably.ai>
2026-06-19 20:30:51 -07:00
Brennan Benson d6cb38b45a Keep Codex terminal transcripts readable during redraws (#5858) 2026-06-19 19:49:54 -07:00
Trevin Chow ce253354fe Show worktree delete icon on sidebar row hover
Reveals the standard workspace delete action from sidebar rows on hover or keyboard focus, while keeping primary/main worktrees protected.

Maintainer follow-up:
- prevent hidden delete buttons from receiving pointer events
- merge latest main and resolve localization conflict

Validated with CI PR Checks plus local typecheck, lint, Vitest, and Electron hover/focus/delete-confirmation checks.
2026-06-19 17:43:12 -07:00
Jinwoo Hong 972078f2c4 Fix paste ownership, input bounds, and IPC validation
Supersedes #5745, #5746, and #5747.
2026-06-19 17:14:55 -07:00
Jinwoo HongandOrca 8ef8596ba1 Fix remote browser/editor tab props persistence (#5847)
Co-authored-by: Orca <help@stably.ai>
2026-06-19 17:01:10 -07:00
Jinwoo HongandOrca 3afed388fc fix: expose terminal visual layout and copyable handles (#5845)
Co-authored-by: Orca <help@stably.ai>
2026-06-19 15:42:13 -07:00
Brennan BensonandOrca 1a7c579df0 feat(worktree): assign parent worktrees from sidebar (#4908)
Co-authored-by: Orca <help@stably.ai>
2026-06-19 14:05:32 -07:00
NeilandOrca ef45305aa4 fix(runtime): evict ClaudeAgentTeams team on natural leader PTY exit (#5823)
createLaunchEnv adds a team (with nested panes map) per agent-team leader,
keyed by a fresh teamId. The only eviction (removeTeamForLeaderHandle) ran
solely from closeTerminal (explicit user-close). The natural-exit paths
onPtyExit and dropDisconnectedPtyRecord tore down every other per-pty map
but never the team, so a leader exiting on its own leaked the team + panes
map permanently.

Evict via the leader handle (handleByPtyId.get(ptyId)) in both onPtyExit
and dropDisconnectedPtyRecord, mirroring the closeTerminal call. Add
getActiveTeamCount for assertability.

Regression test drives the real onPtyExit/dropDisconnectedPtyRecord: fails
before the fix (teams leak) and passes after.

Co-authored-by: Orca <help@stably.ai>
2026-06-19 12:34:53 -07:00
Jinjing bc2f5145da Allow deleting downloaded speech models on desktop and mobile (#5794)
* Allow deleting downloaded speech models on desktop and mobile

Implement safe deletion of local speech models across desktop and
mobile platforms.

- Add a shared helper to coordinate STT service teardown, file deletion,
  and voice settings cleanup.
- Prevent deleting speech models that are currently in use or starting.
- Update desktop and mobile settings UIs to expose the delete action.

* Track multiple pending model deletions and update action disabling

- Replace the single pending delete ID string state with a Set of IDs on desktop settings to track multiple concurrently deleting models.
- Switch the desktop delete action to use the standard themed Button component.
- Disable all row interactions on the mobile voice model list when any model action is busy.
- Add unit test coverage verifying that individual row delete button disabled states behave correctly.
2026-06-19 12:31:11 -07:00
Jinwoo HongandOrca 692d8d0124 Use platform Orca CLI command for Agent Teams (#5773)
Co-authored-by: Orca <help@stably.ai>
2026-06-18 23:18:33 -07:00
WolfieandWolfgang Schoenberger 1d5efeb976 fix: support worktree name selectors (#5696)
Co-authored-by: Wolfgang Schoenberger <221313372+wolfiesch@users.noreply.github.com>
2026-06-18 23:10:21 -07:00
Jinwoo HongandOrca 6d6af7af1a Support browser panes on headless remote Orca servers (#5412)
Co-authored-by: Orca <help@stably.ai>
2026-06-18 22:50:11 -07:00
Brennan BensonandOrca 8c4e99ed2f Keep completed-agent hibernation pane-scoped (#5749)
Co-authored-by: Orca <help@stably.ai>
2026-06-18 21:37:15 -07:00
Brennan Benson cfc003452c Hide workspace parent flag from worktree create CLI (#5743) 2026-06-18 17:53:19 -07:00
Carlos Baraza d46349ce82 fix: improve mobile link modifier handling (#5597) 2026-06-18 16:48:43 -07:00
Brennan Benson a34801934d Keep automation off by default in compact workspace cards (#5740) 2026-06-18 16:28:37 -07:00
Brennan Benson afde3a3741 Honor configured SSH for remote-base worktrees (#5739) 2026-06-18 15:52:55 -07:00
6d0b5734e7 fix: match slashed branch names in worktree branch search (#5687)
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: brennanb2025 <brennankbenson@gmail.com>
2026-06-18 14:57:10 -07:00
Brennan BensonandOrca 674639205c Show and Filter Automation-Created Workspaces (#5697)
Co-authored-by: Orca <help@stably.ai>
2026-06-18 13:05:57 -07:00
Brennan BensonandOrca bc0b1e28bd Improve Codex startup prompt reliability (#5686)
Co-authored-by: Orca <help@stably.ai>
2026-06-18 11:39:40 -07:00
Jinwoo HongandOrca 06d674b35d Fix mobile folder workspace visibility (#5679)
Co-authored-by: Orca <help@stably.ai>
2026-06-17 23:18:34 -07:00