Commit Graph
6133 Commits
Author SHA1 Message Date
Jinwoo Hong 495208e6f3 Merge remote-tracking branch 'origin/main' into Jinwoo-H/windows-update-survival
# Conflicts:
#	src/main/daemon/daemon-init.ts
2026-07-06 22:04:14 -04:00
Jinwoo Hong 443092618b fix(win-update-e2e): baseline pre-update echo on the idle shell before startMarker
The pre-update echo probe ran after startMarker began the foreground while-loop,
so it always logged 'interactive: false' (a command can't execute against a
running loop). Move it before the marker so the baseline reflects real input
health on the idle shell.
2026-07-06 21:47:50 -04:00
Jinwoo Hong 617d1d9c24 fix(win-update-e2e): measure marker survival and typed-input in the right order
The survival profile sampled two signals at the wrong moment, so a genuinely
surviving session failed the table:

- "marker process still alive" was read AFTER probeCtrlCInterruptsMarker
  deliberately Ctrl+C-broke the foreground heartbeat loop. Sample it before the
  interrupt, while the loop still proves the pre-update shell alive.
- "typed input echoes" typed a command WHILE the infinite `while($true)` marker
  loop still owned the shell, so it could never execute regardless of input
  health. Run the echo probe after the interrupt returns the shell to a prompt.

Reorder to: heartbeat-advanced -> marker-alive -> Ctrl+C-interrupt -> echo. Also
log the marker pid + alive-after-update for transparency. No assertion changes;
this only fixes when each is measured.
2026-07-06 21:47:04 -04:00
Jinjing 4cbf699360 fix: quote queued OMP resumes for Windows shells (#7628) 2026-07-06 18:41:32 -07:00
PP 0b4196fc17 fix(ssh): stop deleted ~/.ssh/config hosts from reappearing on sync (#7302)
Deleting a config-sourced SSH target had no lasting effect: the Manage-SSH pane
re-imports ~/.ssh/config on open, and the import was a pure upsert with no record
of deletions, so the just-deleted host was re-inserted verbatim from the config
that still exists on disk.

Persist a `deletedSshConfigAliases` tombstone set:

- Deleting a config-managed target (source 'ssh-config', or an adopted legacy
  import) records its alias; manual targets are never tombstoned.
- The passive on-open sync skips tombstoned aliases, so a deleted host stays
  deleted.
- Re-adding or editing a target reclaims its alias, and the explicit Import
  action (`reAdopt`) clears all tombstones to deliberately re-adopt config.

This also fixes the edit-then-reappear case: editing a config host to `manual`
already reserved its current alias, and reclaim covers alias changes.
2026-07-06 18:35:42 -07:00
51c3849a00 fix(github): route PR merges through repo owner (#7590)
* fix(github): route PR merges through repo owner

- Use repo-owner runtime settings before source-context overrides in PR actions
- Keep headless/runtime repos on runtime RPC instead of local gh:mergePR
- Add source-boundary coverage for merge routing and Windows-safe newline matching

* fix(github): preserve repo-owner merge routing

- Apply task-source runtime overrides only when they resolve to a runtime host
- Keep runtime-owned repos from being downgraded to local gh:mergePR
- Guard the routing contract with source-boundary coverage
- Important because non-runtime source contexts could recreate the issue #6957 access-denied path

* test(github): add behavioral regression test for repo-owner merge routing

Mirrors PRActionsPanel's merge-routing decision through the real
repo-runtime-owner/task-source helpers so a revert to source-only
routing (issue #6957) fails here. Covers the runtime-owned repo with a
local GitHub source view and the local-repo-while-runtime-focused case.

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

---------

Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
2026-07-06 18:34:02 -07:00
Jinwoo Hong c2fa2a3f1e fix(daemon): rename relocated Windows host exe to survive the updater's name-based kill
The relocated daemon runs from userData\daemon-host\<ver>\, outside the
install dir, so the NSIS updater's path-based process kill (image path under
$INSTDIR) correctly spares it. But CHECK_APP_RUNNING has a second, name-based
branch (`taskkill /IM Orca.exe`, used in the per-user and PowerShell-unavailable
paths) that matches by image name. The relocated copy was still named Orca.exe,
so that branch killed it — the first survival run confirmed the daemon died on
update despite running from userData.

Rename the copied Electron host to a distinct image name so no name-based branch
matches. Belt-and-suspenders: the distinct name defends the name kill, the
userData path defends the path kill. Renaming only the exe is safe — run-as-node
is env-triggered, an embedded signature survives a rename, and the harness
identifies the daemon by its daemon-entry.js command line, not image name.
2026-07-06 21:29:25 -04:00
Jinwoo-HandOrca d84041c52a test: lock composer agent-detection host precedence for runtime repos (#7082)
Regression guard for the runtime-agent-list fix: asserts the composer's
detectedAgentList selector and detection effect resolve SSH -> runtime ->
local in that order, so a runtime-owned repo shows the paired runtime's
agents instead of the local machine's.

Co-authored-by: Orca <help@stably.ai>
2026-07-06 18:13:55 -07:00
Eren Çakar 1886ea27f7 fix: use runtime agent IDs in workspace composer (#7082) 2026-07-06 18:13:55 -07:00
Jinwoo Hong c73f17668c diag(win-update-e2e): log daemon exe paths, pre-daemon survival, and daemon.log for survival profile 2026-07-06 21:11:08 -04:00
f61500280b feat(ai-vault): add OMP sessions to the AI Vault session browser (#7618)
* feat(ai-vault): add OMP sessions to the AI Vault session browser

Adds OMP ("Oh My Pi") to the AI Vault/Agents catalog so historical
.omp/agent/sessions/**/*.jsonl transcripts are discovered, parsed, and
resumable from the right-sidebar session browser — locally and over SSH.

- Discovery mirrors Pi (OMP_CODING_AGENT_DIR env, WSL home roots, per-agent
  limit) in both the local scanner and the remote/SSH scanner.
- Parses OMP's message-graph JSONL via the shared graph parser (new
  MessageGraphAgent type), capturing the model from model_change.model (OMP's
  key, not Pi's modelId) or the assistant message, and tokens from usage.
- Routes OMP through the incremental parse cache so ~5s rescans resume from
  the last byte instead of re-reading whole transcripts.
- Resumes by absolute transcript path (`omp --resume <path>`) so it resolves
  regardless of which session-dir root (custom OMP_CODING_AGENT_DIR / WSL
  store) the file was discovered under; threaded through both the scanner and
  the renderer's local resume/copy rebuild.
- Renderer reuses the existing OmpIcon/catalog/grouping; adds overflow-x-hidden
  so long worktree chips never widen the sidebar.

Generalizes normalizePiSessionsDir -> normalizeAgentSessionsDir. Verified
end-to-end against 10 real ~/.omp transcripts and rendered in the app.

Co-authored-by: gatsby74 <166927047+gatsby74@users.noreply.github.com>

* fix: make AI Vault parse-cache agent switch explicit

---------

Co-authored-by: gatsby74 <166927047+gatsby74@users.noreply.github.com>
Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>
2026-07-06 18:03:36 -07:00
Neil e30f9d36f2 perf(renderer): purge seven per-tab/per-pty terminal maps on bulk worktree removal (#7613) 2026-07-06 17:57:31 -07:00
Jinwoo Hong d6983cbdf2 feat(daemon): relocate the Windows daemon host out of the install dir to survive updates
Phase 1 of Windows terminal update-survival. On win32 packaged, the
terminal daemon is now forked from a copy of the Electron runtime staged
under userData/daemon-host/<version> (run as node, ELECTRON_RUN_AS_NODE),
so its process image and all loaded modules live outside the install dir
the NSIS updater deletes and force-closes. Keeping the Electron binary
(not stock node.exe) means run-as-node behavior is byte-identical — no
console flashing, asar-correct — which the reverted #7473 attempt broke.

Proven on CI by tools/daemon-relocation-spike: a copied Orca.exe boots
the daemon, drives a real ConPTY session, and holds zero loaded-module
handles into the install dir, on the minimal file set.

- daemon-host-relocation.ts: materialize (atomic staging + marker-last +
  fail-open), version-keyed dir, PID-pinned GC of old versions.
- daemon-init.ts: fork from the relocated exe/entry when available;
  byte-identical in-dir fork otherwise (non-win32, dev, or fail-open).
- Adoption-neutral: protocol/pipe unchanged; a new app still adopts an
  old in-dir daemon.
- win-update-survival-e2e.yml: builds a branch installer and runs the
  harness with --expect survival to prove sessions survive an update.
2026-07-06 20:54:36 -04:00
Jinwoo Hong 65f5a1b9f4 spike(daemon-relocation): submit echo with CR + strip ANSI before match
The relocated ConPTY host works on all tiers (real pwsh prompt + data
frames from the relocated conpty.dll). The only remaining failure was the
spike client: it wrote the command with a trailing CRLF, which PSReadLine
treats as a soft newline (multiline continuation) so the command was typed
but never submitted. Write a lone CR (Enter) instead, and match against the
ANSI-stripped stream since ConPTY interleaves the executed marker with
cursor-move / SGR codes.
2026-07-06 20:44:49 -04:00
Jinwoo Hong 0f8b455163 spike(daemon-relocation): add ConPTY echo diagnostics + daemon log
The relocation mechanism is proven (all tiers: daemon ready, main module =
copy, zero app-dir module handles). The only remaining failure is a pty
echo timeout with empty output and empty daemon stdout/stderr — no window
into what the ConPTY session did. Instrument the failure path:

- pass --log-file to the daemon fork so its session lifecycle events
  (session-created / session-exited / uncaught-exception-suppressed) are
  captured and dumped alongside stdout/stderr on failure.
- client now records the createOrAttach response, per-session data-frame
  counts, exit events, a raw stream sample, and a listSessions probe on
  timeout, and surfaces them via err.diagnostics so the CI log alone
  classifies "no session" vs "silent session" vs "output but no match".
- force powershell.exe and add a short pre-write delay so the shell is
  ready before the command is typed.
2026-07-06 20:31:05 -04:00
Jinwoo Hong 202a5ac0de spike(daemon-relocation): dump daemon stderr + copied tree on failure for diagnosis 2026-07-06 20:13:46 -04:00
Brennan BensonandOrca 9a3bf1293c Mobile file tree follow-ups: reconnect no-blank + old-desktop files.list fallback (#7599)
Co-authored-by: Orca <help@stably.ai>
2026-07-06 17:13:21 -07:00
NeilandOrca f311307560 Add max-lines ratchet CI gate to block new line-limit bypasses (#7608)
oxlint already fails any file over max-lines that is not suppressed, so the
only way to grow past the budget is to add an eslint/oxlint-disable max-lines
comment or a per-file max-lines bump in mobile/.oxlintrc.json. This adds a CI
gate that freezes the current set of suppressions (config/max-lines-baseline.txt,
355 grandfathered entries) and fails the build when a NEW one appears — with a
loud, actionable message pointing at 'split the file'. Existing oversized files
are untouched; the baseline may only shrink (pnpm check:max-lines-ratchet --prune).

Wired into the root lint script and as a dedicated pr.yml step. Unit-tested
(15 cases) and verified against all three failure paths + clean-tree pass.

Co-authored-by: Orca <help@stably.ai>
2026-07-06 17:12:27 -07:00
Jinwoo HongandOrca 9bed9bbd34 perf(ssh): bound relay bulk-stream backlog so PTY echo is not head-of-line blocked (#7601)
Co-authored-by: Orca <help@stably.ai>
2026-07-06 17:10:04 -07:00
Jinwoo Hong cd0b9b459a spike(daemon-relocation): fix node-pty copy path — mirror full win-unpacked layout
node-pty is packaged at resources/node_modules/node-pty (a sibling of
app.asar.unpacked, not under it), so computing its copy dest relative to the
app.asar.unpacked root produced a mangled '\-pty' path and the relocated
daemon crashed on require('node-pty') (exited before ready, all tiers). Make
every copy destination relative to the win-unpacked root so the layout is
mirrored verbatim and the require walk from daemon-entry finds
resources/node_modules/node-pty exactly as in the packaged app. Also pass
--keep-work-dir in CI so per-tier daemon logs survive for the artifact.
2026-07-06 20:09:15 -04:00
Jinjing 7c7ffd64ad docs: update Android APK release link (#7609) 2026-07-06 17:06:17 -07:00
NeilandOrca 6ebe352f36 perf(renderer): project TabBar's agent-status subscription to stable agent types (#7559)
Co-authored-by: Orca <help@stably.ai>
2026-07-06 17:03:44 -07:00
Jinwoo Hong a06175fa1d spike(daemon-relocation): find minimal Electron run-as-node file set on CI
Phase 1 groundwork. tools/daemon-relocation-spike copies a candidate set
of a packaged win-unpacked build to a relocated dir, forks the copied
Orca.exe as node (ELECTRON_RUN_AS_NODE), drives a real ConPTY session
through the daemon protocol, and probes the daemon's loaded modules to
confirm none resolve back into the app dir (the file-lock test). Three
tiers (full / no-gpu / minimal) find the smallest working set. The CI
workflow builds the unpacked app once (cached) and runs all tiers.
2026-07-06 19:59:38 -04:00
Brennan BensonandNeil f5d1a9d549 fix(agent-status): cap retainedAgentsByPaneKey to stop renderer heap OOM (#7528)
retainedAgentsByPaneKey snapshots a completed agent (a full AgentStatusEntry
— up to ~24KB of prompt/message text — plus a TerminalTab) per ephemeral
paneKey. paneKeys never recur, and the map is pruned only on worktree removal
or manual dismissal, so a long-lived worktree in a busy multi-agent /
orchestration session grows it without bound. This is the dominant
large-payload driver of the renderer JS-heap OOM seen in the Windows crash
bundles (heap climbing to the 3586 MB V8 old-space limit under continuous
multi-agent work).

Cap the map with insertion-order (== retention-order) FIFO eviction, mirroring
capRecordByInsertionOrder in github.ts: the newest completions survive; the
oldest simply stop showing in the recently-completed overlay. retainAgents is
the only path that grows the map, so capping there fully bounds it.

Adds a leak regression test that drives the production retainAgents path with
distinct ephemeral paneKeys and asserts the map stays bounded — fails before
this change (grows to N), passes after (capped at MAX_RETAINED_AGENTS).

Co-authored-by: Neil <neil@stably.ai>
2026-07-06 16:57:54 -07:00
NeilandOrca 459b8ecbee perf(renderer): gate CodexRestartChip's store subscriptions on restart-notice existence (#7560)
Co-authored-by: Orca <help@stably.ai>
2026-07-06 16:48:45 -07:00
NeilandOrca d39812f98d perf(renderer): LRU-bound the native-chat composer scope caches (#7566)
Co-authored-by: Orca <help@stably.ai>
2026-07-06 16:46:04 -07:00
NeilandOrca e82eb82716 perf(renderer): purge sparse-preset maps when a repo is removed (#7564)
Co-authored-by: Orca <help@stably.ai>
2026-07-06 16:45:29 -07:00
NeilandOrca 39dbab41d8 perf(renderer): purge three orphaned tab/worktree module maps on removal (#7562)
Co-authored-by: Orca <help@stably.ai>
2026-07-06 16:44:58 -07:00
NeilandOrca aa3936c1e0 perf(main): bound agent-hook closed-tab suppression set (#7561)
Co-authored-by: Orca <help@stably.ai>
2026-07-06 16:44:18 -07:00
NeilandOrca c4c934cf7c perf(main): bound authorized-external-path set with LRU eviction (#7556)
Co-authored-by: Orca <help@stably.ai>
2026-07-06 16:43:43 -07:00
NeilandOrca ec52db6d20 perf(main): drop localhost label routes when a worktree is removed (#7557)
Co-authored-by: Orca <help@stably.ai>
2026-07-06 16:43:05 -07:00
Brennan BensonandOrca 7237c8e592 Route title-status consumers through one pane-agent-evidence seam (title evidence plan, PR 2) (#7600)
Co-authored-by: Orca <help@stably.ai>
2026-07-06 16:39:20 -07:00
github-actions[bot] ee2e3a30a5 release: v1.4.126 v1.4.126 2026-07-06 22:59:57 +00:00
Jinwoo Hong 10f41e370f fix(win-update-e2e): escape \$ for the outer shell so nested-pwsh loops actually run 2026-07-06 18:46:00 -04:00
Brennan BensonandOrca 99ae2dc90f Show full workspace file tree on mobile (#7289)
Co-authored-by: Orca <help@stably.ai>
2026-07-06 15:41:51 -07:00
Jinwoo Hong e4bff4b32b fix(win-update-e2e): wait for the visible .xterm container, not a hidden duplicate 2026-07-06 18:36:54 -04:00
Jinwoo Hong 1fbde69712 fix(win-update-e2e): dismiss Got-it feature-tip modal before typing; restore createTerminalTab import 2026-07-06 18:29:07 -04:00
Brennan Benson a393facef8 Keep the Peek References scrollbar visible (#7584) 2026-07-06 15:28:09 -07:00
Jinwoo Hong f4cd9e35aa fix(win-update-e2e): focus terminal by click, target visible surface, no-create on relaunch 2026-07-06 18:20:47 -04:00
Jinwoo HongandOrca bc84f4b04b Speed up startup with deferred remote catalogs (#7087)
Co-authored-by: Orca <help@stably.ai>
2026-07-06 15:15:15 -07:00
github-actions[bot] 014fd3cf26 release: v1.4.126-rc.0 v1.4.126-rc.0 2026-07-06 22:14:09 +00:00
Brennan BensonandOrca 16439fd499 perf(ai-vault): extend incremental transcript parsing to all append-only JSONL agents (STA-1417) (#7593)
Co-authored-by: Orca <help@stably.ai>
2026-07-06 15:13:00 -07:00
Jinwoo HongandOrca 417723411e perf(source-control): stop gh rate-limit storms and idle git-status spawn churn (#7595)
Co-authored-by: Orca <help@stably.ai>
2026-07-06 15:12:56 -07:00
Jinwoo Hong 377bde351c Bridge WSL Codex sessions into runtime home (#7477) 2026-07-06 15:11:48 -07:00
Jinwoo Hong 0a13fc0dad feat(win-update-e2e): dismiss post-creation overlays, use the created terminal directly 2026-07-06 18:11:10 -04:00
Jinwoo Hong 776be625c8 feat(win-update-e2e): submit worktree composer via Create button prefix / Ctrl+Enter 2026-07-06 18:04:02 -04:00
Brennan BensonandOrca 6aed5c1122 Gate the Gemini GPU fallback on pane-owner evidence instead of raw title text (title evidence plan, PR 1) (#7458)
Co-authored-by: Orca <help@stably.ai>
2026-07-06 15:01:06 -07:00
Jinwoo Hong 311eba844d feat(win-update-e2e): select Blank Terminal mode and click Create worktree in composer 2026-07-06 17:58:53 -04:00
Jinwoo Hong 6d8cf51a48 feat(win-update-e2e): seed a project + drive workspace creation to reach a terminal
CI diagnostics showed the onboarding seed works but the app then sits at
"No workspaces found" - a terminal needs a project + workspace, and "Add
Project" is a native dialog Playwright cannot drive. So seed a throwaway
git repo into orca-data.json as a project (first launch only, to avoid
clobbering the persisted session the relaunch restores), and drive the
in-app "New workspace" composer to create a worktree whose default tab is
a terminal.
2026-07-06 17:52:31 -04:00
Jinwoo Hong c1a25c8b3a feat(win-update-e2e): onboarding seed + fail-fast driving + failure diagnostics
- Seed a completed-onboarding profile into userData before launch so the
  fullscreen onboarding overlay stops blocking the terminal UI.
- ensureTerminal(): create a terminal from a fresh profile rather than
  waiting for a pre-existing surface that never appears.
- Wrap the whole run in try/catch/finally: a driving failure now captures
  a screenshot + DOM/store diagnostics and ALWAYS tears down (close app,
  uninstall), then force-exits — turning a 30-min CI job timeout into a
  ~2-min readable failure. Workflow uploads the diagnostics.
2026-07-06 17:41:51 -04:00