Commit Graph
13471 Commits
Author SHA1 Message Date
Kelvin AmoabaandNico Hu 3ddaa8df6f fix(mermaid): keep flowchart labels readable on custom node fills (#34452)
Mermaid draws every flowchart label in the theme's text colour, so a
`style` or `classDef` fill can hide it: light text on a pale node in dark
mode, dark text on a deep one in light mode. After rendering, labels that
fall below 4.5:1 on their node's fill switch to whichever theme colour
reads better, on desktop previews, chat and the phone.

Co-authored-by: Nico Hu <haoyu.hu@lexmount.com>
2026-10-27 16:38:00 +00:00
Kelvin Amoaba 53e6a7d4a9 feat(mobile): copy button on shell command rows in chat (#34432)
* feat(mobile): copy button on shell command rows in chat

* test(mobile): stub the copy button where chat tests count tool row presses

* fix(chat): decode the login-shell script the way the shell does

Codex joins argv by switching quote styles, so stripping only the outer
quotes left \" escapes and quote splices in about a fifth of real
commands. Argv arrays are now shell-quoted when joined.

* fix(chat): keep the shell-path match to the outer command; reuse the label's full command

Argv arrays go back to a plain join: no argv-shaped shell calls exist in
real transcripts, and quoting them broke PowerShell and cmd.exe argv.

* test(mobile): leave quote decoding to the shared unwrap test

* refactor(chat): slice double-quoted runs and name the row's command fields plainly

* style(mobile): format copy button mocks in chat row tests
2026-10-27 16:34:48 +00:00
OrcaWinandOrcaWin 93a065031b test: remove 47 low-value CLI and runtime tests (#34451)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-27 09:26:47 -07:00
Neil 2a08315494 refactor: group Claude structured session lifecycle owners (#34449)
* refactor: group Claude structured session lifecycle owners

* refactor: consolidate retargeted Claude state type imports
2026-10-27 09:17:40 -07:00
OrcaWinandOrcaWin 7140e7fccd test: remove 22 low-value CLI tests (#34448)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-27 09:06:10 -07:00
OrcaWinandOrcaWin dc735050b3 test: remove 20 low-value CLI and runtime tests (#34445)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-27 08:47:04 -07:00
Kelvin Amoaba e310a63624 fix(mobile): use desktop's rules for queued messages, turn status, Stop and the chat composer (#34000)
* refactor(mobile): share the queued-card projection with desktop

Image-only queued drafts showed a blank card on the phone.

* fix(mobile): honor the host's Queue follow-ups setting

With it off, a mid-turn send from the phone still queued while desktop sent it into the running turn.

* fix(mobile): keep a queued-card edit when the card leaves the queue

The phone closed the editor and dropped the typing; it now goes to the chat box as on desktop.

* fix(mobile): hold /clear and /compact for background work and sends

The phone fired the command where desktop holds it, showed start failures twice, and left the agent unnamed in failures.

* fix(mobile): hand a queued edit back to the chat it came from

* fix(mobile): scope a command's send hold to its own chat

* fix(mobile): read a published null queue as empty

* refactor(mobile): share the returned queued-card caption rule

* test(mobile): drop queued-card tests the shared rules already own

* refactor(native-chat): share the needs-attention rule and drop leftover wrappers

* fix(mobile): type the structured sends mock, drop the moved queued-cards path and ship queued edit copy at boot

* fix(native-chat): drop the queued card's unused image-label import after the rebase

* fix(mobile): order the phone's queue reorder preview by position, as the shared cards sort

* test(mobile): keep the queued-messages test within its line budget

* fix(mobile): settle terminal chat working state and turn timing with desktop's rules

Move desktop's live-status merge, Stop suppression, hook-state resolver and
terminal turn timing to src/shared/native-chat. Mobile reads the transcript
lifecycle the host already sends, so a provider turn end settles Working the
same way desktop does. Terminal chats now get the turn bar, timer and folding,
and the streaming preview uses the shared deriveNativeChatStreamingText.

* fix(mobile): send desktop's terminal Stop keys, a second Escape only for OpenCode

Desktop sends one Escape on Stop. It adds a paced second Escape only for
OpenCode, which confirms an interrupt that way. Claude Code and Codex read
Esc-Esc at an idle prompt as rewind. The rule moves to
native-chat-agent-support, and the phone now paces the second Escape at
desktop's answer step instead of 80ms.

* fix(mobile): word Orca-stop and usage-limit notices like desktop

Move desktop's Orca-stop sentences to src/shared with an English table that
desktop translates. The phone names the Orca host it pairs with, and when
that host is unnamed it says "the remote server". Usage-limit rows rebuild
desktop's sentence from the failure fact. The usageLimitLineText fallback,
which only the phone used, is deleted.

* test(mobile): pass the overlay's host name in the prompt controller harness

* test(mobile): re-record Stop goldens at desktop's step, split status-notice tests, pin the turn clock and ship notice copy at boot

* fix(mobile): offer structured Stop while a send is out and read queue-sends-next as working

Move desktop's structured Stop rule, its Stop-joining helpers and the
queue-sends-next rule to src/shared. Both sides now use them. The phone
counts its in-flight sends, so a conversation-stop host offers Stop before
the turn opens. Between queued turns the phone reads as working, and
commands that can't wait in line hold like they do on desktop. Untargeted
Stops are no longer joined on legacy hosts.

* fix(mobile): offer terminal Stop again when its Escape went nowhere

Stop hides Working on the phone like it does on desktop. The phone's Escape
can fail outright, though, while desktop writes to a local PTY. When no Escape
could have landed, the phone now drops that suppression. The streaming preview
also treats a pending echo as the transcript's tail, as desktop does, so an
earlier reply can't hide a new preview.

* fix(mobile): hold structured Stop while a send it covers is in flight

On desktop, Stop's held and Stopping state depends on whether the chat can
stop, and that includes a send still in flight. The phone now does the same.
Once Stop is pressed before the turn opens, the button holds and repeated
presses send no more untargeted cancels.

* fix(mobile): end the terminal Stop hold when a new message is sent

Desktop clears Stop's working suppression on an optimistic send, so a new turn
that keeps the same hook epoch (Claude with working subagents) still offers
Stop. The phone now does the same when a new pending echo appears.

* refactor(mobile): trim chat turn wiring after the desktop rule move

Drop the controller's unread nativeChatAgentWorking field. Re-render only when
a chat starts or stops having a send out. Keep the structured turn indicator
stable across stream frames. Type the Stop test table instead of casting.

* refactor(mobile): track structured sends in flight once for Stop and command holds

* test(mobile): re-record Stop goldens now that Stop settles with its Escape delivery

* fix(mobile): escape terminal image paths like desktop drops

* fix(mobile): keep launch-draft prefill over older user turns

* fix(mobile): rank @ file matches with desktop's fuzzy Quick Open search

* fix(mobile): use desktop's composer triggers for mid-prompt / and $ picks

Picked @ files are now quoted when the path has spaces.

* fix(mobile): send picked skill paths on structured chats

* fix(mobile): list the host's disk-scanned skills in the / and $ menus

The phone names the workspace and the host resolves its folder, refusing SSH
workspaces as desktop does; hosts without skills.discover-workspace.v1 list none.

* fix(mobile): forget a picked skill once its token is deleted

* fix(mobile): drop a picked skill as soon as its token is deleted, and retry failed skill scans

* fix(mobile): treat a picked leading skill as chat and stop failed skill scans from refiring

* test(mobile): drop the menu ranking case the shared picker tests own

* refactor(mobile): keep skill picks on the draft record and reuse shared send rules

A rejected send now keeps its picks and leading-skill origin on both send paths.

* fix(mobile): replace a re-picked skill's file and restore picks with a rejected send

* fix(mobile): read the chat agent for the skill catalog from the active resolution

* style(native-chat): format the composer autocomplete files

* fix(native-chat): import the picker's apply and send-classify rules from the shared composer module

* refactor(mobile): import the composer's draft-store hooks once

* style(mobile): format the notice row's style import
2026-10-27 15:34:56 +00:00
OrcaWinandOrcaWin beb62feef1 test: remove 25 low-value tests and redundant parity suite (#34443)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-27 08:28:06 -07:00
Neil 16a29bc2fe refactor(pty): group IPC test harness and provider fixtures (#34440)
* refactor(pty): colocate IPC test fixtures with PTY owners

* test: exclude PTY test constants from credential source census
2026-10-27 08:26:26 -07:00
OrcaWinandOrcaWin c98a2d639c test: remove 19 low-value runtime file and Jira tests (#34436)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-27 08:03:05 -07:00
Kelvin Amoaba f776923c04 fix(mobile): use desktop's rules for chat tool rows, pending echoes and session option picks (#33977)
* fix(mobile): resolve terminal chat agents in desktop's order

Mobile now uses the shared detected-then-launch precedence and transcript-readability check; the phone's remembered agent only fills in after them.

* fix(mobile): hide Codex foreground commands from the background-task strip

* refactor(native-chat): share diff-card gutter, basename and task count

* fix(mobile): show clipped tool output sizes in KB/MB like desktop

* refactor(native-chat): share the tool-run header rules with mobile

* fix(native-chat): share tool-line detail rules; skip unsafe-only search hits

* fix(mobile): copy message text with desktop's rule

Copy now leaves out roster and background-task fallback twins and wordless provider frames.

* refactor(native-chat): memoize shared tool-line view and output sizes; share result preview

* fix(native-chat): read a lone result's preview from its narrowed body

* chore(i18n): ship chat tool and stop copy in the runtime English catalog

* refactor(native-chat): move the pending-send echo rule to shared

Mobile reuses it instead of its own matcher.

* fix(mobile): match chat echoes after their send boundary, sink unmatched ones

Uses desktop's rule: rows before the send no longer retire an echo, a send that
never lands no longer lets later glued sends retire, and an unmatched echo sits
below later turns.

* fix(mobile): keep glued photo captions and folded boundaries in echo matching

* fix(mobile): give image preview echoes the send time the occurrence rule reads

* fix(mobile): match echoes on image-normalized rows and cap open sends at eight

Same input and bound as desktop; each open send rescans the transcript.

* test(mobile): drop a pending-order case the tail test already covers

* refactor(mobile): read the send boundary once and skip echo normalization when idle

* test(native-chat): type the occurrence case's pending send

* test(mobile): drop the pending-echo wall-clock entry from the flaky-test baseline

* refactor(native-chat): share session option labels with mobile

Mobile's options pill now shortens effort levels (Med, XHigh, Min) and names
choices and options the way desktop does, from one English table that desktop
translates.

* refactor(native-chat): run mobile terminal chat options on the desktop surface

The terminal-chat option surface, its appliers, the option cache and the
dispatch types move to src/shared, and the phone builds its pickers from them.
Grok and every other agent with a catalog now get model and effort pickers on
the phone, picks are saved as the host's launch defaults, the OMP live switch
gate and discovery mapping come from one copy, and authoritative discovery
retires persisted models it no longer lists. The option stamp moves to shared.

* refactor(mobile): merge the session option type imports

* fix(mobile): keep terminal chat option picks on their own chat

The phone keeps one option surface per chat, so a pick that lands after leaving
and returning shows there, and a picker command only switches the chat it came
from. Discovered models merge with the seed catalog as on desktop, so Grok keeps
its effort picker. A Claude model switch the phone cannot confirm is never
saved as a launch default.

* fix(mobile): start terminal chat options over when a tab changes agent

A tab that runs another agent drops its kept option surfaces, report markers
and cached record, so a fresh session shows its own model. A pick that lands
after the phone moved to another chat is not saved as a launch default.

* fix(mobile): fence retired terminal chat option surfaces

A write that lands after its tab started another agent no longer publishes the
old agent's record, and a changed OMP switch capability rebuilds the chat's
surface from the cache instead of reviving an older one.

* refactor(native-chat): simplify the shared session option wiring

Desktop translation pieces use literal English defaults so the localization gate can read them, the selected-choice lookup is shared once, and the phone keeps one option surface per tab with the agent change detected from the cached record.

* refactor(mobile): return no option surface for an agent without a catalog

* test(native-chat): expect the shared Effort label in the startup picker test

* test(native-chat): keep only the label cases main still checks after the rebase

* refactor(native-chat): import the session option snapshot rules once in the PTY option surface

* refactor(native-chat): share structured option pick bookkeeping with mobile

Desktop and the phone now track picks per option through one shared book: a
repeat of an option on its way waits, other options go together, a lost reply
is not a pick done, and a stale reply only commits its own option. The phone
also re-reads options each turn and after the provider starts, and shows picks
at once while the host is still starting the provider.

* refactor(native-chat): share the option pick blocking rule

* fix(native-chat): read in-flight option picks from the shared book for launch send options

* fix(native-chat): keep the structured options hook within its line budget and pass the phone turn in the e2e harness
2026-10-27 15:00:27 +00:00
OrcaWinandOrcaWin dc57b3d6e8 test: remove 61 low-value runtime tests and five suites (#34431)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-27 07:30:16 -07:00
Kelvin Amoaba cb511d769e fix(native-chat): list an idle Claude chat's / commands from the account it will start on (#34429)
* fix(native-chat): list a resting Claude chat's / commands from the account it will start on

A resting chat's next start follows the selected Claude account, but its / menu was read from the account saved when the chat was created. Read it from the same account a new chat would be created on, and rescan when the selection changes.

* refactor(native-chat): resolve the at-rest account in the shared catalog so its key matches the scan

* test(native-chat): build the second at-rest chat record from a lease fixture
2026-10-27 14:21:12 +00:00
OrcaWinandOrcaWin 7c921b0dcc test: remove 81 low-value tests and five replay suites (#34426)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-27 07:08:41 -07:00
Kelvin Amoaba f61e7f8bfe fix(browser): stop malformed localhost pages from freezing the new tab page probe (#34427)
The title and icon-link regexes rescanned the rest of the body from every
unclosed opener, so a 192 KB page of repeated '<link ' or '<title>' blocked
the main or runtime event loop for seconds. Scan tags forward only.
2026-10-27 13:50:25 +00:00
Kelvin Amoaba b0ad924dc9 fix(browser): keep the Annotate pick armed when a page rewrites its URL fragment (#34423) 2026-10-27 13:36:38 +00:00
OrcaWinandOrcaWin 89dea213df test: remove 43 low-value tests and five replay suites (#34417)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-27 06:16:34 -07:00
Kelvin Amoaba c903d30283 fix(mobile): build the Source Control action sheet from desktop's menu rows (#34047)
* fix(mobile): build the Source Control action sheet from desktop's menu rows

Adds Force Push and desktop's order, enable rules and hints.

* fix(mobile): rebase from desktop's effective base and keep the Force Push warning in the action sheet

* fix(mobile): keep the rebase row's base when the branch compare fails

* fix(mobile): keep upstream compares working when the default base lookup fails

* fix(mobile): keep the rebase target apart from the branch compare so failed or unsupported compares keep it

* fix(mobile): leave force pushes to desktop when the linked review has its own push target

* refactor(mobile): rebase onto the shown base and share the force-push block with the primary action
2026-10-27 13:13:25 +00:00
27a8963806 fix(windows): probe fnm's real default alias dir for Node fallback (#11359)
* fix(windows): probe fnm's real default alias dir for Node fallback

On Windows, fnm stores the default alias under FNM_DIR, else
%APPDATA%\fnm (legacy ~\.fnm), and node.exe sits directly in
aliases\default with no bin subdir. Probe those dirs and append them to
PATH so fnm's default only backfills a missing Node instead of shadowing
an inherited one.

Fixes #11356

Co-authored-by: niceSprite <16523864+iFwu@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>

* test: keep onTestFinished callbacks returning void

---------

Co-authored-by: Neil <neil@stably.ai>
Co-authored-by: Claude <noreply@anthropic.com>
2026-10-27 06:08:14 -07:00
Kelvin Amoaba 62d9eb635b fix(browser): keep annotation badges when a page updates its URL fragment while scrolling (#34267)
Scroll-spy pages rewrite the URL fragment with history.replaceState as
you scroll. The webview navigation handlers and setBrowserPageUrl treated
those same-document updates as a new document, retiring saved-note
badges and cancelling an open comment card. Fragment-only in-place
updates now keep the geometry; document navigations and in-place route
changes (path or query) still retire it, and the store no longer guesses
document boundaries from URL changes.
2026-10-27 13:00:54 +00:00
BingZandNeil d2cc9e72a2 docs(cli): document that terminal send --text writes control bytes verbatim (#14037)
Without --enter, --text reaches the PTY unmodified, so integrators can send
Escape or Ctrl+U directly. With --enter and without --interrupt, prompts to a
recognized running agent are bracketed-pasted and embedded Escape is made inert.

Fixes #14032

Co-authored-by: Neil <neil@stably.ai>
2026-10-27 05:57:55 -07:00
6dc9ff40d5 fix(acp): report exit status and keep stderr as a log detail (#33190)
An unexpected ACP agent exit reported only the whole-run stderr tail, so a
startup warning read as the cause, and the observed exit code/signal was
dropped. Add the exit code or signal to the ended reason and Details, file
the stderr tail as a log diagnostic like the Claude and Codex lanes, and
read the exit status from ManagedProviderProcess.exitStatus through a
shared formatter that Claude reuses.

Fixes #33035

Co-authored-by: Brennan Benson <79079362+brennanb2025@users.noreply.github.com>
Co-authored-by: Neil <neil@stably.ai>
2026-10-27 05:57:48 -07:00
Neil 4583236a24 refactor(renderer): group Jira task creation and summary modules (#34413) 2026-10-27 05:54:38 -07:00
NeilandMatheus Breguêz 342b5357dc fix(renderer): keep render-phase guards in state so discarded renders revert them (#34414)
QuickCommandsPane, useAddRepoCloneFlow, UntitledFileRenameDialog and the
workspace board column resize hook guarded a render-phase setState with a
ref written in the same render. When a sibling suspends, React discards
that render and its queued updates but keeps the ref write, so the retry
skipped the adjustment (no Add dialog, empty clone destination, stale
save-as name, stale column width). Track each guard in state instead, and
sync the column-resize handler refs in a layout effect.

The other two sites from the issue (WorktreeMetaDialog prevIsOpenRef and
use-native-chat-draft lastScopeKey) no longer exist on main: the dialog
remounts a keyed draft and the chat draft reads via useSyncExternalStore.

Fixes #25527

Co-authored-by: Matheus Breguêz <matbrgz@gmail.com>
2026-10-27 05:52:30 -07:00
Théophile DiotandNeil 9631d46a39 fix(jcode): append Orca hooks to user-defined hook arrays in config.toml (#33999)
Jcode accepts a string or an array of strings per hook event, but Orca's
[hooks] parser only understood single-line strings, so any array made
status and install report error and no hook was written.

Parse string arrays, append Orca's command as the last element (after the
user's pre_tool gates), repair a stale Orca element in place, collapse
duplicate managed elements on reinstall, and remove only Orca's element on
uninstall. Edits are offset splices on the original text, so user entries,
comments and layout survive; malformed or non-string arrays still fail
closed.

Fixes #33998

Co-authored-by: Neil <neil@stably.ai>
2026-10-27 05:52:14 -07:00
erishandNeil d08aa8f1fb fix(native-chat): show Codex compaction markers in transcripts (#14765)
Codex paginated rollouts persist an item_completed ContextCompaction item
with no content, and legacy rollouts persist an event_msg context_compacted.
The Codex decoder dropped both, so the native Chat timeline never showed
that context was compacted. Emit a system row with the shared compaction
copy and presentation so it renders as the compaction divider.

Fixes #14188

Co-authored-by: Neil <neil@stably.ai>
2026-10-27 05:52:02 -07:00
Frederic BarthelemyandNeil 5666ad4a84 fix(editor): only let a line-start <details> interrupt a paragraph (#19800)
The details tokenizer's start hook matched any `<details` substring, so
marked cut a paragraph at a `<details>` mention inside inline code and its
HTML-block rule swallowed the rest, rewriting the file on save. HTML blocks
open only at a line start, so anchor the hook there.

Fixes #19799

Co-authored-by: Neil <neil@stably.ai>
2026-10-27 05:51:51 -07:00
OrcaWinandOrcaWin 0ddc7fced5 test: remove 21 low-value tests and a catalog suite (#34411)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-27 05:51:08 -07:00
mmarabelandNeil ad4b814018 fix(orchestration): drop the subshell parens from typed setup commands (#22537)
The observed (`worker-start --setup run`) and sequenced (`wait-for-setup`) setup
commands are typed into the user's interactive shell. Pair-inserting line
editors such as zsh-autopair rewrite the `( ` of the `( bash runner )` wrapper
into `(  )`, so bash -lc receives a stray `)` and rejects the whole line: setup
never runs, no completion marker is printed, and the worker stays at
setup_state: running (or the agent gate waits out its timeout).

The runner command is always a single external command (bash/cmd.exe/
powershell.exe), so the subshell added nothing; run it directly.

Fixes #18059

Co-authored-by: Neil <neil@stably.ai>
2026-10-27 05:41:00 -07:00
5b9073344a fix(terminal): detect Codex footer when shortcut help sits under the status row (#24338)
Codex can render a separate `? for shortcuts` row below its status row. The
composer classifier returned on the first nonblank bottom row, so it never
examined the real status row above the hint and the IME placeholder mask
never activated, leaving the placeholder beside composing text.

Fixes #24337

Co-authored-by: Neil <neil@stably.ai>
Co-authored-by: Andy Zhang <16486422+v01dstar@users.noreply.github.com>
2026-10-27 05:30:24 -07:00
OrcaWinandOrcaWin e11b8ac37e test: remove 49 low-value cases and four suites (#34407)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-27 05:25:04 -07:00
Neil b35fb1ccfb fix(orchestration): route dispatched workers to the skill and stop heartbeat loops before worker_done (#34404)
The orchestration skill description only advertised coordinator work, so a
dispatched worker never loaded it and built its heartbeat loop from the
preamble alone. Neither the preamble nor the guide said to stop a background
heartbeat loop before worker_done, so the loop outlived the task.

Add worker-role triggers (heartbeats, ask, worker_done) to the description and
stub, and tell workers in the preamble and guide to restart an expired
heartbeat loop mid-task and stop it before worker_done.

Fixes #26605
2026-10-27 05:12:22 -07:00
Seiji KoharaandNeil 9b0170cbfa fix(i18n): localize hosted review creation errors (#33368)
Main now tags each Orca-authored PR/MR create failure with a reason code
(the English error is unchanged for mobile, older clients and logs), and
the renderer maps the reason to translated copy in the Source Control
notice, the Checks panel and the pre-create blocked notice. Sign-in steps
are single-sourced across providers.

Fixes #33321

Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
2026-10-27 05:02:01 -07:00
OrcaWinandOrcaWin 0f76063ce6 test: remove 70 low-value cases and four suites (#34400)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-27 04:58:01 -07:00
70d81598b0 fix(i18n): localize sidebar copy and correct Japanese mistranslations (#28921)
Route hardcoded sidebar strings (cache timer, delete-worktree dialog,
imported-worktrees line, remote file browser, setup-script prompt, card
agents/ports/status, add-repo busy labels, batch action menus) through
i18n keys, and fix literal-sense Japanese translations in ja.json.

Co-authored-by: Koji Miyazawa <24467062+kojikojikojikoji@users.noreply.github.com>
Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
2026-10-27 04:56:46 -07:00
Takuya AkiyaandNeil 176852ad5a fix(terminal): highlight the active IME conversion range (#27903)
Japanese IMEs convert one clause at a time, but the terminal's preedit overlay
painted the whole composition uniformly, so the clause the candidate window
targets was invisible. Read the IME's selection from xterm's textarea on the
insertCompositionText input event (Chromium only updates it there) and paint
that range of the preedit in the theme's selection colors. Cell-grid advance
corrections are unchanged and nothing reaches the PTY; a collapsed caret or a
range outside the preedit highlights nothing.

Fixes #27873

Co-authored-by: Neil <neil@stably.ai>
2026-10-27 04:51:06 -07:00
Neilandkambarakun d69d16a3fa fix(agent-dashboard): restore focus to the opener when the drawer closes (#34398)
The store-driven Agents drawer has no Radix trigger, so dismissing it with
Escape or the close button dropped focus to document.body. Capture the
focused element on each open transition and return focus to it on close,
unless focus already moved elsewhere or the close hands focus off (outside
pointer dismissal, agent reveal, switching to the pop-out).

Co-authored-by: kambarakun <kambarakun@gmail.com>
2026-10-27 04:39:50 -07:00
OrcaWinandOrcaWin 0e871e8108 test: remove18 low-value settings cases and an auth-warning suite (#34394)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-27 04:36:17 -07:00
Neil bd88b2acea fix(orchestration): resolve worker-start new-child/new-top-level targets without requiring a managed caller worktree (#34388)
`orca worker start --worktree new-top-level --repo <selector>` no longer
requires the dispatching terminal to sit inside a managed git worktree; the
explicit repo is all a top-level worktree needs. new-child (and
new-top-level without --repo) still need a caller worktree, and now fail
with an actionable invalid_argument error before any effects are recorded
instead of a bare selector_not_found.

Fixes #22345
2026-10-27 04:28:58 -07:00
OrcaWinandOrcaWin ffed50d6d3 test: remove 48 low-value presentation cases and four suites (#34386)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-27 04:14:14 -07:00
Neil 295ed991dd refactor: group shared native-chat session options (#34356) 2026-10-27 04:14:07 -07:00
Neil 9f5c32b0d1 fix(kiro): manage status hooks in agent configs kiro-cli agent upgrade rewrote (#34385)
kiro-cli agent upgrade (and Kiro CLI 3.0) turns an agent's hooks into a
list of {name, trigger, matcher, action, timeout}. Orca rejected that shape,
so status reported an error and on/off left the files untouched. Orca now
refreshes its list entries in place, appends missing ones, removes only its
own on off, and writes the list form into upgraded agents that have no hooks
yet so they stay in the universal format. The remote installer shares the
same path.

Fixes #34194
2026-10-27 04:08:12 -07:00
Neil c2b4819ec0 fix(wsl): re-read a settled exit only from a probe started after the window (#34374)
* fix(wsl): start no running-distro read inside the stop settle window

settledStartedAfter slept with one setTimeout until the settle anchor. Node truncates timer
delays to whole ms against a ms loop clock, so the wake can land up to ~2ms before the anchor
by performance.now(), and the probe then started inside the window and could still see the
stopping distro as running. That is the hook relay stop-settle flake ("expected true to be
false"). Sleep until performance.now() has passed the anchor.

* test(wsl): spy on setTimeout without a type assertion

* test(wsl): fire the spied timer far early so a single sleep always fails

* fix(wsl): re-read a settled exit only from a probe started after the window

After a watch or holder exit, the liveness supervisor slept EXIT_SETTLE_MS and re-read the
running list with no bound, so it could join a list probe that started inside the settle
window and still listed the stopping distro. The re-read now passes the exit time, and the
wiring reads through the gate's settledStartedAfter with exit + EXIT_SETTLE_MS as the bound.
2026-10-27 03:55:25 -07:00
Seiji KoharaandNeil 2327180d12 feat(quit): add Quit and Stop All Sessions to the app menu and tray (#32153)
* feat(quit): add Quit and Stop All Sessions to the app menu and tray

Quit keeps daemon sessions alive for warm reattach. The new item, placed
directly above Quit in the macOS app menu and menu bar icon, the Windows
File menu and tray, and the Linux File menu, asks for confirmation, runs
Settings' Kill all sessions in the renderer, and quits only when every
session stopped. Closing the tabs first means nothing reopens or resumes
on the next launch. Serve hosts do not offer the item.

* fix(quit): keep Orca open when Kill all cannot prove every session stopped

- Kill all no longer reads a daemon generation that failed to list as
  "no sessions": a failed poll keeps the last confirmed remaining set,
  and a failed initial listing sets listingIncomplete.
- Quit and Stop All Sessions stays open on an incomplete listing or a
  terminal tab opened during the sweep, logs why it stayed open, and
  reveals the window before the final quit.
- Share the main-window message box helper, stub the request on the web
  client, and add Portuguese strings.
- Cover the windowless path, request expiry, the in-flight guard, and
  failed listings in tests; bound the E2E exit wait.

* fix(terminal): count Kill all per daemon generation within a time window

- A poll updates only the daemon generations that answered, so one
  failing generation no longer hides the kills of the others.
- Poll for 6.5 s of wall-clock time instead of 65 attempts, because a
  wedged generation fails each listing only at the request timeout.
- Flag a sweep with no daemon provider as listingIncomplete.
- Log the leftover-tab exit, share the one-shot window intent with
  Open Settings, and cover the sender check, the reveal before the final
  quit, and retries in tests.

* fix(quit): stay open while a newer build's daemon is held

- Set listingIncomplete while this build holds a newer protocol's
  daemon, whose sessions it can neither list nor stop.
- Reuse getDaemonAdapters in Kill all, type the shared one-shot helper
  by its flag factory, and move the app-menu quit handlers next to the
  tray options so both serve/desktop splits are tested.
- Cover a quit that outlasts the request expiry and a failed request
  pull, and fix the docs lead-in for the new quit-time case.

* fix(quit): explain, without stopping anything, while a newer version runs terminals

- Check the newer-version daemon hold before the confirmation and show
  an explanation instead, so Kill all no longer closes every tab and
  then refuses. listingIncomplete stays as the backstop.
- Translate the explanation, describe listingIncomplete generically,
  and assert the single timed-out poll in the Kill all test.

* fix(quit): explain before asking whenever Kill all cannot list every session

- Show the explanation instead of the confirmation while the daemon
  provider is missing (still starting or failed) as well as while a
  newer version's daemon is held.
- Name only the steps that work (wait for terminals to open, reopen a
  terminal opened in a newer version), avoid stating a hold as fact, and
  label the dialog's button through the catalog.

* fix(quit): add the relaunch step to the explanation and align the ja wording

* test(pty): keep a confirmed stop when its generation fails a later poll

* test(quit): give the E2E timeout bump its reason

* fix(quit): stay open when the daemon still lists a session after Kill all

Kill all counts only the sessions of its first listing, so a session
started since then, for example from the CLI or an automation before its
tab reaches the renderer, would outlive the quit. Main now lists every
daemon generation again before quitting, and quits only after a listing
in which every generation answers and none lists a session. It polls
within Kill all's 6.5 s window so the tab sweep's PTY shutdowns can
finish; otherwise the renderer shows the existing error and Orca stays
open.

ui:quitAfterStoppingAllSessions becomes an invoke that answers whether
main quits.

* feat(quit): rename to Quit Completely with a macOS hover hint, and explain plain Quit in the confirmation

* fix(quit): show progress while Quit Completely runs, and refuse at once when the daemon can't be fully listed

---------

Co-authored-by: Neil <neil@stably.ai>
2026-10-27 03:52:06 -07:00
OrcaWinandOrcaWin 1b86ad9f95 test: remove 44 low-value settings cases and four suites (#34379)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-27 03:50:48 -07:00
OrcaWinandOrcaWin acdb9b4fe8 test: remove 35 low-value permission and search cases (#34375)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-27 03:33:48 -07:00
Neil 71f0c74d9e fix(wsl): start no running-distro read inside the stop settle window (#34372)
* fix(wsl): start no running-distro read inside the stop settle window

settledStartedAfter slept with one setTimeout until the settle anchor. Node truncates timer
delays to whole ms against a ms loop clock, so the wake can land up to ~2ms before the anchor
by performance.now(), and the probe then started inside the window and could still see the
stopping distro as running. That is the hook relay stop-settle flake ("expected true to be
false"). Sleep until performance.now() has passed the anchor.

* test(wsl): spy on setTimeout without a type assertion

* test(wsl): fire the spied timer far early so a single sleep always fails
2026-10-27 03:29:12 -07:00
OrcaWinandOrcaWin 184748c3fd test: remove 66 low-value cases and four suites (#34370)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-27 03:17:27 -07:00
e49cab0a92 fix(workspace-board): paired hosts keep their own custom status columns (#34362)
* fix(workspace-board): paired hosts keep their own custom status columns

A desktop client grouped a paired host's workspaces with its local column
list, so cards in host-only columns (e.g. status-6) fell back to the default
column. Fetch each host's workspaceStatuses via the existing ui.get RPC and
merge them after the local columns for grouping, without persisting them.

Fixes #34227

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(workspace-board): keep paired host columns safe from local column edits

- Removing a local column resolves cards against the merged board list, so a
  host card in a host-only column is never rewritten.
- New column ids are unique against the merged list, not just local ones.
- The context menu status submenu and the closed-sidebar order use the merged
  columns too; the shared-status helper moves to the menu policy module.
- A host that sends no columns adds none instead of the defaults; identical
  replies keep the stored identity and out-of-order replies are dropped.
- The merged list is named boardStatuses and tolerates stores without the
  host fields, so the earlier WorktreeList fixture edits are reverted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(workspace-board): keep host cards whose host still defines a removed id

Removing a local column whose id a paired host also defines rewrote that
host's cards to the local fallback. Skip runtime-host cards when their own
host still has the column.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(workspace-board): keep host column ids in the composer and drop a retired host's columns

Creating from a host-only lane now keeps that column's status, a host that is
removed or re-paired to another machine no longer leaves its columns behind,
and the new tests use checked fixtures instead of casts.

Co-authored-by: Kooooojun <edisonhuang1122@gmail.com>

* fix(workspace-board): deliver a host's workspaceViewChanged so its columns refresh

Co-authored-by: Kooooojun <edisonhuang1122@gmail.com>

* fix(workspace-board): show and offer a paired host's columns only for that host's cards

The board adds a host's column only when one of that host's own cards uses it,
never the host's copy of the default column, so local cards keep falling back
to the local list. The context menu offers host columns only when every card
is on that host, the composer applies a lane's host column only when creating
on that host, and status writes drop another host's column id.

Co-authored-by: Kooooojun <edisonhuang1122@gmail.com>

* fix(workspace-board): read cards through the record selectors and skip foreign-lane drops

Board lanes and the context menu now leave out a host's copy of the default
column, so a host card's menu matches its lane. Lanes skip the card scan when
no host adds a column. A drop into another paired host's lane is ignored
instead of re-ranking the lane.

Co-authored-by: Kooooojun <edisonhuang1122@gmail.com>

* fix(workspace-board): sync tasks against every offered column and test host-lane drops

Task-status sync now finds a paired host's column that no card uses yet, as the
card's menu offers it. A write left empty after dropping another host's column
is skipped. New tests cover board and sidebar drops into a host-only lane.

Co-authored-by: Kooooojun <edisonhuang1122@gmail.com>

* fix(workspace-board): resolve host columns by runtime owner and compare mixed selections per card

A paired host's SSH workspace, which the host's runtime owns, now gets that
host's columns like its other cards. A mixed selection marks and moves each
card against its own host's columns. A status write for a card the store does
not know yet passes through unchanged.

Co-authored-by: Kooooojun <edisonhuang1122@gmail.com>

---------

Co-authored-by: Kooooojun <edisonhuang1122@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 03:02:14 -07:00
Neil 325ab0d886 fix(projects): register a folder once when two adds race on a server (#34303)
* fix(projects): register a folder once when two adds race on a server

A paired server's repo.add looked for an existing project, then awaited icon
and upstream detection before saving. Two adds of the same new folder both
passed the check and saved it twice. Re-check right before saving, as the
desktop's local add already does.

Part of STA-12331.

* refactor(projects): reuse the add's store when adopting an existing project
2026-10-27 03:01:27 -07:00