Commit Graph
10541 Commits
Author SHA1 Message Date
Neil 5b95e3b736 Merge main to re-validate against current base 2026-09-08 01:52:57 -07:00
Neil ea102a9eb8 fix(i18n): drop orphan TerminalPane.minimumContrast entries that broke main static analysis
The 7 auto.components.settings.TerminalPane.minimumContrast.* entries added by #18126 have zero call sites; the shipped component reads settings.contrast.*. Because the runtime-required catalog classifies any key with no literal-default call site as required, the orphans broke 'Verify runtime-required localization catalog' on main and red-lit every PR in the repo.

Deleting them is the root-cause fix: regenerating would instead add dead strings to the boot bundle. On main+delete, --fix regenerates a byte-identical catalog and the CI step exits 0.

Merged with 'test / tests node 24 3/8' red: that failure is an unrelated main break from the #19542/#19551 collision, not from this change.
2026-09-08 01:45:52 -07:00
Jinwoo Hong d346d6f447 fix(orchestration): refuse Task re-open under a live worker; allow stop re-issue on a stranded row (#19551) 2026-09-08 04:03:23 -04:00
Jinwoo Hong 98fdbc4ade fix(orchestration): file federated worker mail under the coordinator Run (#19542) 2026-09-08 04:03:07 -04:00
53852c9ca4 feat(terminal): make the contrast floor user-configurable (#10754) (#18126)
* feat(terminal): make the contrast floor user-configurable (#10754)

The xterm minimumContrastRatio floor was hardcoded (3 on dark backgrounds,
4.5 on light) and applied to every pane with no way out, so TUIs that use
deliberately low contrast were rewritten: Powerline separators drawn in the
neighbouring segment's background became visible seams, and dimmed secondary
text lost its hierarchy.

Adds an optional `terminalMinimumContrastRatio` setting under Settings ->
Terminal -> Rendering. Blank keeps today's automatic, background-luminance
gated floor; 1 disables correction entirely (matching VS Code's documented
`terminal.integrated.minimumContrastRatio` and iTerm2's off-by-default
Minimum Contrast); values are clamped to xterm's 1-21 range.

The floor is resolved in one place, so live panes, the Appearance preview
and the dashboard terminal preview all follow it, and the existing
value-gated write still avoids clearing xterm's contrast cache on no-op
re-applies. The clamp also lives at the persistence boundary that every
writer crosses, so a hand-edited profile or CLI write can never hand xterm
a non-finite option. Mobile mirrors the desktop gate, so the resolved floor
travels with the terminal theme payload as a new optional field; hosts that
omit it leave older and newer clients on the luminance gate.

Fixes #10754.

Co-authored-by: Nyanako <44753291+Nanako0129@users.noreply.github.com>

* fix(terminal): refresh mobile payload fixture and clarify contrast target

* feat(terminal): make contrast controls intent-based with custom tuning

---------

Co-authored-by: Nyanako <44753291+Nanako0129@users.noreply.github.com>
Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
2026-09-08 00:39:33 -07:00
Neilandylcn91 2e19342c12 fix(terminal): remove host-retired ghost panes in paired remote splits (#19365)
Adds the missing removal path to the host-authoritative layout reconciler, so a pane the host has retired is unmounted once its PTY has cleared. Fixes #17770.

The removal planner, its retired-set gate, the null-PTY guard, the never-last-pane guard and their unit tests originate from #18387 by @ylcn91. This PR adds the recovery-state dependency that makes the deferred removal actually re-run, an e2e regression spec, and a hook-parity repin.

Co-authored-by: ylcn91 <7249450+ylcn91@users.noreply.github.com>
2026-09-08 00:37:21 -07:00
53233be289 perf: count GitLab diff line prefixes without splitting all lines (#19505)
* perf: count GitLab diff line prefixes without splitting all lines

* test(gitlab): pin diff-count parity for CRLF, lone CR and non-ASCII lines

---------

Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
2026-09-08 00:10:38 -07:00
Neil 15adbd9d18 fix(agent-hooks): guard every Windows missing-target fallback before it reads stdin (#19415)
A Windows hook whose target file is missing fell back to reading stdin and throwing it away. That read never returns when the caller abandons the pipe, which is what happens outside an Orca pane — one stuck process and a visible console per hook event (#11549).

The rule 'check the Orca env before you own stdin' existed once in cmd syntax and was retyped by hand elsewhere, so the PowerShell and Git Bash launchers never got it. Derive all three dialects from one list of vars and apply them wherever a missing target makes the caller the stdin owner.

- wrapWindowsHookCommand and the runtime-home PowerShell branch guard before ReadToEnd, and emit the fallback answer before the guard so a gate event outside a pane is not answered with silence.
- The runtime-home Git Bash fallback picks its rule by platform: POSIX keeps capture-first (#8110), Windows answers, guards, then drains.
- The Antigravity wrapper disables delayed expansion like its core; with a '!' in the hooks path it was missing the core on every event (#9358/#9941).

Tests drive the wrapper through the production 'cmd /d /c' chain under both delayed-expansion states, and the cross-agent ratchet covers the launchers with an abandoned pipe rather than requiring the unguarded drain.
2026-09-07 23:35:26 -07:00
1a925ed2b9 perf: select highest usage totals without full sorting (#19490)
* perf: select highest usage totals without full sorting

* test(usage): pin first-inserted tie-break contract for highestUsageKey

Document why the strict > and the NaN sort fallback are load-bearing, and
cover the tie/re-set ordering the replaced stable sort guaranteed.

---------

Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
2026-09-07 23:28:53 -07:00
6c85e33197 perf: lazily index case-insensitive Windows environment keys (#19483)
* perf: lazily index case-insensitive Windows environment keys

* test(windows): pin env expansion fallback against the per-miss lookup oracle

Adds zero-enumeration, first-case-variant-wins, prototype-chain and 4,000-case
randomized differential coverage, and groups the new cases under their describe.

---------

Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
2026-09-07 23:27:37 -07:00
Neil ed881889c4 fix(terminal): fold-safe CAN/SUB and double-ESC handling in partial-escape tail (#19521)
`extractPartialEscapeTail` broke its own fold invariant
(extract(a + b) === extract(extract(a) + b)) in the oscEsc/stringEsc states,
so a PTY read that split there produced a different pending tail than the
same bytes delivered whole — the tail snapshots append after a restore.

Two causes, both in the "ESC did not terminate the string" branch:

- CAN/SUB were routed through `stateAfterEscByte`, which maps them back to
  `esc` instead of aborting to ground. `extractPartialEscapeTail('\x1bPx\x1b\x18X0abc')`
  returned '\x1b\x18X0abc'; the chunk-split fold returned ''.
- A second ESC opened its new sequence at `i - 1` rather than at itself.
  `extractPartialEscapeTail('\x1b] \x1b\x1b^')` returned '\x1b\x1b^' whole but
  '\x1b^' folded. The fold was right — xterm starts the sequence at the second ESC.

The existing fuzz only asserted the fold as `advance(extract(pending), chunk)`,
which is a tautology because every PENDINGS entry is already a tail. Replaced
with a sweep that re-splits the combined stream at every code-unit boundary,
and extended the alphabet (NUL, 0x20 intermediate, CJK) and SEQUENCES with
CAN/SUB and doubled-ESC-inside-string cases. A 1.25M-split fold fuzz over a
VT alphabet goes from 421 failures to 0.
2026-09-07 23:25:46 -07:00
5b111ae607 perf: memoize ancestry when selecting foreground agents (#19502)
* perf: memoize ancestry when selecting foreground agents

* perf(foreground): scope the ancestry memo to its ancestor and process snapshot

---------

Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
2026-09-07 23:24:55 -07:00
Neil ef6ad22431 perf(native-chat): preserve historical tool rows while streaming (#19364)
* perf(native-chat): preserve historical tool rows while streaming

* perf(native-chat): short-circuit identical rows and lock producer immutability

Most folded rows come back as the input object, so compare identity before
scanning fields and blocks. Add a regression test for the invariant the reuse
cache depends on: ordering and folding never rewrite producer-owned messages
or blocks, which reused rows alias.
2026-09-07 23:24:43 -07:00
Neil 28d936e030 perf(native-chat): bound journal reads during paged catch-up (#19360)
* perf(native-chat): bound journal reads during paged catch-up

* perf(native-chat): reduce the journal once per catch-up run, not per page

Bounding the SQL read per page left the JS side still O(total items) per
page: every page re-reduced the whole timeline and rebuilt the live-item
map, and the byte-shrink loop rebuilt it again on each halving.

A catch-up run is a synchronous loop with no await between pages, so the
reduced timeline is loop-invariant. `createAgentSessionCatchUpReader`
holds one snapshot for the run and re-reduces only if the journal cursor
actually moved, and the projection's live-item / alias / submission-byte
indexes memoize on the snapshot arrays the reducer rebuilds on change.

Per catch-up over a 8,000-message backlog: 40 timeline reductions to 1,
reduce+project time 24.3ms to 3.5ms, end-to-end 134.6ms to 111.3ms.
2026-09-07 23:24:25 -07:00
Shahar MorandNeil 668946345a fix(remote): keep terminal tabs syncing after orphan recovery (#19065)
* fix(remote): keep terminal tabs syncing after orphan recovery

* fix(remote): validate recovery snapshots (#19065)

Address CodeRabbit feedback discussion_r3943677920 by validating the complete session-tabs payload before orphan recovery can publish it. Reject malformed rows and metadata as a whole while preserving optional and unknown additive fields.

Add validation and recovery/mirror regressions proving invalid follow-up reads retain the previous inventory and retry successfully.

Validation: 805 tests passed across 49 files; all four changed files pass Oxlint 1.80.0.
Note: pre-existing web typecheck errors in psl/emojibase-data resolution and export-let-function-initializer-ban.test.ts are unchanged from upstream.

* fix(remote): test reachable pending recovery states (#19065)

Address Pullfrog feedback discussion_r3943701696 by removing the retirement guard the host projection cannot reach and validating both affected fixtures through real host finalization.

Cover exact retirement, ready rebinding, pending/no-proof retention, and newer pending rows surviving prior authoritative removal. Preserve the host wire format and retain-on-unverifiable policy.

Validation: 807 tests passed across 50 files; all five changed files pass Oxlint 1.80.0.
Note: pre-existing web typecheck errors in psl/emojibase-data resolution and export-let-function-initializer-ban.test.ts remain unchanged.

* fix(remote): keep recovery reads tolerant of newer hosts (#19065)

Narrow the post-adoption snapshot validator to the fields recovery and the
mirror's coordinate logic actually consume. The previous schema closed every
enum and discriminant on the session-tab channel, so a host that published an
unknown agent name, status state, or tab kind failed the whole parse and
recovery retained forever - the same permanently-invisible-terminal symptom
this PR fixes. Unknown labels now pass through; structural defects in consumed
fields (coordinates, handles, groups, layouts, active selection) still fail
closed, and the three adoption regressions pinning that keep passing.

Replace the cyclic-layout test, which assumed a zod v3 stack overflow that
zod v4 cycle-detects away, with a throwing-accessor case that exercises the
same fail-closed branch.

Thread expectedRuntimeId through refreshWebRuntimeSessionTabsSnapshot so the
fifth recovery call site fences its post-adoption read like the other four.

Takes over stablyai/orca#19065 from its original author.

Co-authored-by: Shahar Mor <shaharmor1@gmail.com>

---------

Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
2026-09-07 23:21:35 -07:00
Jinjing 36d209f515 Verify failure causality in PR checks fix prompt before making changes (#19435)
* Update PR checks fix prompt to verify failure causality before fixing

Revise the prompt to classify failures as caused by this branch, not caused,
or uncertain before making changes. Only proceed autonomously for confirmed
failures; ask the user for guidance on uncertain or unrelated issues to avoid
fixing failures that weren't caused by the branch.

* Update PR checks fix prompt to verify failure causality before fixing

- Emphasize investigation phase by reframing prompt: "Investigate" rather than "Fix"
- Extend untrusted-data warning to all investigation sources (repository files, commit messages, diffs, CI output)
- Add test verifying injection safety: malicious input confined to JSON payloads, never as prompt instructions

* Refactor buildFixChecksPrompt test to focus on field mapping

The wrapper's only responsibility is renaming mobile PR fields onto the
shared prompt builder. Remove assertions about prompt wording, which are
already covered by the builder's own test suite. Simplify the test to
verify the field mapping contract and nothing else.
2026-09-07 22:47:26 -07:00
OrcaWinandm4air 96c6aa2ae3 perf: parse external automation dates once per run (#19474)
Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
2026-09-07 22:38:40 -07:00
OrcaWinandm4air d3d939b7a0 perf: precompute Jira priority and timestamp sorting keys (#19472)
Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
2026-09-07 22:38:34 -07:00
OrcaWinandm4air b52d777c95 perf: index prior memberships during project identity succession (#19463)
Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
2026-09-07 22:38:01 -07:00
OrcaWinandm4air 894fbc8698 perf: normalize only retained browser history candidates (#19460)
Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
2026-09-07 22:37:55 -07:00
OrcaWinandm4air 81bd912928 perf: reuse normalized path matchers for batch deletion (#19458)
Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
2026-09-07 22:37:40 -07:00
OrcaWinandm4air 83167f08ff perf: index VM feature restoration and precompute sorting identities (#19457)
Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
2026-09-07 22:37:31 -07:00
Neil a56d532e69 fix(agents): keep the host fallback when the global WSL default needs repair inside a non-local workspace
The widened global-default path could hand a repair-required resolution to
preflight.detectAgents, which main rejects, emptying detectedAgentIds and
hiding the usage meters in an SSH workspace (#18837 again). A workspace that
cannot own the local runtime has no per-project repair surface, so it now
keeps the host fallback; the no-workspace case still surfaces the repair.

Also guard the resolved active worktree against Floating for callers that
pass no worktree id, pin the isLocalRuntimeWorktree conjunct and the
paired-runtime shape, and strengthen the skill-runtime WSL pins so a
repair-required resolution cannot satisfy them.
2026-09-07 22:36:21 -07:00
Jinjing ab32355701 test(e2e): fix automation and browser reconciliation tests (#19530)
- Update automations API to use runtime.call pattern with automation.create
- Refactor browser creation flow to use state helpers instead of file explorer
- Simplify Playwright selectors and context menu interactions
- Remove fixture file creation from test setup
2026-09-07 22:34:19 -07:00
Jinjing 3b00cfcb2d fix(activity): keep badge in step with monitoring turns; drop dead cache branch (#19535)
Monitoring turns emit no working event (4b2e3dded0), so the titlebar
badge must not count them either, or it lights with no unread row to
clear. The build cache's cached-events ternary could never take its
cached path because the early return above already covers it.
2026-09-07 22:28:23 -07:00
OrcaWinandm4air 990674f7e3 perf: sum omitted workspace sizes without intermediate objects (#19491)
Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
2026-09-07 22:21:52 -07:00
OrcaWinandm4air 5aaf146795 perf: cache matched and unmatched Claude usage cwd attribution (#19489)
Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
2026-09-07 22:21:46 -07:00
OrcaWinandm4air 9039cd522e perf: index forgotten Codex turns for bounded ordinal retention (#19488)
Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
2026-09-07 22:21:39 -07:00
OrcaWinandm4air d0969a4917 perf: parse Git history headers without splitting commit bodies (#19486)
Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
2026-09-07 22:21:34 -07:00
OrcaWinandm4air 7dd6373e2c perf: skip sorting when all final automation runs fit (#19485)
Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
2026-09-07 22:21:28 -07:00
OrcaWinandm4air 5d0a45bb92 perf: use counted membership for worker transcript roster twins (#19484)
Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
2026-09-07 22:21:20 -07:00
OrcaWinandm4air d160c78921 perf: clone only changed work-item pages (#19478)
Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
2026-09-07 22:21:14 -07:00
OrcaWinandm4air 505af34bb6 perf: stop clone URL discovery at the first usable source (#19477)
Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
2026-09-07 22:21:08 -07:00
OrcaWinandm4air fb9d08f5f9 perf: index project table option and iteration order (#19476)
Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
2026-09-07 22:20:57 -07:00
Jinjing 31b84cc71f Fix native PTY I/O failures disabling session termination (#19523)
* Fix native PTY I/O failures disabling session termination

I/O failures on write or resize were incorrectly treated as exit evidence,
which disabled further termination attempts and producer flow control.
Separate ioFailed state from dead state; I/O errors suppress operations
but keep kill, forceKill, and signal available. Publish physical exit
before notifying listeners to prevent reentrant cleanup attempts from
accessing the retired native process.

* Fix PTY I/O cleanup tests and config syntax error

- Fixed missing closing brace and comma in reliability-gates.jsonc
- Added clear() operation to PTY mock fixture and test coverage
- Enhanced assertions to verify operation suppression during I/O failures
- Improved kill operation error handling with better promise-chain assertions
- Updated test result summaries in reliability gate documentation
2026-09-07 22:20:35 -07:00
f0bfc945b4 fix: avoid duplicate repository groups during catalog refresh (#19170)
* fix: keep grouped repositories visible after creation race

* test: strengthen project group creation race verification

---------

Co-authored-by: Kien Le <122910950+kien-ship-it@users.noreply.github.com>
Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
2026-09-07 22:19:52 -07:00
OrcaWinandm4air 253fa43256 perf: index editor ownership and restored workspace projections (#19444)
Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
2026-09-07 22:10:00 -07:00
OrcaWinandm4air 919087897e perf: stop filesystem authorization at the first matching root (#19438)
Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
2026-09-07 22:09:56 -07:00
OrcaWinandm4air 32510c9041 perf: skip Git-status indexing without eligible editors (#19437)
Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
2026-09-07 22:09:52 -07:00
OrcaWinandm4air d3baad2527 perf: index selected team IDs and choose primary team in one pass (#19504)
Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
2026-09-07 21:59:00 -07:00
Jinjing ba5f708290 Rank activity status groups by attention level (#19329)
* refactor(activity): rank status groups by attention level

Establishes consistent group ordering by introducing an attention-based ranking system, ensuring status groups maintain a fixed order regardless of thread recency. Consolidates thread status classification logic into `activityThreadStatusId` and simplifies group key naming.

* refactor(activity): emit working state for live agent turns

Activity events now emit working state for current turns,
enabling attention ranking above historical states.

* fix(activity): preserve working turns and count as unread

- Remove working-state events from cap logic so live turns stay visible
- Count fresh working/monitoring as unread in Activity badge
- Extract state-checking to activity-event-state module
- Use agentStatusEpoch for freshness-based invalidation

* fix(activity): subscribe only to epoch for unread count, not status map

The unread receipt is keyed on turn boundaries (stateStartedAt), not
heartbeats (updatedAt). Only the epoch matters; read the status map
directly via getState() to avoid wasteful re-renders on same-turn
heartbeats.

* fix(activity): prevent monitoring turns from emitting working events

Monitoring turns should surface only via the 'monitoring' snapshot in
the live state, not as separate working events that would contradict
the snapshot signal.
2026-09-07 21:50:14 -07:00
Jinjing 1a8640adb6 Stabilize scrollbar gutter to prevent message list layout shift (#19332)
* Stabilize scrollbar gutter to prevent message list layout shift

- Add `scrollbar-gutter:stable` to prevent reflow when scrollbar appears
- Adjust scroll container padding to properly accommodate the scrollbar
- Add 5px horizontal inset to content for alignment with composer field

* Simplify message list padding and update scrollbar-gutter
2026-09-07 20:24:59 -07:00
Jinjing 217125338e Log error details on session kill failure (#19381)
When a session kill operation fails, capture the error name and message
in the log to aid debugging and performance issue investigation.
2026-09-07 20:20:00 -07:00
Neil 7adb5b3dc4 fix(sidebar): label pinned rows with their host on a multi-host sidebar (#19351)
emitPinnedGroup was the one section emitter that appended worktree rows
without hostContextLabelByWorktreeIdentity, and the mixed-host map it
would have received was computed over naturalWorktrees, which under the
default pinned policy has the pinned worktrees filtered out. Under that
policy a pinned worktree renders only in the Pinned section, so a pinned
remote workspace had no host badge anywhere.

Compute the mixed-host map over the full worktree set and thread it into
the Pinned emitter. Single-host sidebars still draw no badge.

Fixes #18472
2026-09-07 19:54:30 -07:00
Neil 1e693edee4 fix(clipboard): route runtime-owned SSH image paste through the runtime (#17679) (#19352) 2026-09-07 19:54:16 -07:00
Neil fc78a7d9ca fix(runtime): stop a first status publication retiring in-flight worktree scans (#19357)
A paired runtime host's first status publication counted as a connection
change, advancing the connection generation. Worktree scans already in
flight against that same connection were then discarded, so the sidebar
showed a strict subset of the host's worktrees until an unrelated refresh.

Two independent defects, both fixed:

- `connectionChanged` conflated "no entry yet" with "recorded unreachable".
  Only the latter is a reconnect. The provider-session bump keeps the
  broader predicate, since a first publication is a real session start for
  integration-readiness caches.
- A stale-generation result was thrown away with no retry, so even a
  genuine mid-flight reconnect silently dropped completed work. The scan is
  now re-read once against the new generation.
2026-09-07 19:54:01 -07:00
Neil e182930670 test: cover input in five simultaneously flooding SSH panes (#19071)
* test: cover keyboard input in five simultaneously flooding SSH panes

* test: capture pane focus and buffers on flood input failure

* test: capture pane focus and buffers on flood input failure

* test: capture pane focus and buffers on flood input failure

* test: record replay input loss and application fix dependency

* test: record merged replay-input fix in the five-pane flood gate
2026-09-07 19:51:44 -07:00
Jinjing 66420537b7 fix e2e create menu races (#19448) 2026-09-07 19:45:54 -07:00
gatsby74andNeil a278d84a4e fix(pi): show input modals as waiting instead of working (#18836)
* fix(pi): show input modals as waiting instead of working

* test(pi): verify real input dialogs through Electron CDP

---------

Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
2026-09-07 19:35:19 -07:00
aeddfa463d perf(renderer): avoid per-second spinner animation events (#19407)
* perf(renderer): avoid per-second spinner animation events

* fix(bench): ensure the Electron runtime before bench:spinners

The script launches Electron via Playwright but skipped ensure:electron-runtime,
which every other Electron-launching bench script runs first.

* docs(renderer): scope spinner pixel-tolerance claim to paused-animation checks

---------

Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
Co-authored-by: pullfrog[bot] <226033991+pullfrog[bot]@users.noreply.github.com>
2026-09-07 19:29:53 -07:00