Commit Graph
6554 Commits
Author SHA1 Message Date
Brennan Benson c426bc3f74 retain teardown owner across stale rejection 2026-07-12 20:49:22 -07:00
Brennan Benson cb9b17af6e scope liveness cache mutation by provider 2026-07-12 20:45:22 -07:00
Brennan Benson b8cf8a095a fence teardown replay by provider owner 2026-07-12 20:37:11 -07:00
Brennan Benson 11cf303afc contain remote teardown retry rejection 2026-07-12 20:15:35 -07:00
Brennan Benson ad557821ca Merge latest main for PR review 2026-07-12 20:06:22 -07:00
Brennan Benson 84893eb666 align teardown tests with main ownership 2026-07-12 20:03:13 -07:00
Brennan Benson 0eb36dd1d9 restore focused PTY ownership diff 2026-07-12 19:59:19 -07:00
Brennan Benson 325c71d809 persist terminal teardown ownership across restarts 2026-07-12 19:55:49 -07:00
JinjingandOrca 8abe093e86 fix(agent-status): label Cursor by identity, not a bare "cursor" token (#8445)
* fix(agent-status): label Cursor by identity, not a bare "cursor" token

The worktree card, status bar, and mobile all derive an agent label from the
terminal title via getAgentLabel / resolveTerminalTitleAgentType. Both matched
Cursor with `titleHasAgentName(title, 'cursor')`, a whole-token match. But
`cursor` is ordinary editor vocabulary, so a Claude/Codex tab working on Orca's
own code (title like `⠋ preserve cursor visibility across replays`) got
mislabeled as Cursor. The generic braille-spinner Claude fallback even had a
`!lower.includes('cursor')` guard that then dropped the title to no label at
all.

Gate Cursor on its closed identity title set (`isCursorAgentTitle`) instead —
the same predicate @cursor orchestration routing uses. A real cursor-agent
terminal still resolves as Cursor across working/idle/permission; a non-Cursor
tab that merely mentions a text cursor reverts to its true agent. Relax the
braille guard to the same predicate so those titles land on Claude, not null.

Makes display consistent with routing (the follow-up flagged in #8436).

* refactor(agent-status): address review on Cursor identity labeling

- Trim the four Cursor `// Why:` comments in both parallel resolvers
  (agent-title-identity.ts, terminal-title-agent-type.ts) to AGENTS.md's
  one-to-two-line rule; use identical wording so future drift is visible.
- Add a direct isClaudeAgent assertion in terminal-title-agent-type.test.ts
  pinning that file's parallel copy (previously only covered transitively),
  plus Cursor Agent / "Cursor - action required" activity-facet assertions.

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

---------

Co-authored-by: Orca <help@stably.ai>
2026-07-12 19:43:43 -07:00
Brennan Benson 1cfc036840 retain cleanup intent across host lifecycle 2026-07-12 19:03:04 -07:00
Brennan Benson c8a74072a3 record host-scoped teardown evidence 2026-07-12 18:43:20 -07:00
Brennan Benson 19fce22584 Merge remote-tracking branch 'origin/main' into fix/renderer-crash-white-screen
# Conflicts:
#	config/reliability-gates.jsonc
2026-07-12 18:41:01 -07:00
Brennan Benson 8cf31f2298 scope teardown admissions by execution host 2026-07-12 18:39:05 -07:00
github-actions[bot] 4a76a1c894 release: v1.4.138-rc.4 v1.4.138-rc.4 2026-07-13 01:19:26 +00:00
Jinjing 433df4be3c fix(runtime): prevent file watcher SIGSEGV from crashing orca serve (#8370)
* Fix crash-isolated file watcher process pool for orca-serve SIGSEGV afte

Replace the worker-thread runtime file watcher with a forked, crash-isolated
@parcel/watcher child process pool so a native FSEvents fault can no longer
take down the main/serve process, and add bounded event batching, delivery
backpressure, and quarantine-based recovery for faulty watch roots.

* Fix crash-isolated file watcher teardown and shutdown leaks

- Fault harness could throw before mkdtemp/realpath completed, skipping
  cleanup; now tracks each temp path independently and races an async
  watcher-callback error so it can't escape the try/finally unhandled.
- In-process fallback swallowed unsubscribe failures via a bare rejection
  handler that could still throw; use .catch() instead.
- Watcher process entry's cancel-subscribe handler now reuses the async
  unsubscribe path when a crawl already finished, releasing the native
  handle instead of leaking it (blocks worktree unlock on Windows).
- Runtime watcher process pool exposed no real dispose(); shutdown now
  kills pooled children so they don't outlive the main process.

* Fix disposeSlot double-iteration bug in file watcher pool teardown

Remove the unnecessary array snapshot in dispose(): disposeSlot mutates
allSlots by deleting the slot being visited, and deleting the
in-progress element during Set iteration is well-defined, so the spread
copy was dead weight left over from prior debugging.

* Fix pending file watcher installs not aborting on unsubscribe

- Local/WSL watcher installs and SSH fs.watch setup now honor the
  in-flight AbortSignal, so the last unwatch cancels a slow native
  subscribe or remote setup instead of waiting for it to finish.
- Thread signal through IFilesystemProvider.watch and SSH-backed
  file explorer watches for the same early-cancel behavior.

* Fix crash-resubscribe hangs and SSH watch teardown races in file watcher

- Add a bounded deadline for post-crash resubscription crawls so one
  stuck root quarantines instead of pinning its whole shard forever.
- Report FSEvents overflow as recoverable so delivery continues after
  a dropped-events error instead of surfacing as terminal.
- Make WSL watcher abort errors real DOMException instances so
  AbortSignal-based cancellation checks recognize them.
- Rework SSH watch registration so ownership of the shared setup
  request (not just the first caller) decides teardown, preventing
  one caller's abort from cancelling another's shared watch and
  guaranteeing exactly one fs.unwatch per registration.
- Reformat reliability-gates.jsonc arrays and refresh WSL/SSH coverage
  entries and evidence runs to match the above.

* Add CI gate to run the file-watcher SIGSEGV fault harness under Electron

- The reliability gate and release workflows (mac, Linux) previously only
  exercised the crash-isolation harness under vanilla Node, which doesn't
  catch runtime differences in the actual Electron binary that ships to
  users.
- Adds an `ELECTRON_RUN_AS_NODE=1 pnpm exec electron ...` run of the same
  harness alongside the existing Node run, so #8212's SIGSEGV-survival
  contract is proven against both runtimes before packaging.

* Add CI gate blocking Linux/macOS release packaging on watcher fault reco

Adds a contract test asserting release-cut.yml and release-mac-build.yml
run the runtime-file-watcher-fault-harness after building and before
publishing artifacts, so a regression in watcher process fault recovery
fails release packaging instead of shipping silently.

* Fix use-after-clear crash in failAllWatcherSubscriptions

Snapshot the records map before iterating, since onTerminalError
hooks can dispose the supervisor and clear `records` mid-loop,
causing a crash. Also update the matching test to assert against
the shared buildParcelWatcherIgnoreOptions helper instead of a
loose arrayContaining match.

* Fix use-after-clear crash in failAllWatcherSubscriptions

Snapshot watcher records with Array.from instead of spread, since
spread syntax over an iterator that's mutated mid-loop by
onTerminalError hooks can produce inconsistent results.
2026-07-12 18:15:15 -07:00
Brennan BensonandBrennan Benson 00fc452c21 Split client-ui RPC schemas into client-ui-schemas.ts (#8446)
#7598 pushed client-ui.ts to 301 lines, one over the max-lines limit, which
breaks repo lint for every PR that merges current main (verify does not run
on main pushes). Follow the existing browser-schemas.ts/computer-schemas.ts
pattern: zod schemas move to a sibling module, the method registry stays.

Co-authored-by: Brennan Benson <>
2026-07-12 18:07:06 -07:00
Brennan BensonandOrca 3c87873dca Fix Command Code smart-sort bump on new prompt while working (STA-350) (#5286)
Co-authored-by: Orca <help@stably.ai>
2026-07-12 18:05:11 -07:00
Brennan Benson e0adf81712 Merge remote-tracking branch 'origin/main' into fix/renderer-crash-white-screen 2026-07-12 18:02:14 -07:00
OrcaWin d5627638ab fix(terminal): prevent focus prefix in startup drafts (#8433)
* fix(terminal): order startup drafts after focus input

* fix(terminal): preserve startup draft activity
2026-07-12 18:00:38 -07:00
Brennan Benson 42d08c32c0 Merge remote-tracking branch 'origin/main' into fix/renderer-crash-white-screen 2026-07-12 18:00:18 -07:00
Brennan Benson 00b9e097ee test: record retained shutdown retry evidence 2026-07-12 18:00:18 -07:00
Brennan BensonandBrennan Benson fcd60a03f8 Keep long live session logs stable while they update (#8432)
* Keep long live session logs stable while updating

* fix(editor): normalize content before append sync

* chore(editor): export e2e probe type and link gate motivator

Post-review cleanup: env.d.ts referenced the probe's method shape as an
inline literal, so a probe rename would only surface in the e2e spec;
the new reliability gate's motivatingLinks pointed at the repo root.

---------

Co-authored-by: Brennan Benson <brennanbenson@Brennans-MacBook-Pro.local>
2026-07-12 17:56:49 -07:00
Brennan Benson 3d41bfbcab Merge remote-tracking branch 'origin/main' into fix/renderer-crash-white-screen 2026-07-12 17:54:43 -07:00
Brennan Benson e257e1fd81 fix: retry retained terminal shutdowns 2026-07-12 17:54:43 -07:00
nikg24andnikg24 67cd462b24 Add Cursor orchestration group routing (#8436)
Co-authored-by: nikg24 <228026988+nikg24@users.noreply.github.com>
2026-07-12 17:39:18 -07:00
Brennan Benson dead0c7cd2 refactor: centralize background PTY cleanup 2026-07-12 17:38:14 -07:00
Brennan Benson 0f94771dfd Merge remote-tracking branch 'origin/main' into fix/renderer-crash-white-screen 2026-07-12 17:35:31 -07:00
Brennan Benson 814b4353f4 test: cover offline teardown ownership 2026-07-12 17:35:31 -07:00
Neil d452385bf7 fix(mobile): offer scoped Windows Firewall repair (#8439) 2026-07-12 17:30:22 -07:00
Brennan Benson 226e6f4465 Merge remote-tracking branch 'origin/main' into fix/renderer-crash-white-screen 2026-07-12 17:29:58 -07:00
Brennan Benson c786085526 fix: retain teardown ownership across offline paths 2026-07-12 17:29:58 -07:00
Brennan BensonandBrennan Benson 550c41a35c refactor(editor): consolidate diff tooltip provider (#8429)
Co-authored-by: Brennan Benson <brennanbenson@Brennans-MacBook-Pro.local>
2026-07-12 17:22:08 -07:00
Brennan Benson ed14b32f70 test: record latest teardown gate evidence 2026-07-12 17:12:07 -07:00
Neil fb15d647c6 refactor: remove state-only React effects (#8437) 2026-07-12 17:11:08 -07:00
Brennan Benson 49b66055cb Merge remote-tracking branch 'origin/main' into fix/renderer-crash-white-screen 2026-07-12 17:10:56 -07:00
Brennan Benson 7cf07e6008 fix: fence desktop terminal teardown admissions 2026-07-12 17:10:48 -07:00
d197c5b864 fix(terminal): route Shift+Enter by PTY host (#8065)
* fix(terminal): route Shift+Enter by PTY host

* fix(terminal): resolve SSH platform from execution host

* fix(terminal): preserve restored runtime input routing

* fix(terminal): route Shift+Enter by PTY host

* fix(terminal): resolve SSH platform from execution host

* fix(terminal): preserve active PTY host routing

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

* test(terminal): remove superseded host-routing cases

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

---------

Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
2026-07-12 17:10:26 -07:00
Jinjing 8086f9a3f5 Rework post-batch late-settlement reconciliation to report per-candidate (#8434)
- Late child/parent settlements now report individually instead of
  being batched into a single combined result, so toasts and
  onLateResult callbacks reflect actual per-candidate outcomes.
- Post-batch reconciler retains only unresolved provisional-ancestor
  state instead of the full batch arrays, and releases it once no
  provisional ancestor remains, avoiding unbounded retention for
  long-hung IPC promises.
- Unblocked ancestors retried post-batch now go through the same
  timeout/settlement tracking as in-batch removals, including
  further late settlement if the retry itself hangs.
2026-07-12 17:07:34 -07:00
github-actions[bot] 3eb805ce4f release: v1.4.138-rc.3 v1.4.138-rc.3 2026-07-13 00:00:00 +00:00
Jinjing 88d6fdad27 Harden SSH import path handling against traversal and Windows device nam (#8435)
- Validate each remote path segment (name, symlink target, directory
  entry) via assertSafeRemotePathSegment before it reaches the remote
  filesystem, since Windows canonicalizes reserved device names and
  NTFS streams in ways POSIX checks miss.
- Extract directory pre-scan/upload logic into
  filesystem-import-ssh-directory.ts and add captureLocalUploadRoot to
  detect a selected root swapped out from under an in-progress import.
- Add path-safety tests covering traversal, reserved Windows names,
  and TOCTOU root replacement.
2026-07-12 16:53:43 -07:00
Brennan Benson 6c4571d57a Merge remote-tracking branch 'origin/main' into fix/renderer-crash-white-screen 2026-07-12 16:31:49 -07:00
Brennan Benson 3dd79e7433 fix(terminal): preserve teardown ownership until confirmed 2026-07-12 16:31:19 -07:00
c6029bea10 fix(terminal): handle Linux IME candidate digits without composition events (#8241)
* fix(terminal): preserve Linux IME candidate digits

* fix(terminal): preserve overlapping Linux IME keys

* docs(terminal): document Linux IME candidate state

* docs(terminal): describe IME candidate event handling

* docs(terminal): clarify Linux IME state callbacks

* fix(terminal): harden Linux IME candidate fallback

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

---------

Co-authored-by: yuqili03 <yuqili03@deeproute.ai>
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
2026-07-12 16:30:44 -07:00
Brennan Benson 8ea0622587 Merge remote-tracking branch 'origin/main' into fix/renderer-crash-white-screen
# Conflicts:
#	src/renderer/src/components/editor/EditorPanelHeader.tsx
#	src/renderer/src/components/editor/diff-navigation-context.test.tsx
#	src/renderer/src/components/editor/diff-navigation-context.tsx
#	src/renderer/src/i18n/locales/es.json
#	src/renderer/src/i18n/locales/ja.json
#	src/renderer/src/i18n/locales/ko.json
#	src/renderer/src/i18n/locales/zh.json
2026-07-12 16:17:48 -07:00
sonhyrdandBrennan Benson f8ae1a489b Add F7/Shift+F7 keyboard navigation for diff changes (#8240)
* feat(diff): add F7/Shift+F7 keyboard navigation for diff changes

Stacks on the Previous/Next change buttons (#6668) to add keyboard
navigation for single-file diffs, matching VS Code / JetBrains diff review.

- Register editor.nextChange (F7) / editor.previousChange (Shift+F7) in the
  keybinding registry (Editors group) so they show in Settings and stay
  rebindable.
- Teach the keybinding normalizer function keys (F1-F24) and make them
  first-class in the bare-key safety model (safe standalone or with Shift,
  opt-in per action) - F7 was previously unbindable.
- Install a capture-phase listener from DiffNavigationProvider so keyboard
  and the existing header buttons share one goToDiff path; works on
  read-only and editable single-file diffs.
- Translate the Previous/Next change strings for es/ja/ko/zh.

Refs #6215

* test(diff): cover change navigation shortcuts

* fix(diff): use shortcut chips in navigation tooltips

---------

Co-authored-by: Brennan Benson <brennanbenson@Brennans-MacBook-Pro.local>
2026-07-12 16:13:21 -07:00
Brennan Benson c1ac8e1f77 fix(terminal): drain renderer teardown admissions 2026-07-12 16:03:46 -07:00
Brennan Benson 7cf8b6ac52 fix(runtime): drain terminal admissions before removal 2026-07-12 15:41:28 -07:00
Brennan Benson bfbeab6204 fix(terminal): make teardown ownership generation-safe 2026-07-12 15:34:34 -07:00
gatsby74andNeil 9dc1f253ad feat(editor): add file editor word wrap preference (#8423)
Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
2026-07-12 15:17:06 -07:00
Neil 2306f82113 fix(terminal): gate Shift+Enter CSI-u on active protocol (#8427) 2026-07-12 15:09:20 -07:00