Commit Graph
235 Commits
Author SHA1 Message Date
Jinwoo-H 694fb2947e Merge remote-tracking branch 'origin/main' into Jinwoo-H/feature-control-multiple-orca-servers-concurrent 2026-06-12 17:17:27 -07:00
Brennan BensonandOrca 74c961b09f Add Linear write commands for agents (#5165)
Co-authored-by: Orca <help@stably.ai>
2026-06-12 13:29:13 -07:00
0021d95796 fix(serve): persist active serve session tab so PTY output doesn't snap focus to the last tab (#5131)
* fix(serve): persist active mobile-session tab so PTY output doesn't snap focus

In `orca serve` (headless host + remote/web client), running a command in a
terminal snapped the active tab back to the last-created tab. The renderer
reconcile forces the client's active tab to the host's reported active
(activeTabId / activeTabType / per-tab isActive), but `activateMobileSessionTab`
only called `focusTerminal` — a no-op for serve tabs no renderer has adopted —
and never persisted the chosen tab into the host's in-memory snapshot. So every
`onPtyData` -> `touchMobileSessionSnapshotsForPty` republish re-emitted the stale
"active = last tab" and the client snapped back on each command.

Persist the activation into the headless snapshot (activeTabId, activeTabType,
exclusive per-tab isActive, rebuilt tabGroups) after the focus dispatch, gated on
`!getAvailableAuthoritativeWindow() && isHeadlessMobileSessionPublication(...)` —
the same guard the hydrate path uses, so renderer-owned snapshots (including
`:headless-merge:`) stay authoritative. No-op when the tab is already active;
adds nothing to the `onPtyData` hot path.

Adds 3 regression tests covering: chosen tab survives a PTY republish, no version
bump on redundant activation, and no server-side persist when a renderer is
authoritative.

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

* fix(serve): exclude :headless-merge: snapshots from headless active-tab persist

After a renderer detaches there is no authoritative window, so the
!getAvailableAuthoritativeWindow() guard alone let merged (:headless-merge:)
snapshots through this path. A merged snapshot still carries renderer-owned
tabs/groups, so a server-side active-tab rewrite could collapse that mixed
group state. Exclude merged epochs from the persist gate; only pure
`headless:` / `headless-hydrated:` publications are persisted server-side.

Adds a regression test: renderer-detach + `:headless-merge:` snapshot ->
the headless persist is suppressed (no snapshot mutation / event).

Addresses the CodeRabbit review on #5131.

* review: clarify headless active-tab persistence guard

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-12 10:47:55 -07:00
Jinwoo-HandOrca 5a89cf0a13 Polish host-aware Add Project flows
Co-authored-by: Orca <help@stably.ai>
2026-06-11 15:38:34 -07:00
Brennan BensonandOrca 9c428cbef4 Add multi-repo folder workspaces (v1) (#5172)
Co-authored-by: Orca <help@stably.ai>
2026-06-11 13:01:50 -07:00
Brennan BensonandOrca ab635e3ca8 Fix Claude agents management status detection (#5179)
Co-authored-by: Orca <help@stably.ai>
2026-06-11 12:54:07 -07:00
Neil e4050eccbd Default agent launches to yolo permissions mode (#5145)
* Default agent launches to yolo mode

* test: update launch default validations
2026-06-11 12:51:55 -07:00
Brennan BensonandOrca 388d0a90b4 Add read-only orca linear CLI with trusted launch-prompt pointer (V1) (#5126)
Co-authored-by: Orca <help@stably.ai>
2026-06-11 12:50:57 -07:00
Brennan BensonandOrca 19ee3355ac Default-driven create-project flow: name-first form with sensible defaults (#5115)
Co-authored-by: Orca <help@stably.ai>
2026-06-11 12:45:41 -07:00
Jinwoo HongandOrca 0163e9a7de Fix source control compare base ambiguity (#5127)
Co-authored-by: Orca <help@stably.ai>
2026-06-11 12:39:58 -07:00
Jinwoo-HandOrca 626f2ec0ed Make add project host aware
Co-authored-by: Orca <help@stably.ai>
2026-06-11 12:34:00 -07:00
Jinwoo-HandOrca ce0cc1eeb2 Add CLI project host setup clone command
Co-authored-by: Orca <help@stably.ai>
2026-06-11 12:34:00 -07:00
Jinwoo-HandOrca c622bd746f Add project host setup create API
Co-authored-by: Orca <help@stably.ai>
2026-06-11 12:33:59 -07:00
Jinwoo-HandOrca beb7cbaade Add project host setup delete API
Co-authored-by: Orca <help@stably.ai>
2026-06-11 12:33:59 -07:00
Jinwoo-HandOrca 4c146ce394 Add project host setup update API
Co-authored-by: Orca <help@stably.ai>
2026-06-11 12:33:59 -07:00
Jinwoo-HandOrca 359cb1baef Persist project host setup method
Co-authored-by: Orca <help@stably.ai>
2026-06-11 12:33:59 -07:00
Jinwoo-HandOrca cbdd3618d1 Add project host setup existing folder API
Co-authored-by: Orca <help@stably.ai>
2026-06-11 12:33:58 -07:00
Jinwoo-HandOrca 15a04d18a9 Stamp workspace ownership with project host setup
Co-authored-by: Orca <help@stably.ai>
2026-06-11 12:33:58 -07:00
Jinwoo-HandOrca a730ba0b8d Expose project host setup APIs
Co-authored-by: Orca <help@stably.ai>
2026-06-11 12:33:58 -07:00
Jinwoo HongandOrca df0bafaf53 Fix terminal read for blank TUI tails (#5050)
Co-authored-by: Orca <help@stably.ai>
2026-06-11 12:25:50 -07:00
Brennan BensonandOrca 91e354ccb1 Add multi-repo folder workspaces (v1) (#5172)
Co-authored-by: Orca <help@stably.ai>
2026-06-11 02:34:01 -07:00
Brennan BensonandOrca 1ae8ebdc3f Fix Claude agents management status detection (#5179)
Co-authored-by: Orca <help@stably.ai>
2026-06-11 01:43:38 -07:00
Neil 9ceabb43b6 Default agent launches to yolo permissions mode (#5145)
* Default agent launches to yolo mode

* test: update launch default validations
2026-06-10 21:14:53 -07:00
Brennan BensonandOrca cdc0ca5e53 Add read-only orca linear CLI with trusted launch-prompt pointer (V1) (#5126)
Co-authored-by: Orca <help@stably.ai>
2026-06-10 20:20:50 -07:00
Brennan BensonandOrca 6d6ad8b3ec Default-driven create-project flow: name-first form with sensible defaults (#5115)
Co-authored-by: Orca <help@stably.ai>
2026-06-10 16:18:52 -07:00
Jinwoo HongandOrca 24f8eaa55a Fix source control compare base ambiguity (#5127)
Co-authored-by: Orca <help@stably.ai>
2026-06-10 14:12:12 -07:00
Jinwoo HongandOrca 7d666fafab Fix terminal read for blank TUI tails (#5050)
Co-authored-by: Orca <help@stably.ai>
2026-06-09 15:53:39 -07:00
Jinwoo HongandOrca 28fe76f696 Fix desktop terminal restore after mobile fit (#5039)
Co-authored-by: Orca <help@stably.ai>
2026-06-09 12:11:48 -07:00
Brennan BensonandOrca 12340ee525 Surface branch auto-name failures with detailed CLI errors (#4906)
Co-authored-by: Orca <help@stably.ai>
2026-06-08 17:55:54 -07:00
Jinwoo HongandOrca f5efdd5945 Fix remote runtime terminal sharing with mobile (#4901)
Co-authored-by: Orca <help@stably.ai>
2026-06-08 14:26:07 -07:00
JinjingandOrca 006a4ef3a5 Customizable Source Control AI action recipes with per-action agent and command templates (#4868)
* WIP: Changes before auto-review fixes

* Customize Source Control AI action recipes

- Add per-action CLI arguments for generation and launch flows so saved
  recipes can select model flags without putting prompts in argv.
- Share the text-generation dialog between commit messages and hosted-review
  details, with first-run defaults and repo/global recipe support.
- Launch fix-check agents directly from saved recipes and harden prompt/template
  handling for invalid args, blank prompts, and inherited variables.

* Allow custom commands for source control action recipes

- Let text action recipes save and resolve the custom-command sentinel
- Add settings UI for custom command recipes and preserve per-action defaults
- Split large source-control dialogs and direct launch helpers into focused modules
- Keep launch actions from treating custom text agents as runnable TUI agents

* Add per-repo Source Control AI enablement, custom command, and save-targ

- Repo overrides now support `enabled` and `customAgentCommand`, letting
  repositories opt in/out of Source Control AI independently and supply a
  repo-scoped custom command that takes precedence over the global one.
- Recipe-save dialogs gained a save-target selector ("Don't save / Save for
  this repo / Save as global default") replacing the old boolean checkbox,
  routing saves through the new `saveSourceControlActionRecipe` helper in
  `source-control-ai-recipe-save.ts`.
- `normalizeRepoSourceControlAiOverrides` now returns `undefined` for empty
  objects and passes the `null` sentinel through the IPC/RPC layer so the
  persistence layer can clear repo overrides cleanly.
- `resolveSourceControlLaunchPlatform` resolves the correct shell platform
  for SSH and WSL worktrees so agent launch commands are built correctly.
- Settings UI gained `RepositorySourceControlAiEnablement` and
  `RepositorySourceControlAiCustomCommand` rows; draft/label logic was
  extracted into focused modules to stay within lint line limits.

* Extract action recipe defaults into own component and use id-prefixed wo

- Move action recipe draft state and UI out of CommitMessageAiPane into SourceControlAiActionRecipeDefaults and source-control-ai-action-recipe-draft.ts to respect the max-lines lint rule
- Use toRuntimeWorktreeSelector() across all runtime git RPC calls so the runtime can resolve worktrees by ID rather than path
- Fix SSH launch platform resolution to use the repo's connection when the newly created worktree isn't hydrated yet
- Add edit and delete handlers for PR conversation comments with confirmation dialog
- Use text-status-success design token instead of hardcoded text-emerald-500

* add more search keyword

* Rename "Enable Source Control AI defaults" to "Show Source Control AI ac

* fix test

* Remove unused imports and variable assignment in launch-work-item-direct

* Fix test mocks to use `mocks.store` instead of `storeState.value` for di

* Extract Source Control AI logic into focused modules with fix-checks dia

---------

Co-authored-by: Orca <help@stably.ai>
2026-06-08 14:08:35 -07:00
Brennan BensonandOrca 5424582b51 Suggest enabling local-main freshness when a new workspace finds it stale (#4888)
* Suggest enabling local-main freshness when a new workspace finds it stale

Adds a "Keep Local Main Up to Date" suggestion path: when the setting is
off and a new workspace's local base branch is behind its remote, Orca
surfaces a one-time, dismissible toast nudging the user to enable it. The
toast is sticky (no auto-expire) so it can't be missed, with explicit
Turn On / Dismiss actions; dismissing (button, close X, or swipe) persists
localBaseRefSuggestionDismissed so the nudge — and its backend probe —
never runs again.

Also refactors the refresh logic so the advisory and mutating paths share
one fast-forward-safety evaluator, adds an SSH relay RPC for the ref
mutation, and fixes remote-tracking base parsing for fully-qualified refs.

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

* fix: restore update-ref fast-forward for un-checked-out local base ref

The refactor that split refresh into evaluate + mutate dropped the
non-owner case: a local base branch checked out in no worktree was left
stale (return undefined) instead of fast-forwarded. Restore it across all
three layers — local evaluator/mutator, SSH evaluator, and relay handler
(which also removes the dead duplicated throw) — using the expected-old-OID
compare-and-swap form of update-ref so a concurrent ref move is a no-op.
The suggestion toast now also fires for this case.

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

* refactor: restore resultBase spread in local-base-ref mutators

The evaluate/mutate split spelled out { baseRef, localBranch, status }
literally in the mutating paths; main used a resultBase spread. Restore
that pattern in both the local and SSH mutators — behavior-preserving,
collapses two identical skipped_error returns.

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

---------

Co-authored-by: Orca <help@stably.ai>
2026-06-08 13:19:45 -07:00
Jinwoo HongandOrca 7ea359bd60 Add Claude Agent Teams native pane launcher (#4892)
* Add Claude Agent Teams native pane launcher

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

* Fix Agent Teams CI coverage checks

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

* Fix Claude Agent Teams split direction mapping

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

---------

Co-authored-by: Orca <help@stably.ai>
2026-06-08 16:11:32 -04:00
Neil f15dcd928c Stabilize OpenCode terminal rendering before release (#4850) 2026-06-08 01:00:29 -07:00
Jinwoo HongandOrca 1b363b4d9c Add mobile emulator (#4754)
Co-authored-by: Orca <help@stably.ai>
2026-06-08 00:08:57 -07:00
Jinwoo HongandOrca bed624573d Fix orchestration waits waking on heartbeats (#4858)
Co-authored-by: Orca <help@stably.ai>
2026-06-07 19:57:21 -07:00
Jinjing a67afb5a04 fix: address review findings (#4853) 2026-06-07 19:50:05 -07:00
Jinwoo HongandOrca e35deb9720 Fix serve-created mobile terminals on desktop
* Fix serve-created mobile terminals on desktop

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

* Address headless mobile terminal merge review

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

* Document headless mobile merge invariants

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

---------

Co-authored-by: Orca <help@stably.ai>
2026-06-07 21:51:49 -04:00
Jinjing bb40dcd028 fix: recover missing worktree deletes (#4811) 2026-06-07 11:01:26 -07:00
Neil 6caebb27f5 Preserve cold restore cwd in headless snapshots (#4782) 2026-06-07 05:13:18 -07:00
Neil 8bdc55cb81 Adopt seeded titles into headless terminal state (#4781) 2026-06-07 04:58:11 -07:00
Neil 733f77d522 Track terminal titles in headless snapshots (#4780) 2026-06-07 04:47:10 -07:00
Neil 429d5935a3 refactor: preserve terminal status connection identity (#4774) 2026-06-07 02:41:09 -07:00
Neil 2401c3d8d9 refactor: wire rendererless terminal status into hooks 2026-06-07 01:56:39 -07:00
Neil aaf51dad45 refactor: parse terminal agent status in runtime 2026-06-07 01:35:46 -07:00
Neil 9db0985c7f fix: restore hidden remote terminal output snapshots (#4759) 2026-06-06 23:37:05 -07:00
Jinwoo HongandOrca db47575d18 fix: RuntimeEnvironmentStoreError on orca cli file open (agent use case) (#4724)
Co-authored-by: Orca <help@stably.ai>
2026-06-05 15:03:10 -07:00
Jinwoo HongandOrca 577504f8c7 Improve remote server project add flow (#4715)
Co-authored-by: Orca <help@stably.ai>
2026-06-05 13:41:37 -07:00
Jinwoo HongandOrca 2f8246356f Fix owner-scoped file watch reloads (#4682)
Co-authored-by: Orca <help@stably.ai>
2026-06-04 22:29:42 -07:00
Brennan BensonandOrca a4773ab108 Simplify nested repository imports (#4603)
Co-authored-by: Orca <help@stably.ai>
2026-06-04 20:50:38 -07:00