Commit Graph
4918 Commits
Author SHA1 Message Date
NeilandOrca 9fc61aa7ca Bound hot-terminal full-snapshot checkpoints with a per-session cooldown (#7088)
* Bound hot-terminal full-snapshot checkpoints with a per-session cooldown

A streaming session (build logs, yes) re-triggered a full multi-MB
checkpoint.json tmp+rename on every 5s tick via pending-buffer overflow
or the 5MB log cap - hundreds of MB/min of disk writes from one busy
terminal, and the dominant Orca-generated filesystem event volume.

Cap/overflow-triggered full snapshots now honor a 45s per-session
cooldown: while cooling down the session's checkpoint work is deferred
entirely (no takePendingOutput RPC, no increment appends - appending
past a dropped range would leave a hole in the log, so the on-disk
state stays a consistent, merely stale, prefix) and the session stays
dirty so the timer retries until the cooldown expires. Final/teardown
checkpoints (quit, sleep, clean disconnect) bypass the cooldown, and a
session's first-ever snapshot is never delayed, so cold-restore
fidelity changes only for hot sessions mid-stream: at most 45s of
tail scrollback staleness after a hard crash.

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

* Harden checkpoint cooldown against crash-boundary and reuse edges

From adversarial review of the cooldown commit:
- Warm reattach by an adapter that was not already managing the session
  now forces a full-snapshot re-anchor: the previous adapter may have
  drained daemon records it never persisted (deferred hot-session tick),
  and appending past that unknown drain point would put a seq gap in the
  log, which the restore reader rejects wholesale. This also closes the
  pre-existing (previously ~ms-wide) drain-vs-persist crash window.
- Cold-restore re-anchor clears any cooldown inherited from the
  pre-crash generation (daemon respawn within one adapter), so the
  revived session's first snapshot is never deferred.
- Exit-event routing clears lastFullCheckpointAt (reused ptyIds must not
  inherit a dead session's cooldown); fanoutSyntheticExits now clears
  sessionsNeedingFullCheckpoint for consistency.
- Backward wall-clock jumps count as expired instead of extending the
  deferral.

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

---------

Co-authored-by: Orca <help@stably.ai>
2026-07-02 01:33:51 -07:00
NeilandOrca b07ea4a1a5 Push-refresh git status on repo metadata changes and shell command completion (#7086)
Branch switches and commits made inside terminals now surface through push
signals instead of waiting for the 30s terminal-only fallback poll:

- The git-common watch now also covers the primary checkout's HEAD,
  packed-refs, and index (a few stat calls per tick; no new native watchers).
- worktrees:changed events nudge the active worktree's coalesced git status
  runner (visibility-gated, 3s floor).
- OSC 133;D command completion dispatches a window event that nudges the
  same runner for the active worktree.

Co-authored-by: Orca <help@stably.ai>
2026-07-02 01:32:05 -07:00
Neil 6dafe8c870 Fix worktree sort crash when display name is missing (#6993) 2026-07-02 01:06:10 -07:00
Jinjing 151c567074 Promote stale agent targets when live titles prove they are sendable (#7043)
* Promote stale agent targets when live titles prove they are sendable

- Extract centralized `detectAgentSendTitleStatus` helper to determine if an agent is ready or needs permission based on pane and tab titles.
- Prevent stale hook-backed status rows from disabling active targets when fresh live titles and PTYs prove they are sendable.
- Fallback to the tab's launch agent type when status-backed targets have unknown agent types.
- Add comprehensive test coverage for promoting stale pane targets and preserving permission blocks.

* Prevent split panes from borrowing stale tab titles

Introduce `resolveRuntimePaneTitleLeafResolution` to track whether a
tab has any reported runtime pane titles. Use this to ensure that a split
pane does not fall back to the overall tab title when another pane in the
same tab already has active title evidence, avoiding stale target status.

* Resolve single pane title if tab layout lacks root

When a tab layout does not have a root, we can only attribute a single
reported pane title. This ensures that any pane title still suppresses
the stale tab-title fallback.
2026-07-02 00:52:01 -07:00
Jinwoo HongandOrca c29bf6f3da Raise WebGL terminal context budget and recover from context loss (#7064)
Co-authored-by: Orca <help@stably.ai>
2026-07-01 23:43:32 -07:00
Neil 171d32d8f7 Reduce idle git status polling (#7069) 2026-07-01 23:09:23 -07:00
Neil 7c66f37632 Fix AppImage env leakage into Linux terminal shells (#7076) 2026-07-01 23:09:20 -07:00
NeilandOrca 7f1e280436 Cut fseventsd load: fix macOS exclusion cap, drop wide always-on FSEvents streams (#7068)
* Cut fseventsd load: fix macOS exclusion cap, drop wide always-on FSEvents streams

- @parcel/watcher maps plain-path ignores to FSEventStreamSetExclusionPaths,
  but macOS caps exclusions at 8 per stream and fails closed. Orca passed 9,
  silently disabling ALL daemon-side exclusions: fseventsd delivered every
  node_modules/.git event to each per-worktree explorer stream (measured 16x
  client CPU). Cap plain paths at 8 (extras demoted to userspace globs) via a
  shared filesystem-watcher-ignore module, also unifying the runtime
  file-watcher host list so identical roots share one native stream.
- worktree-base-directory-watcher subscribed recursive FSEvents streams over
  every repo's ENTIRE workspace root (all worktrees) and whole common .git
  (objects included) with glob-only ignores (zero daemon-side exclusion),
  just to observe a few shallow paths. Replace with a 2s readdir/stat poller
  (zero fseventsd clients, measured 70x less delivery CPU); SSH targets keep
  provider.watch unchanged.
- serve-sim state watcher held an app-lifetime fs.watch on $TMPDIR (the
  noisiest dir on the system); its existing 250ms existence poll makes the
  parent watch redundant, so drop it.

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

* Eliminate base-poller idle cost: mtime-gated ticks + narrow macOS worktree-metadata stream

- base targets: tick is now one stat of each gate dir (root + nested
  containers); the readdir + marker fan-out runs only when a gate dir
  changed, with a 30s ungated backstop and a bounded pending-marker
  recheck list. Idle tick 600us -> 1.1us at 146 worktrees.
- git-common targets on macOS: replace the 2s entry sweep with one narrow
  native stream on <common>/.git/worktrees (tiny, rare-churn tree): zero
  idle syscalls and external worktree add/remove/HEAD detection back to
  sub-second. Re-arms via existence poll across git worktree prune
  deleting/recreating the dir. Win/Linux keep the listing poll (no
  fseventsd there; a Windows dir handle could block prune).
- split git-common logic into worktree-git-common-watch.ts (max-lines).

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

---------

Co-authored-by: Orca <help@stably.ai>
2026-07-01 23:04:13 -07:00
Brennan Benson 7d3944c8ed Revert "Prevent stale terminal pixels on tab reveal" (#7073) 2026-07-01 22:51:46 -07:00
Brennan BensonandOrca 347f44485e Prevent stale terminal pixels on tab reveal (#7058)
Co-authored-by: Orca <help@stably.ai>
2026-07-01 22:14:06 -07:00
4dbc9f3817 feat(ssh): add ControlMaster multiplexing for system SSH transport (#6922)
* feat(ssh): add ControlMaster multiplexing for system SSH transport

System SSH transport spawns a new OpenSSH process per exec command
(platform detect, relay install check, node resolution, relay launch,
socket probe). Each process pays the full SSH handshake cost — ~9s on
Uber devpods — making a typical relay connect take 54s+ and reliably
exceeding the 15s startup reconnect budget.

Add SSH ControlMaster multiplexing via a per-target socket in
$TMPDIR/orca-ssh-ctl/<hash>.sock. The first command establishes the
master; subsequent commands reuse it at ~100ms per exec instead of ~9s.
ControlPersist=300 keeps the master alive after commands exit so rapid
reconnects (e.g. on tab focus) also benefit. Windows is excluded since
OpenSSH's ControlMaster support there is limited.

* fix(ssh): address ControlMaster key collision and directory permission risks

- Use target.id in the socket key so distinct SSH targets can never
  collide even when configHost/port/user happen to match
- Switch from SHA1 to SHA256 and extend hash slice from 12 to 16 chars
- Stat the control-socket directory after mkdirSync to reject pre-existing
  dirs that are symlinks, foreign-owned, or have group/other write bits
  (mkdirSync mode is ignored on pre-existing dirs)
- Update two tests that used exact spawn-arg arrays; replace with
  ordering assertions (forward flags before --) that stay correct
  regardless of which extra ControlMaster options are injected

* fix(ssh): bind ControlPath identity to route and reject symlinked ctl dir

Fold proxyCommand/jumpHost/identity fields into the ControlPath hash so a
target whose route is edited no longer reuses a still-alive master built on
the old route. Switch the control-socket dir check from statSync to lstatSync
so a planted symlink fails the directory validation outright.

* test(ssh): drop tautological argv re-assertion in spawn checks

The toHaveBeenCalledWith re-passed the args array extracted from the same
mock call, making that argument position always pass. argv content is
already verified by the index-ordering assertions above; use expect.any(Array)
so the spawn check only claims what it actually verifies (binary path, stdio).

* fix(ssh): harden system ssh connection reuse

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

* test(ssh): isolate control socket runtime dir

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

---------

Co-authored-by: Test <test@example.com>
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
2026-07-01 21:29:48 -07:00
Jinwoo HongandOrca f8c1f0fdf8 Fix delayed TUI mouse wheel reports (#7060)
Co-authored-by: Orca <help@stably.ai>
2026-07-01 19:54:53 -07:00
Neil d535cb569a Show collapse affordance on status sidebar headers (#7051) 2026-07-01 19:43:56 -07:00
Brennan BensonandOrca e0de46ffc8 Prevent hidden terminal TUI overlap (#7054)
Co-authored-by: Orca <help@stably.ai>
2026-07-01 16:10:50 -07:00
91e7e1d91c fix: detect valid repos when git rev-parse can't confirm (#6173)
* fix: detect valid repos when git rev-parse can't confirm

isGitRepo() has depended entirely on a successful `git rev-parse`
since 18ed7b27d, with catch blocks that collapse every failure into
"not a git repository". When that subprocess fails for a reason
unrelated to repo-ness — a transient spawn / git-shim hiccup in the
packaged app, main-process resource pressure, or a config-level error —
a real repository is silently downgraded to a plain folder. The folder
scanner already tolerates this via a `.git` marker, so the scan reports
"git_repo" but the subsequent addRepo throws, producing the spurious
"Open as Folder" prompt for a valid repo.

Keep `git rev-parse` as the authoritative positive signal, but on any
non-positive result fall back to a validated `.git` marker instead of
returning false: `.git` dir must contain HEAD, a `.git` file must point
at a gitdir, and bare roots need HEAD + objects/ + refs/. A garbage
`.git` file and an empty `.git/` are still rejected, preserving the
validation 18ed7b27d added. Logs a warning when recovery via the marker
happens so the underlying probe failure stays visible.

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

* fix: address review feedback on repo detection

- isGitRepo: warn at most once per session when recovering a repo via
  the .git marker, so a broken-git scan can't flood main-process logs.
- repo-detection test: delete PATH instead of assigning "undefined" when
  it was originally unset, avoiding a corrupted PATH for later tests.

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

* fix: harden git repo marker fallback

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

---------

Co-authored-by: Omar Shahine <10343873+omarshahine@users.noreply.github.com>
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-07-01 15:10:35 -07:00
Jinwoo HongandOrca dc8161353e Fix Resource Manager session polling lag (#7050)
Co-authored-by: Orca <help@stably.ai>
2026-07-01 15:06:31 -07:00
Jinwoo HongandOrca 8afa84af82 Fix terminal switch input lag from daemon session listing (#7002)
Co-authored-by: Orca <help@stably.ai>
2026-07-01 13:19:50 -07:00
Eddie JaoudeandJinjing e0a7f0eadd fix: reordered default columns in kanban board (#6934)
* fix: reordered default columns in kanban board

* Introduce dedicated flag to repair reversed default workspace statuses

- Add `_workspaceStatusesReorderedDefaultRepaired` to decouple the
  one-shot repair from the initial status order migration.
- Ensure the repair runs for users who saved the reversed default
  payload (with "Done" on the left) during a short-lived broken build.
- Support both "Completed" and "Done" labels when identifying default
  status shapes to migrate or repair.

---------

Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>
2026-07-01 13:17:52 -07:00
Jinjing ff44d36c7e Harden divider resize cancellation (#7039) 2026-07-01 12:32:35 -07:00
Jinjing 0dfd56af30 Fix terminal pane drag cleanup (#7014)
* Fix terminal pane drag cleanup

* Harden terminal divider cancellation
2026-07-01 03:32:52 -07:00
Jinjing 7a4ec5c671 Open file links from native chat messages (#6998)
* Resolve and open file links from native chat messages

- Add `onLinkClick` and `allowFileUriLinks` props to `CommentMarkdown`
  to support intercepting links and enabling file URI navigation.
- Resolve relative paths, line/column suffixes, and file URIs from
  native chat messages against the active worktree context.
- Handle clicked links in `NativeChatView` by opening the target file in
  the editor (or system default via Shift+click).
- Refactor markdown renderers and parse utilities into standalone,
  reusable modules to share between terminal and chat components.

* Fix file link resolution and click event propagation

Ensure file links open correctly by falling back to repo-scoped
worktrees if a known worktree lacks a path. Also, stop propagation
on markdown anchor clicks to prevent triggering outer card click
handlers.
2026-07-01 03:03:18 -07:00
Jinjing 252e5f6af5 Avoid clearing terminal scrollback for metadata-only eager replays (#7012)
Previously, the terminal pane would always perform a clear screen on PTY
attach before replaying the eager buffer. This cleared restored scrollback
unconditionally, even when there was no active terminal content to replay
(e.g., when the buffer was empty or only contained window titles and
agent status metadata).

Now, eager buffers are parsed to determine if they contain display-affecting
content. The attach-time clear is skipped for empty or metadata-only
replays, preserving the restored scrollback history. Trailing partial
control sequences are also trimmed to prevent swallowing live terminal output.
2026-07-01 02:57:14 -07:00
Jinjing 16a14ec0cf Add terminal SSH reconnect overlay (#7009)
* Add terminal SSH reconnect overlay

* Publish returned SSH connection state to store on reconnect

Write the returned connection state immediately into the renderer store
to ensure the deferred terminal reattach can resume without waiting for
the state-change IPC to land.

Also translate SSH reconnect overlay strings in the non-English locales
and update the overlay visibility condition to use isVisible.

* Delete SSH terminal reconnect empty pane design document

Remove the design document detailing the SSH terminal reconnect empty pane
overlay problem, design, and data flow, as it is no longer needed.
2026-07-01 02:53:49 -07:00
Brennan BensonandNeil 1cc41ba83b Fix Windows ConPTY agent keyboard reset (#6999)
Co-authored-by: Neil <neil@stably.ai>
2026-07-01 01:38:28 -07:00
Jinjing 07bbd44769 Update Spanish, Japanese, Korean, and Chinese translations (#6997)
Translate newly added features, including per-workspace environments,
native chat, agent runtime options, and emulator SDK settings, to complete
localization coverage across ES, JA, KO, and ZH.
2026-07-01 00:48:31 -07:00
Jinwoo HongandOrca 8fa2c4a203 Fix terminal resume width flicker (#6989)
Co-authored-by: Orca <help@stably.ai>
2026-06-30 22:27:08 -07:00
Jinwoo HongandOrca 8a805e256d Fix SSH relay lost backoff stabilization (#6979)
Co-authored-by: Orca <help@stably.ai>
2026-06-30 19:45:24 -07:00
Jinwoo Hong 582baf533e Fix WSL OMP live status env injection (#6974) 2026-06-30 22:14:54 -04:00
Jinwoo Hong 3eb5b247bb Fix WSL UI project branch discovery (#6973) 2026-06-30 21:51:19 -04:00
cbd06a7671 feat(tab-bar): add shortcut to open commands for active tab group (#6325)
* Add keyboard shortcut to toggle the Quick Commands menu

- New `tab.openQuickCommandsMenu` keybinding action (no default binding)
- TabBarQuickCommandsMenu listens for the binding and toggles open/closed
- Scoped to the active tab group naturally since the component only mounts when its group is focused

* Show keyboard shortcut in Quick Commands menu trigger tooltip

* Add tests

* expand tests

* Expand keyboard toggle to call handleOpenChange and skip repeated keys

- Replace `setMenuOpen` toggle with `handleOpenChange(!menuOpen)` so closing
  via keyboard runs the same reset logic (query, focus frame, value override)
- Guard against key-repeat events to prevent rapid toggling on held key
- Wrap `handleOpenChange` in `useCallback` so it's stable enough to include
  in the `useEffect` dependency array without causing spurious re-registrations
- Update tests to reflect that re-running the effect between presses is
  required for the close path, and add a repeat-event test

* Add docstring to withShortcutHint func

* review: harden quick commands menu shortcut

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
2026-06-30 18:21:37 -07:00
Brennan BensonandOrca 764e2fe61f Keep sidebar agent rows stable during status updates (#6961)
Co-authored-by: Orca <help@stably.ai>
2026-06-30 17:29:03 -07:00
Jinjing 79828fb1eb Update Android APK links to 0.0.18
Point README and mobile APK links at the published mobile-android-v0.0.18 release.
2026-06-30 17:06:39 -07:00
Jinwoo HongandOrca 0ce726bb3b Fix startup draft paste race for Codex (#6936)
Co-authored-by: Orca <help@stably.ai>
2026-06-30 16:40:58 -07:00
Jinwoo HongandOrca f9d8b532f1 Fix stale terminal grid drift (#6959)
Co-authored-by: Orca <help@stably.ai>
2026-06-30 16:29:51 -07:00
Jinwoo HongandOrca 6b66bda634 Fix stuck remote terminal mirror polling (#6951)
Co-authored-by: Orca <help@stably.ai>
2026-06-30 16:21:30 -07:00
Jinwoo HongandOrca 782eb12688 Make remote SSH terminals persistent by default (#6955)
Co-authored-by: Orca <help@stably.ai>
2026-06-30 16:16:10 -07:00
Neil b9f65576d9 Fix Monaco Delayer cancellation during renderer teardown
Handle expected Monaco Delayer cancellation during renderer cleanup so ignored trigger promises do not surface as unhandled rejections. Adds regression coverage for the DisposableStore teardown path from the crash report.
2026-06-30 16:05:01 -07:00
Brennan BensonandOrca 945b270454 Recover terminal rendering after risky output (#6949)
Co-authored-by: Orca <help@stably.ai>
2026-06-30 15:51:45 -07:00
Brennan Benson bcb381e6ec Prevent repeated automatic agent resume tabs (#6945) 2026-06-30 15:30:29 -07:00
Jinwoo HongandOrca 1a3d561dec Fix Codex skill preview terminal artifacts (#6940)
Co-authored-by: Orca <help@stably.ai>
2026-06-30 15:29:12 -07:00
Brennan BensonandNeil 11cd231023 Fix pending worktree spinner alignment (#6948)
Co-authored-by: Neil <neil@stably.ai>
2026-06-30 15:17:23 -07:00
Jinwoo HongandOrca 547834d6d7 fix: route runtime GitHub PR actions (#6947)
Co-authored-by: Orca <help@stably.ai>
2026-06-30 15:10:00 -07:00
Brennan BensonandOrca 34fcf3af67 Keep terminal input wrapping aligned with pane width (#6939)
* Keep terminal PTY columns synced after visible resize

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

* Address terminal resize review feedback

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

---------

Co-authored-by: Orca <help@stably.ai>
2026-06-30 15:08:01 -07:00
Jinwoo HongandOrca 8a52bec8ff Fix remote runtime branch diffs (#6942)
Co-authored-by: Orca <help@stably.ai>
2026-06-30 14:56:17 -07:00
Jinwoo HongandOrca d7010353ca Move per-workspace environments to Experimental settings (#6926)
Co-authored-by: Orca <help@stably.ai>
2026-06-30 12:57:39 -07:00
Wolfie 62ab2d470e fix: keep floating tabs local with active runtime
Keep the synthetic floating workspace local while a remote runtime is active, including terminal/browser creation, activation, close, and remote snapshot handling.

Maintainer follow-ups:
- require worktreeId for runtime-session terminal create payloads
- add renderer-backed terminal create reply sender regression coverage
- merge current main and keep the WSL readDir breadcrumb test aligned with main's Windows-only handler coverage
2026-06-30 12:48:26 -07:00
Brennan BensonandOrca ebd81c7c88 Fix multi-second input lag after pressing Enter in Windows terminals (#6858)
Co-authored-by: Orca <help@stably.ai>
2026-06-30 11:40:04 -07:00
Jinwoo HongandOrca 39964149c8 Per-Workspace Environments (on-demand disposable runtimes) + Add Project remote host setup (#6320)
Co-authored-by: Orca <help@stably.ai>
2026-06-30 11:31:55 -07:00
Neil be3f30e2f8 Fix Windows CJK terminal repaint and ConPTY wrap markers
Fix native Windows CJK terminal repaint and ConPTY wrap metadata handling.\n\nNormalize filesystem realpath results before authorization so WSL UNC roots compare consistently in CI.
2026-06-30 03:50:30 -07:00
Brennan BensonandNeil 6cf52518e2 Fix explicit PowerShell 7 terminal selection on Windows (#6876)
* Fix explicit PowerShell 7 terminal selection

* Make WSL UNC readDir test portable

---------

Co-authored-by: Neil <neil@stably.ai>
2026-06-30 03:48:25 -07:00