You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(native-chat): move the cursor to the composer after Add to chat - #39845
If you highlight text in a chat reply and click "Add to chat", the quote goes into the chat box, but the typing cursor stayed where it was, so you had to click the box before you could type. The "Add to chat" bubble was still open when the app tried to move the cursor, and the app doesn't move the cursor while a popup is open. The bubble now closes first, and the cursor ends up in the chat box ready for typing.
What Changed
Before: clicking "Add to chat" on a text selection put the quote in the composer but left focus outside it. Keystrokes went nowhere until you clicked the composer.
After: the quote is added and the cursor sits in the composer under it, as #26018 originally described.
Mechanism:focusMountedNativeChatEditor returns early while getOverlayFocusOwners() is non-empty. That gate was added in #37403. The button in SelectionAddToChatPopover called onAdd first and setRequest(null) after it, so the popover's role="dialog" content was still mounted with data-state="open" during the chain appendText -> writeNativeChatComposerText -> focusMountedNativeChatEditor, and the popover blocked focus for its own action. The handler now:
reads the button rect,
unmounts the popover with flushSync(() => setRequest(null)),
calls onAdd(text, rect).
The popover content is rendered conditionally, so it unmounts right away and leaves no open node behind during an exit animation. The markdown preview uses the rect to place its menu. The rect is read before the popover closes, so that menu still opens in the right spot.
Why
Adding a quote is almost always followed by typing a reply. The right-click "Add to chat" path (use-native-chat-context-menu.tsx) was already fixed this way in #37403: flushSync the close, then append. This change reuses that order instead of adding a second focus path. We considered marking the popover as a non-owning surface with data-focus-behavior and rejected it. That attribute is meant for page lists and editor suggestions, and closing first also matches what the user sees.
N/A. Nothing on screen changes except where the text cursor ends up after the click. Tests cover this directly: the regression test checks the real overlay-focus gate, and a probe checks where document.activeElement lands (see Testing).
Testing
Reproduced on main: I ran the new test against origin/main source. It fails at NativeChatSelectionQuote.test.tsx:114 with the open popover (data-slot="popover-content" role="dialog") reported as a focus owner (1 failed, 7 passed).
Independent probe: this one renders the popover with a contenteditable composer and calls the real focusMountedNativeChatEditor from onAdd. On main, document.activeElement is <body>. With this change, focus lands in the composer, and onAdd runs once and receives a DOMRect for both mouse and keyboard activation.
With this change:selection-quotes passes 8/8. The neighboring suites (native-chat quote focus, selection quote draft, markdown preview) pass: 17 files, 76 tests.
Static checks:oxlint, oxfmt --check, the anti-slop, native-plugin and ast-grep gates, and the changed-code quality gate are all clean on the touched files.
Platforms: tested on macOS only. The change is renderer-only, with no platform-specific code and nothing that touches SSH/remote, mobile, or folder workspaces.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Risk
The riskiest part is the markdown preview, which shares this popover and opens a menu at the button's position from onAdd. Because the rect is read before the close, the menu keeps its position. If that broke, the menu would open in the wrong place. The change is renderer-only, with no saved data, settings, or remote protocol changes. A plain revert backs it out.
Level: Low
Review
Original fix by @manuelmeurer in #39845. It was squashed onto current main with no code changes and authorship preserved.
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
I stated the risk: what could break, for whom, and how to back it out
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
The reason will be displayed to describe this comment to others. Learn more.
🟢 Approval recommended
The selection-popover focus fix has no active review issues.
No open issues 🎉
What changed in this PR
Fixes #39844 by closing the selection popover before adding a quote, allowing the native-chat composer’s existing focus logic to place the cursor below it.
Changes:
Synchronously closes the popover before calling onAdd.
Captures the button’s position before closing to preserve markdown preview menu placement.
Adds a regression test checking that no overlay owns focus when the composer receives the quote.
The add-to-chat click handler captures the button bounds and synchronously clears the request before calling onAdd with the selected text and bounds. A regression test checks that getOverlayFocusOwners returns an empty list during appendText.
Severity of issue fixed: Medium
Merge Risk: Minimal · previous review b6218
The popover now closes before adding the quote. An end-to-end focus test is recommended, but no merge-blocking defect was found.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
The title names the main change: after Add to chat, the cursor moves to the composer. It follows the conventional commit form and names the affected area (native-chat). The raw summary and objectives …
Description check
The description follows the repository template closely. It includes ELI5, What Changed, Why, Linked Issue (Fixes #39844), Visual Proof, Testing, Risk with a level, AI Disclosure, the agent skill boun…
Linked Issues check
Issue #39844 requires that "Add to chat" on selected text appends the quote and leaves the cursor on the blank line below it. The cause is the open SelectionAddToChatPopover (role="dialog") acting as …
Out of Scope Changes check
The whole-PR diff (merge base ba04481 to head b621881) touches two files. SelectionAddToChatPopover.tsx adds the flushSync import and reorders the close and onAdd calls. It also captures the b…
Docstring Coverage
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Full details: Title check
Explanation
The title names the main change: after Add to chat, the cursor moves to the composer. It follows the conventional commit form and names the affected area (native-chat). The raw summary and objectives both describe a focus fix for the Add to chat flow, which matches the title.
Full details: Description check
Explanation
The description follows the repository template closely. It includes ELI5, What Changed, Why, Linked Issue (Fixes #39844), Visual Proof, Testing, Risk with a level, AI Disclosure, the agent skill boundary checkbox, Notes, and Checklist. It explains the before and after behavior, the mechanism, and the alternative it rejected. The author did not attach a before and after visual, and gave a reason in the Visual Proof section. That reason is weak for a focus-behavior change, but the section is filled in, so the gap is minor. The Checklist leaves the screenshot item unchecked while the Visual Proof section gives a reason, which is a small inconsistency.
Resolution
Optional: attach a short before and after video of the cursor placement, or tick the screenshot checklist item consistently with the Visual Proof section's reason.
Full details: Linked Issues check
Explanation
Issue #39844 requires that "Add to chat" on selected text appends the quote and leaves the cursor on the blank line below it. The cause is the open SelectionAddToChatPopover (role="dialog") acting as an overlay owner while onAdd calls composerRef.current?.appendText(...), so the composer's focus call is skipped. In SelectionAddToChatPopover.tsx, the onClick handler now reads the button rect, then runs flushSync(() => setRequest(null)) to close the popover before onAdd(request.text, button) runs. This follows the order the issue cites from the right-click path. The new test in NativeChatSelectionQuote.test.tsx records getOverlayFocusOwners() inside the appendText mock and asserts it is empty, which checks the focus gate condition directly. Limits: I did not run the test, and I did not confirm the runtime focus result in a live app. The source evidence supports the fix, so the result is PASS.
Full details: Out of Scope Changes check
Explanation
The whole-PR diff (merge base ba04481 to head b621881) touches two files. SelectionAddToChatPopover.tsx adds the flushSync import and reorders the close and onAdd calls. It also captures the button rect before the close, and the captured value is passed to onAdd, so the markdown preview menu keeps its position input. NativeChatSelectionQuote.test.tsx adds the getOverlayFocusOwners import and one regression test for #39844. No unrelated code, configuration, or other files changed. The new comment is a Why note for the focus gate. Every change connects to the linked bug.
Full details: Docstring Coverage
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
The mock checks overlay ownership, but it cannot detect a failure to focus the composer or place the caret after the quote. Add a test with a real composer that clicks the popover and checks the quote, focus and caret position. The existing focus test covers the separate context-menu path.
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: f11f8c18-1576-4c00-a5e2-8d48360c5a53
Commits
Reviewing files that changed from the base of the PR and between 2a5a939 and b621881.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
* style(menus): roomier 26px rows, lighter icons, solid surface
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(orchestration): record orchestration as the origin of nested workers on connected servers; lead the guide with new-child (#40091)
worker-start --on <server> --worktree new-child now tells the server that
orchestration picked the parent, so the server records the child's lineage as
orchestration, as a local child is, instead of cli. Older coordinators omit the
field and keep cli. The guide now shows new-child first and new-top-level as
the no-parent choice.
* fix(claude): name Orca as the client of its Claude chats (#40057)
* fix(claude): name Orca as the client of its Claude chats
Orca's Claude chats reported the SDK's default entrypoint (sdk-ts), or the
value of a Claude session Orca was launched from. Set CLAUDE_CODE_ENTRYPOINT
to orca for every structured Claude launch; a value in Orca's launch
environment still wins.
* fix(claude): keep a differently cased Windows entrypoint override
Windows env names are case-insensitive, so a launch value spelled
claude_code_entrypoint lost to the uppercase Orca default when Node
deduplicated the keys.
* fix(claude): let a launch value replace a differently cased inherited one on Windows
* fix(claude): store a Windows entrypoint override under the name the SDK reads
* fix(orchestration): refuse a paired-server worker start onto a busy terminal before any wait (#40102)
One terminal claim owner now covers local Dispatches and attachments a paired
coordinator starts here, so either kind refuses the other with terminal_busy
before readiness waits or briefs.
* Show usage reset dates in account switcher (#40210)
* feat(cli): add `orca vm env doctor` to check that an environment can run agents (#40120)
* feat(cli): add orca vm env doctor to check a workspace environment
Checks required CLIs (git plus what the repo manifests imply), agent CLIs
and their sign-in, Git fetch and a dry-run push, the orca.yaml setup script
(optionally re-running it with Orca's runner), and free disk. Pass/warn/fail
with --json; checks live in src/main/environment-doctor for runtime reuse.
* fix(env-doctor): ship the doctor modules in the packaged CLI and share the check formatter
* fix(env-doctor): run Git probes in the C locale so folder detection is locale-independent
* fix(orchestration): keep a paired server's worker list when one Dispatch is from an earlier pairing (#40170)
* fix(orchestration): keep a paired server's worker list when one Dispatch is from an earlier pairing
The server's fleet snapshot refused the whole batch when one requested
Dispatch was not this home's (for example, one started before the home
re-paired), so the home showed every worker on that server as
host_unavailable. Now only that Dispatch reads as unverifiable.
* test(orchestration): cover a live Dispatch held for another home in the fleet snapshot
* test(orchestration): assert the other home's fleet item without a cast
* fix(ci): reuse installed pinned Bun in test workflows (#40234)
* fix(vm): resume a paired-server VM whose host went away on its own (#40199)
* fix(vm): resume a paired-server VM whose host went away on its own
* fix(vm): count only continuous failures as a lost paired server
* fix(browser): restrict paired-host browser tunnel destinations (#40203)
* feat(mobile): cancel dictation in place and show which device is transcribing (#40185)
* feat(mobile): cancel dictation in place and show which device is transcribing
* fix(mobile): give each composer its own dictation cancel target
* fix(mobile): keep the dictating composer row on one line
* refactor(mobile): share the dictation mic face and measure the cancel target per platform
* fix: request native ABI process report only on Linux (#40233)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* feat(vm-recipes): add "Set up with an agent" to Cloud VMs settings (#40131)
* feat(vm-recipes): add Set up with an agent to the Cloud VMs settings
Starts the default agent in the project's workspace with a prompt that loads
the per-workspace environment skill, loops on the recipe and environment
doctors, and ends with a commit and PR. The launcher also takes failure
context (redacted log tail) for callers such as a failed VM create.
* refactor: split recipe log redaction into a browser-safe module
* fix(vm-recipes): bound and redact failure text in the setup-agent prompt
* fix(worktrees): offer nested-worktree delete on remote runtime hosts (#40235)
* fix(worktrees): offer nested-worktree delete for remote runtime hosts
A remote host's 'contains another registered worktree' refusal showed only
the raw error. Add worktree.previewNestedRemoval and an approved-plan
worktree.rm path on the runtime, and route the toast's nested-delete dialog
to the workspace's own host.
* fix(worktrees): re-check checkouts between remote nested deletes; scale reply timeout
* chore: compose nested worktree ids; record improved ratchets
---------
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(speech): send cloud dictation through the proxy set in Settings (#40236)
* fix(speech): send cloud dictation through the proxy set in Settings
* fix(speech): keep OpenAI cookies out of the desktop session
* refactor(speech): send transcription and the key check through one request helper
* refactor: move browser contracts and publication to defining owners (#40209)
* refactor: move atomic publication to its filesystem owner
* refactor: group shared browser definitions by feature
* refactor: bind proxy process and session contracts to defining owners
* refactor: consolidate direct session contract type imports
* refactor: retain atomic publication test timing under moved owner
* fix(benchmark): resolve historical tunnel framing source before loading
* Plugins: add workspace.rename and project names in workspace.list (#40197)
* feat(plugins): add workspace.rename and project names in workspace.list
Plugins that name workspaces had to read Orca's private runtime token and call
worktree.set over the runtime socket, bypassing capability consent. workspace.rename
(workspace:write, worker only, host API 1.5) does the same update as a sidebar
rename. workspace.list rows gain the project name so plugins can prefix names
without reading the runtime's repo list.
* fix(plugins): harden workspace.rename against twin folders and hidden characters
Folder renames require a unique folder id, so twins on two hosts are not both renamed,
and fail when no folder has the id. Names refuse C1, bidi and zero-width characters,
which could make a label read as another workspace's name.
* fix(plugins): workspace.rename matches a sidebar rename for folders and reports kept names
A folder rename also cancels a pending first-agent-message rename, so the automatic
title cannot replace the plugin's name. A rename Orca does not apply (during a WSL
move) is a conflict instead of a silent success. workspace.list's project is optional,
so mocks written for host API 1.4 still validate. More invisible characters are refused.
* feat(dictation): dictate into the focused field of a page in the browser pane (#40191)
* feat(dictation): dictate into the focused field of a page in the browser pane
* test(dictation): cover dictation into a focused browser page
* fix(dictation): type page dictation through the frame that owns the field
* fix(dictation): space page rich-text dictation within its block and offer editors the beforeinput
* test(dictation): simplify the page insertion test mock
* fix(dictation): copy page dictation to the clipboard when an editor blocks the input
* feat(dictation): Enter or Send while dictating sends once the words land (#40226)
* feat(dictation): Enter or Send while dictating sends once the words land
* refactor(dictation): composer queued send as a hook
* fix(dictation): queue only Enter typed into the terminal; keep the pill until the send runs
* fix(dictation): a cancel during the terminal's Enter delay drops the Enter
* fix(dictation): keep the queued label until the terminal Enter is pressed
* fix(dictation): keep the queued send compilable
* feat(vm-recipes): build checklist and failure card for VM creates (#40152)
After a recipe provisions a VM, run the environment doctor on the VM's own
server (new environment.doctor RPC) before creating the workspace. The VM
create sheet shows Provision VM, Check environment and Create workspace; a
failed step gets Fix with agent, Retry, Edit recipe, and (for checks) Open
anyway, which keeps the VM. Older VM servers skip the checks; dismissing
aborts a running check and destroys the VM as before.
* Polish agent picker search and rows (#40242)
* wip
* Polish agent picker interactions
* test: reconcile VM mobile and native test removals with current main (#40154)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* test: remove low-value shared and native suites (#40172)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* Fix Simplified Chinese translation for floating button action (#40252)
* fix(vm-recipes): destroy a recipe VM when a phone deletes its workspace (#40205)
Deleting a recipe workspace from the phone removed only its checkout and
left the VM this desktop created for it running. Only the desktop window
ran the destroy.
The relaying desktop now tags the rows of workspaces whose VMs it created
with the environment's name, and says whether deleting will destroy it.
The phone's delete sheet names the environment, and its delete asks for
the destroy (`destroyHost: true`). The desktop then owns that removal:
- it runs as a workspace lifecycle delete
- the environment's Orca removes the checkout and must answer positively.
An older Orca that answers on acceptance is polled until the workspace
is gone.
- the VM is destroyed through the shared cleanup, behind any running wake
or suspend, and only when no other workspace remains on it
- the result reports host.state truthfully: destroyed, kept, or
left-running (no destroy step)
The environment's own error codes reach the phone unchanged, and a failed
removal shows its message on the phone instead of only a haptic.
Removals that don't ask for the destroy (older phones, the CLI, other
clients) keep today's behavior. No CLI API changes.
Based on #39235 by jutaz, a port of #28435.
Co-authored-by: Justas Brazauskas <brazauskasjustas@gmail.com>
* fix(dictation): stop phone and browser cloud dictation at the 10-minute limit with a notice (#40240)
* fix(dictation): stop a phone's cloud dictation at the 10-minute limit with a notice
* test(dictation): pin the cap flag on every phone chunk reply
* perf(dictation): skip decoding phone audio the host will drop past the cloud cap
* ci(release): mirror published downloads to Cloudflare R2 (#40254)
onorca.dev offers an opt-in 'mirror link' (https://downloads.onorca.dev)
next to the GitHub download for when GitHub release downloads 5xx.
Upload the onorca.dev download assets there right after each stable
desktop release and each Android release, instead of polling.
- config/scripts/release/publication/mirror-release-to-r2.sh: retrying,
resumable download from GitHub, size + sha256 check, S3 multipart
upload to R2 (no 300 MiB wrangler cap)
- release-mirror-r2.yml: reusable + manual backfill
- release-cut: run after publish-release for stable vX.Y.Z tags only
- mobile-android-release: run before bump-apk-download so the site's
mirror link never points at a missing APK (success not required)
* Keep hosted reviews, conversations, and optional GitLab jobs accurate (#40080)
* Fix hosted review selection, conversations and optional job failures
Co-authored-by: Mahedi Hasan Emon <mahedi.emon62@gmail.com>
Co-authored-by: Victor GALISSON <victor.galisson@purecontrol.com>
* Retain complete review history within provider bounds
* Declare optional membership retention policy
* Narrow hydrated revision metadata without a cast
* Preserve completed check presentation through the shared classifier
* Read malformed revision metadata without retaining it
* Exercise legacy alternate discovery after local absence
* Preserve observable remote review routing coverage
* Keep optional GitLab job warnings consistent in details
* Reuse the optional job presentation color
---------
Co-authored-by: Victor GALISSON <victor.galisson@purecontrol.com>
* Continue every usage-limited chat at once, and stop after five automatic refails (#40055)
* fix(native-chat): continue every usage-limited chat at once and stop after five automatic refails
The automatic continue sent one chat per 10 s sweep, so chats stopped by the same limit resumed one by one. Its retry budget belonged to the cut, so a continuation that hit the limit again started a fresh budget and could repeat indefinitely.
Send every due chat in one pass, one at a time. Count consecutive automatic continues that ended in another usage limit from the journal: each continue's message id names the cut it answered, and the next cut's turn is joined to that submission through its key or provider item. After five, the chat shows that Orca won't continue it automatically.
* fix(native-chat): read the usage-limit continue chain from the tail, not the whole conversation
The chain walk built a map over every journal row and rescanned history for each link. Walk back from the end instead, so the work is the chain's own rows; add an N/10N contract. Replace the fan-out test's casts with typed fixtures.
* test(native-chat): count a Claude echo-opened continue in the usage-limit chain
* fix(native-chat): derive the usage-limit continue chain once per cut
A status rebuild for the same cut reuses the chain it already derived, since only history before the cut decides it; the turn's limit is read without copying its rows.
* fix(native-chat): skip slash-command turns when walking a usage-limit continue chain
A /compact run after a usage limit sits between the cut and its automatic continue; the latest-turn read skips it, so the chain walk must too. Count visited rows in the perf contracts with typed getters.
* test(native-chat): type-guard the recorded Claude capture events
* fix(native-chat): recompute the usage-limit chain when a late receipt attributes its opener
Reuse across rebuilds is keyed on the cut, its turn row's revision and the newest send, so a late attribution that completes a join is counted instead of keeping a stale zero.
* test(native-chat): guard usage-limit chain reuse at the status projection
Drives StructuredAgentSessionJournalProjections.read through real journal invalidations at 100 and 1000 turn rows: one chain derivation for an unchanged cut, again for a new cut or epoch, and a recount when a late receipt attributes the continue's opener.
* fix(native-chat): reuse a usage-limit chain only while everything it read is unchanged
The chain walk now reports the turn rows it looked up and the oldest submission it examined; the status projection keys reuse on their revisions and join evidence, so a late receipt for any link, not just the newest send, recounts the chain.
* fix(native-chat): derive the usage-limit chain fresh on each status rebuild
Reuse across rebuilds kept missing inputs the walk reads (late receipts, revised failure rows) and its key re-serialized settled history. The status projection's own cache still skips unchanged reads; each rebuild now walks only the chain's tail. Contract tests at the projection count total reads: independent of earlier history, linear in the chain's rows, one scan of the sends when no opener matches.
* fix(native-chat): find an echo-opened turn's opener without reading the turn before it
A Claude echo-opened turn names the provider's key while its opener row keeps the submission's, so the slash-command check scanned the whole previous turn and missed echo-opened commands. It now stops at the nearest root user row.
* fix(dictation): save Auto mode so older builds keep a working shortcut, and show it on the phone (#40231)
* fix(dictation): store Auto as Toggle plus hold-to-record so older builds keep a working shortcut
* test(mobile): type the Auto mode settings fake instead of casting
* fix(dictation): migrate a stored Hold without hold-to-record
* fix(dictation): keep phone mode segments typed and clear hold-to-record when a phone picks Hold
* refactor(dictation): reuse the shared mode settings in the migration and phone writes
* fix(agent-picker): list agents named by the search before other agents' model setups (#39806)
* fix(agent-picker): list agents named by the search before other agents' model setups
Typing "codex" in the agent picker showed OpenCode/Cursor model setups
(e.g. "OpenCode · GPT-5 Codex") above the Codex agent itself, and Enter
picked the first setup. Direct agent matches now render first and are the
Enter target.
* test(agent-picker): assert search highlight and Enter target for named agent
* test(agent-picker): import fireEvent after rebase
* test: remove low-value WSL and renderer suites (#40237)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(native-chat): pad the sender name chip in orchestration worker cards (#40258)
The compact sender name had no horizontal padding, so its hover fill hugged
the text. Add an inlineChip button size (inline height, px-1.5).
* test: remove low-value renderer and budget suites (#40222)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* docs: put Chat or Terminal first in README features (#40262)
* fix(dictation): a paired phone or browser waits as long as the computer for long cloud dictations (#40238)
* fix(dictation): wait as long as the host's cloud deadline when a paired phone or browser stops
* fix(dictation): compute the host's cloud deadline from its exact sample count
* fix(orchestration): explain the --terminal and --agent refusal; name chat addresses in terminal commands (#40092)
* docs(dictation): say why Hold can't see a key release inside a browser page (#40269)
* test: remove low-value mobile renderer and rate-limit suites (#40188)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(terminal): end a dead preserved terminal host's PTYs as host loss (#40095)
* fix(terminal): end a dead preserved terminal host's PTYs as host loss
After an update Orca keeps the previous version's terminal host so agents
survive. That host has no respawn, so when it later died nothing ended its
PTYs: panes stayed connected on a frozen frame and input went nowhere.
Once every reconnect attempt finds its endpoint refused or missing, each of
its PTYs now ends as host loss with history kept, and the pane's restore is
no longer refused because the dead host cannot answer.
Fixes #38432
* fix(terminal): require process-exit proof on POSIX and keep checking until proven
Review follow-ups: an unproven attempt restarts the count instead of ending
the check; on POSIX the old host's pid must also be gone; a proven-gone host
answers 'not live' for every id; one throwing exit listener cannot strand
the remaining sessions.
* feat(i18n): translate the dictation pill, error pill and queued-send copy (#40266)
* fix(dictation): don't throw when the paired web client has no speech catalog
* feat(i18n): translate the dictation pill, error pill and queued-send copy
* fix(i18n): say Chinese queued sends happen automatically
* test: remove low-value provider and renderer assertions (#40279)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* test: remove low-value copy, inventory, and runner assertions (#40282)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* feat(release): publish a server-only Linux tarball for orca serve (#40280)
* feat(release): publish a server-only Linux tarball for orca serve
Each release now also uploads orca-server-linux-x64.tar.gz and
orca-server-linux-arm64.tar.gz (orcad slot from the qualified template, the
pinned Node, and an orca-ide launcher) plus orca-server-sha256sums.txt, so a
Linux host can run orca serve without the desktop package.
The tarballs are packed and smoke-tested (serve --recipe-json, then pair a
second profile) on both architectures, including bare ubuntu:24.04 and
debian:12-slim containers. Upload runs only after the release is published
and nothing depends on it, so it cannot hold the desktop release.
* fix(release): keep the server tarball's launcher env out of its terminals; skip refs that predate it
- The launcher runs the CLI with ELECTRON_RUN_AS_NODE=1, as the packaged app does, and the CLI strips it
before starting orcad; ORCA_APP_EXECUTABLE and ORCA_SERVE_RUNTIME are cleared.
- Ship Node's LICENSE beside the runtime.
- Skip packing on release refs that predate the scripts, and upload only when both tarballs passed.
- Run the PR smoke when the CLI's serve-runtime selection changes; document service install.
* refactor: group renderer workspace ownership and navigation (#40230)
* refactor: group renderer workspace ownership and navigation
* refactor: use the defining WSL rewrite store identifier
* refactor: route new upstream consumers to workspace owners
* refactor: consolidate connection owner test imports
* refactor: preserve upstream review-owner test retirement
* test: remove low-value wrappers, inventories, and timing checks (#40284)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* test(vm): pin file saves in a recipe-created workspace, across server restart (#11762) (#40275)
* test(vm): pin file saves in a recipe-created Orca server workspace (#11762)
* test(vm): wait for the save round trip, let the app reconnect itself, edit a plain-text file
* test(vm): say why the recipe save spec needs a longer timeout
* fix(tabs): preserve lastFocusedAt on native chat tabs across host snapshots (#40288)
Host session-tab snapshots rebuild native chat tabs without the
client-owned focus visit, so Cmd+J recents ranked chats last and showed
their creation time.
Fixes #39841
* test: remove low-value renderer, chain, and native checks (#40287)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* test: remove low-value work budgets and relocation selftest (#40294)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(ports): keep sticky External Ports header opaque on hover (#40073)
The sticky External Ports header used hover:bg-accent/50, a translucent
background that let scrolled port rows show through on hover. Blend the
accent into the popover color so the hover state stays opaque.
Fixes #40056
* fix(tour): allow chat split for agent sessions without a TUI agent tag (#39976)
The native chat split action required the source agent-session tab to carry
a TUI agent tag, so sessions without one (e.g. untagged or non-TUI agents)
could not be split and the tour's split step stalled. Any agent-session tab
in a known group is now a valid split source.
Co-authored-by: Neil <neil@stably.ai>
* fix(native-chat): move the cursor to the composer after Add to chat (#39845)
The composer refuses focus while an overlay is open, and the selection
popover was still open when the quote was appended. Close it first.
* test(pty): await readiness signals instead of polling with waitFor (#40082)
The plain-shell readiness test polled with vi.waitFor (1s default budget)
for reconcileConfig and the spawn env. Under CPU load the spawn takes over
a second and the test failed with 'expected undefined to be defined'.
Await an explicit reconcile-started signal and the spawn itself, and move
cleanup to onTestFinished so the gate is released and spies/env restored
even when a regressed spawn blocks until the test timeout.
Fixes #40078
Co-authored-by: Jerry Wu <haoyuwu@andrew.cmu.edu>
* fix(terminal): don't restart every dead saved tab when a worktree opens; log how the daemon exited (#40289)
* fix(terminal): don't restart every dead saved tab when a worktree opens; log how the daemon exited
Opening a worktree mounted every saved terminal tab that had no PTY, and each
hidden mount started a fresh shell or agent. With many finished agent tabs this
started dozens of agents at once and could exhaust a host's process limit.
Saved tabs with no PTY anywhere and nothing queued to start now wait until
they are shown; the existing capped idle warm-up still admits up to four.
The main process now records the daemon's exit code or signal and names it in
the respawn log line.
Fixes #39166
* fix(daemon): forget a predecessor's exit when a replacement daemon launches
* fix(diff): persist inline / side-by-side diff view via the Default Diff View setting (#40256)
* fix(diff): persist inline / side-by-side diff view via the Default Diff View setting
The file diff and combined diff toolbars toggled inline vs side-by-side only
in local component state (plus a session-only module preference for the
combined diff), so switching worktrees or agent threads reopened the diff in
the saved inline default.
The toggle now writes the existing diffDefaultView setting, and both viewers
derive sideBySide directly from it. The per-view cache and module memory no
longer carry a separate sideBySide value.
Fixes #40241
Co-authored-by: Wooseong Kim <2222333+innocarpe@users.noreply.github.com>
* test(diff): drop the removed sideBySide field from the cached combined-diff view
---------
Co-authored-by: Neil <neil@stably.ai>
* feat(dashboard): show last messages in agent dialog when no live terminal (#40147)
When a dashboard card has no live PTY (e.g. chat-session tabs), the agent
dialog previously showed only the "preview unavailable" notice. It now also
renders the card's stored last user/agent messages, unclamped and scrollable,
below the notice. The rendering is extracted into AgentCardLastMessages and
shared with the kanban card, which keeps its line clamps.
Fixes #40144
Co-authored-by: Neil <neil@stably.ai>
* fix(claude): verify model switches when terminal echoes omit vendor prefix (#40064)
Claude echoes "Set model to Opus 5.5" without the "Claude" vendor prefix,
and never echoes the picker-only " alias" suffix or a raw "claude-" id
prefix. The confirmation observer required every picker-label token, so a
successful switch resolved to unknown and showed "Could not verify the
model change". Normalize the expected label before matching; context
tokens such as 1M are still required.
Fixes #40058
Co-authored-by: Neil <neil@stably.ai>
* fix(markdown): lower link underlines below descenders (#40218)
Link underlines in Native Chat, the markdown preview and the rich markdown
editor sat 2px below the baseline, so descenders (g, y, p, j) crossed them and
skip-ink broke the line into dashes. Use a 0.25em offset that scales with font
size and zoom, and override the shared renderer's underline-offset-2 in Native
Chat.
Fixes #40217
Co-authored-by: Neil <neil@stably.ai>
* test: remove low-value copy suites and manual status benchmark (#40305)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(native-chat): group deferred context rows separately in the usage popover (#39917)
Claude reports deferred categories (MCP tools, system tools loaded on
demand) that sit outside the used total, but summarizeContextUsage
dropped the flag, so the popover listed them as window percentages next
to real usage and the rows summed to well over 100%.
Keep the deferred flag on each summary row and render deferred rows in
their own group under a divider, with token counts instead of a share of
the window and a note that they are not counted in the used total.
Fixes #39878
Co-authored-by: Neil <neil@stably.ai>
* refactor: group editor browser document and simulator owners (#40273)
* refactor: group editor browser document and simulator owners
* refactor: update active simulator reliability command links
* refactor: preserve upstream editor and emulator test retirements
* fix(codex): close TOML multiline strings on runs of four or five quotes (#40089)
The Codex config line scanner only treated exactly three quotes as the
multiline closer, so a value like '''printf 'ok'''' left the scanner
inside the string and later tables (e.g. [projects."..."]) were missed
when writing project trust. Match toml_parser: a run of 3-5 quotes
closes the string, with up to two quotes belonging to the content.
Co-authored-by: Neil <neil@stably.ai>
* fix(linear): include project in Linear issue list and search results (#40194)
Request the project on the shared issue node fields and map it in
mapRawIssueForWorkspace, so list/search rows carry the project the same
way issue detail already did. Detail now reuses the shared mapping.
Co-authored-by: Neil <neil@stably.ai>
* fix(build): bundle browser-extension-preload as a standalone sandboxed script (#39884)
The browser-extension preload was a main-build Rollup input, so it could be
split into shared CJS chunks that a sandboxed preload cannot require. Build it
with the other guest preloads as a self-contained bundle, and share the
one-byte unminified output options between the preload build and sandboxed
bundles so the extension preload stays one-byte in V8.
Co-authored-by: Neil <neil@stably.ai>
* test: remove obsolete manual tools and duplicate launch coverage (#40317)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(terminal): ignore the inverse caret glyph in an empty Claude composer (#40225)
Claude paints the caret over the first glyph of a dim composer suggestion
as an undimmed inverse cell. The typed-text read kept that glyph, so an
empty composer reported a one-character draft and the stock Try "..."
placeholder was never recognized. Treat a lone inverse caret glyph ahead
of a longer dim suggestion as untyped, while keeping a real typed last
glyph that sits before a dim argument hint (e.g. /commit [message]).
Fixes #40195
Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
* test(e2e): give the provisioned-root VM a reachable git remote (#40318)
* test(e2e): give the provisioned-root VM a reachable git remote
VM creates now run the environment checks before creating the workspace
(#40152). The fixture VM's origin pointed at a GitHub URL it cannot push
to, so the git push check failed and the create paused on the build
sheet; the spec then read the VM's primary checkout before it was
adopted. Point the VM checkout at a local bare repo so the checks pass.
* test(e2e): wait for the provisioned root's adoption, not its listing
The VM's primary checkout appears under its branch name once its project
is set up, before the environment checks finish and adoption writes
ephemeralVmCheckoutMode. Poll for the adopted row instead.
* refactor(environment-providers): add EnvironmentProviderDriver, contract test kit and ShellRecipeDriver (#40315)
One lifecycle seam (create/resume/suspend/destroy/status + capability flags and a
catalogued error type) that every environment provider implements, a shared
vitest contract any driver runs from its own test, and ShellRecipeDriver, which
wraps today's orca.yaml / plugin VM recipe runner and passes the contract.
No production callers yet.
* refactor: group agent launch, status, and messaging owners (#40313)
* refactor: group agent launch, status, and messaging owners
* refactor: consolidate direct owner imports
* refactor: import pane ownership directly in status listeners
* Update README downloads badge (#40336)
Co-authored-by: buf0-bot[bot] <252831055+buf0-bot[bot]@users.noreply.github.com>
* refactor(environment-providers): run shell recipes through ShellRecipeDriver (#40332)
The runtime service and failed-start cleanup now reach orca.yaml environment
recipes and plugin VM recipes through ShellRecipeDriver's recipe-shaped steps.
Same arguments, same runner, same results: records, failure copy and
diagnostics are unchanged.
* test: remove low-value hook and mirror tests and search benchmarks (#40335)
* test: remove private hook checks and manual search benchmarks
* test: remove masked mirror hydration case and exclusive scaffolding
---------
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(native-chat): show approved Codex automatic reviews as neutral notices (#40161)
Codex reports both approved and denied automatic approval reviews on the
guardianWarning channel. Orca rendered every one as a yellow "safety review
warning", so routine approvals looked like problems. Approved reviews now
render as a neutral "approved this action" notice on desktop and mobile;
denials and timeouts keep the warning tone.
Co-authored-by: Sean876-alt <224890246+Sean876-alt@users.noreply.github.com>
Co-authored-by: Neil <neil@stably.ai>
* test: remove low-value composer activation provider and layout coverage (#40342)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* test: remove low-value draft and editor save coverage (#40350)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* test: remove low-value bridge speech and lineage checks (#40356)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(vm-recipes): keep a VM's checkout out of the sidebar until its create finishes (#40355)
A recipe VM create registers the VM's project before its environment
checks run, so the VM's primary checkout showed as a normal workspace
next to the pending row while the checks ran or were paused on a
failure. Hide that checkout in both sidebar list models until the
create adopts it (or makes its worktree). A cancelled or failed create
keeps it hidden while its VM is cleaned up; a VM that could not be
cleaned up is shown again so it can be removed.
* test: remove low-value messaging simulator and editor suites (#40363)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* feat(runtime): tell phones when relay hosts change (#40122)
* feat(runtime): tell phones when relay hosts change
* fix(runtime): keep the relay host backstop live and watch every list input
* fix(mobile): hold the relay host feed only for desktops that announce changes
* perf(runtime): watch relay host inputs only while phones read the list
* perf(github): use the desktop's PR fallback rule on the phone and forward refreshes (#40128)
* perf(github): use the desktop's PR fallback rule on the phone and forward refreshes
* fix(github): keep a merged fallback PR while the phone has no head
* feat(mobile): keep Tasks and new-workspace drafts across kills (#40127)
* feat(mobile): keep Tasks and new-workspace drafts across kills
Task comments (per item and project row), the New issue title and body,
and the New workspace note now live in device-store draft rows. They come
back after the form closes or the app is killed, and only into an empty
field. A comment's setter stays bound to its item, so a send that settles
after the user moved on clears the right row.
* fix(mobile): rebuild comment sends when the draft's item changes
* fix(mobile): key the workspace note by host and keep cleared fields cleared
* fix(mobile): clear only the note a finished create sent
* fix(mobile): count clearing an empty draft field as the user's choice
* perf(mobile): cap field drafts, read sheet drafts on open, retry a failed read once
* fix(mobile): retry a failed draft read after a pause and keep New issue text typed during a create
* fix(mobile): save draft text again once a failed store read can be retried
* fix(mobile): remove a stored draft when an unread field is cleared
* fix(mobile): floor event-driven reads after failures and catch up reads that span a stream reopen (#40142)
* fix(mobile): floor event-driven reads after failures and catch up reads that span a stream reopen
* test(mobile): pin the event router's read floor after a refused read in a recording
* perf(mobile): stop rebooting the Home spare page on every hop and after iOS memory warnings (#40270)
* perf(mobile): back off spare page refills after an unclaimed drop or memory warning
* fix(mobile): skip a spare whose store read outlived an unclaimed drop
* fix(mobile): arm the spare refill timer on whole milliseconds
* feat(vm-recipes): show VM lifecycle states in the sidebar, with Suspend/Resume VM (#40046)
* feat(vm-recipes): show VM lifecycle states in the sidebar, with Suspend/Resume VM
* fix(vm-recipes): Suspend VM suspends an idle parent with active children; dedupe repeat suspends
- With active children, Suspend VM sleeps this workspace too, so its VM
suspends once their sessions stop.
- A repeat Suspend VM while one is pending is dropped in the coordinator
instead of trusting a possibly stale suspended record.
- After a direct suspend, re-probe the host so its header reads Suspended.
* perf(mobile): keep three visited terminals mounted (#40111)
* perf(mobile): keep three visited terminals mounted and release hidden WebGL
* fix(mobile): scope the mounted-terminal LRU to the terminal frame
* fix(mobile): keep chat's lease-only stream when a terminal pane unmounts
* fix(mobile): report a hidden terminal's cell box only once it is shown
* perf(mobile): keep hidden terminals' WebGL contexts instead of rebuilding them on every switch
* feat(mobile): open chats on their last messages after a relaunch (#40166)
* feat(mobile): open chats on their last messages after a relaunch
The phone's store keeps each chat's newest rows (up to 512 KiB, 500 rows)
and its resume point, written when a turn settles, on hidden and when the
chat closes. A relaunched session opens on its stored chat tab, paints the
saved rows, and resumes from the stored cursor; the live read restates what
the agent is doing. Offline, the composer line says when the copy is from.
* test(mobile): keep the relaunch test typechecking
* i18n(mobile): translate the offline as-of line
* perf(mobile): encode chat copies in slices off the settle frame
* feat(mobile): keep commit, PR and review drafts across app kills (#40114)
* feat(mobile): keep commit, PR and review drafts across kills
* refactor(mobile): build commit, PR and review drafts on the shared draft fields, and clear only the text that was sent
* fix(mobile): keep a toggle made during Write with AI, the edit note while its sheet closes, and a newer PR edit after an earlier save
* test(mobile): wait for the saved review note row instead of sleeping
* perf(mobile): keep a hash of the PR text an edit was typed against, not a second copy
* test: remove low-value VM creation assertions (#40367)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* perf(mobile): open Home with last-known workspaces and counts (#40129)
* perf(mobile): open Home with last-known workspaces and counts
* fix(mobile): keep disconnected desktops on Home and judge agents by the client's connect time
* fix(mobile): store the seeded Home counts before removing the old snapshot
* fix(mobile): floor router reads after failures, catch up reads that span a stream reopen, seed the wide host list from Home
* fix(mobile): keep the old Home snapshot until the store can take it, and never re-date stored totals
* perf(mobile): key Home's counts in the host list module so the page boot never loads Home's code
* test(mobile): type the Home catalog adapter's modules with type imports
* perf(mobile): read Home's stored rows in one batch beside the host list, and keep mark-read a delta read
* perf(mobile): paint Home's desktop rows without waiting for the stored counts
* perf(mobile): restore Home's stored rows after the desktop list paints, from its host ids
* perf(mobile): read Home's counts on the connected edge itself, not a render later
* test: remove browser startup and CLI prerequisite mock suites (#40371)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* test: remove low-value VM, mobile, work-item and terminal suites (#40376)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* test: remove sidebar VM-wake and template hover suites (#40379)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(vm-recipes): hide an in-progress VM checkout in every window, the phone and the jump palette (#40373)
* fix(vm-recipes): hide an in-progress VM checkout in every window, the phone and the jump palette
A VM create's checkout was hidden only in the sidebar of the window that
started the create. Windows now publish their pending VM checkouts to the
main process, which shares every window's set with all windows and
filters the paired phone's host workspace list and workspace context.
The jump palette and the sidebar read the shared set, and a grouped VM
project no longer draws an empty-project placeholder while its create
is pending. A window's set is dropped when it closes, crashes or reloads.
* test(project-groups): reset leaked runtime environment revisions between files
* test: remove thin agent-hook and mobile migration suites (#40382)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(vm-recipes): tell paired phones to re-read workspaces when a VM create's pending checkout changes (#40384)
The phone filters in-progress VM checkouts only when it reads its host
workspace list, so a read made before a window's hide reached the main
process kept showing the checkout until the next unrelated change. Emit
worktreesChanged for each repo whose pending checkout appears or goes
away; phones already re-read their host workspace list on that event.
* test: remove agent-hook projections and URL inventories (#40388)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* test: remove low-value agent-hook and row-projection coverage (#40395)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(mobile): stop Review's branch compare re-reading back to back during git bursts (#40278)
* fix(mobile): stop Review's branch compare re-reading back to back during git bursts
fetchHostQuery re-read a compare as soon as it landed marked by a git event, so a burst of gitStatusChanged events with reads slower than the event spacing kept the desktop running compares back to back, and kept going after Review closed. A re-read now goes at once only after a quiet spell (a write's own event), otherwise floorMs after the last read landed, and stops once Review's build is no longer current. A superseded build no longer evicts the entry a newer build is reading.
* fix(mobile): show each compare that lands during a git burst while Review reads it again
* fix(mobile): keep note edits when a later compare lands on a shown Review build
* test: remove low-value browser, store and adapter suites (#40399)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* test: prune low-value worktree, SSH and activation coverage (#40406)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* test: prune low-value terminal and workspace coverage (#40413)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* feat(speech): run GGUF models on transcribe-cpp with a CPU fallback (#39326)
* feat(speech): run GGUF models on transcribe-cpp, falling back to the CPU
The speech host child can now load a second engine. A model whose files
are GGUF runs on transcribe-cpp (Metal on Apple silicon, Vulkan on
Windows and Linux, CPU otherwise); everything else stays on sherpa-onnx,
which remains the only engine on Intel Macs.
A GPU that fails to load, errors, stalls for 25 s or crashes the process
moves the dictation to a CPU-only process (TRANSCRIBE_BACKENDS=cpu) that
replays the audio the GPU had not decoded yet, so no words are lost or
repeated. A GPU that crashed or would not load is remembered per
transcribe-cpp version and OS release, and voice.speechGpu = 'off' keeps
it on the CPU.
Packaging copies transcribe-cpp, koffi and the target's native package
into resources/node_modules outside asar, fails when a target's package
is missing, and ships the MSVC runtime beside transcribe.dll on Windows.
No catalog model is GGUF yet, so nothing runs on transcribe-cpp until
the catalog change that follows.
* fix(speech): keep the speech queue running after a failed task, and drop audio frames after a discard
* fix(speech): keep the engine's file reads off the main thread's hot paths
The engine lookup and the GPU failure marker are read once per process
instead of on every dictation start and mobile catalog request, the marker
is written asynchronously, and the child reads the hotwords file with
fs/promises. The baseline moves the existing engine presence checks from
stt-worker-paths to the shared package table and adds the once-per-process
marker reads.
* test: prune low-value browser WSL and telemetry coverage (#40418)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* feat(mobile): keep a failed dictation's recording and offer Retry (#40276)
* feat(speech): dictate through any OpenAI-compatible transcription service (#40160)
Add an OpenAI-compatible model whose base URL, model and optional key
are set up in a Voice settings dialog and sealed together in ~/.orca,
so a key is never sent to a host it wasn't saved for. It reaches
OpenAI, Groq, Mistral and local servers, and replaces the unused
userModels setting.
* test: remove low-value browser, hook and SSH cases (#40423)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* feat(dictation): show committed and in-flight words in the dictation pill (#40428)
The pill showed only the current partial and went back to Listening after
each final, so pause-committed phrases from transcribe-cpp never appeared.
The host's transcript fold moves to src/shared and the desktop pill uses it
too: committed text in the foreground, tentative text muted.
* test: remove redundant browser matrices and SSH inventories (#40429)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* feat(settings): add a Use GPU switch for on-device dictation (#39466)
* feat(settings): add a Use GPU switch for on-device dictation
On by default (Auto: the GPU when it works, the CPU when it fails).
Turning it off keeps the transcribe-cpp speech process on the CPU, for
machines whose GPU driver freezes or restarts them. The row shows when
the selected model runs on transcribe-cpp.
* fix(speech): reload the warm speech model when Use GPU changes
A loaded recognizer kept the GPU choice it started with, so turning Use GPU
off left the next dictations on the GPU until the model unloaded.
* fix(speech): reload the speech model after a dictation when Use GPU changed during it
A recognizer still in use when Use GPU changed stayed loaded afterwards with
the old choice. It now unloads as soon as its last dictation ends, and the
warm-up loads it again with the new choice.
* test: remove low-value terminal, browser-session and SSH cases (#40433)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* perf(mobile): show accounts from the last snapshot (#40425)
* perf(mobile): show accounts from the last snapshot
* fix(mobile): never count a stored accounts snapshot as live
* test(mobile): pin when accounts usage counts as live
* fix(mobile): date accounts reads by when they were sent and block switches until live
* fix(mobile): show accounts usage only from this screen's own read, drop replies from before a reconnect
* feat(mobile): save the chat when the app leaves the foreground (#40417)
* feat(mobile): save the chat when the app leaves the foreground
A swipe-kill from the app switcher can end the app before the page is
hidden: iOS fires visibilitychange only at background, and Android Recents
leaves the activity resumed. The shell now sends an appInactive frame on
iOS inactive and Android window blur, to pages that declare they read it,
and the page saves any chat rows the store doesn't hold yet.
* fix(mobile): keep the leave callback out of render
* fix(mobile): notice a changed middle row before skipping a chat save
* test: remove low-value locale, automation and settings cases (#40437)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* feat(mobile): keep dictating after leaving the session, with a floating pill (#40421)
* feat(mobile): keep dictating after leaving the session, with a floating pill
* feat(mobile): translate the dictation pill and its toasts
* fix(mobile): type away words without claiming the terminal, and keep the pill above screens
* fix(mobile): float the pill above bottom bars, reopen the owner's own screen, and tell a refused start wherever you are
* fix(mobile): float the dictation pill above the source control bar
* fix(mobile): keep pill state out of the host context and reopen the starting screen first
* refactor(mobile): subscribe the pill only while it shows and trim the session dictation hook
* fix(mobile): key bar clearances by symbol
* feat(speech): move the speech models to transcribe-cpp and offer an update for old downloads (#39468)
* feat(speech): move the speech catalog to transcribe-cpp models
Parakeet v2/v3, Whisper tiny and SenseVoice now download their GGUF
builds, which run on transcribe-cpp everywhere, Intel Macs included (on
the CPU). A model still holding its old sherpa-onnx download shows
"Update to the faster version (<size>)"; updating replaces the old
files, and dictating before then says the model needs that update.
The five models with no GGUF build are retired and their users moved
over: the Japanese Parakeet, the Chinese-English Zipformer and the
Paraformer to SenseVoice, and the Korean and Chinese streaming
Zipformers to the new Nemotron 3.5 (28 languages). Nemotron's locale
codes (ko-KR) are matched from the ISO language setting.
* feat(speech): offer the speech model update once after the engine change
A card in the notification corner tells people whose selected on-device
model needs the new download, or whose retired model was replaced, and
starts the same download as Settings > Voice. After a replacement it
offers to delete the retired model's files.
* feat(speech): move retired Korean and Chinese models to SenseVoice and offer Whisper Large v3 Turbo
On transcribe-cpp 0.4.1 with Metal, SenseVoice beat Nemotron 3.5 on Korean
and Chinese FLEURS clips, so the retired Korean and Chinese streaming
Zipformers now move to SenseVoice. Whisper Large v3 Turbo (Q8_0, 886 MB)
joins the catalog as the most accurate choice for Japanese, Korean and
Chinese. Nemotron 3.5 stays, described by the languages it does best.
* Update README downloads badge (#40440)
Co-authored-by: buf0-bot[bot] <252831055+buf0-bot[bot]@users.noreply.github.com>
* perf(github): answer phone PR lookups from the desktop's last result (#40430)
* perf(github): answer phone PR lookups from the desktop's last result
* fix(github): order last PR outcomes by lookup start sequence
* fix(github): keep reused phone PR outcomes out of the refresh observers
* fix(github): reuse a fallback-found PR only for the same fallback number
* test: remove low-value CLI, settings and shortcut suites (#40441)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* refactor(speech): remove sherpa-onnx (#39473)
transcribe-cpp is now the only on-device engine on every platform, so
the sherpa-onnx packages, their packaging (extraResources, the darwin
libonnxruntime prune, the native-variant assert and the Linux libstdc++
exemption), the sherpa recognizer in the speech process and the
per-model engine choice all go. Hotwords are written as plain terms.
* test: remove low-value CLI and renderer inventories (#40445)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* feat(runtime): tell phones when the desktop refreshes a PR (#40438)
* feat(runtime): tell phones when the desktop refreshes a PR
* fix(runtime): name every checkout a coalesced PR read stood for
* fix(runtime): don't count a read that couldn't load checks as a checks change
* feat(speech): spell dictated code terms with a personal and per-repo dictionary (#40450)
* feat(speech): spell dictionary terms in dictation, with repo terms and Whisper prompt
* test(speech): pin host repo terms for phone dictation
* fix(speech): keep symbol terms whole, accept null setup params, resolve SSH repos
* refactor(speech): key transcript words once and type phone terms at the reply schema
* refactor(speech): merge speech-types imports in the speech IPC
* test: remove low-value suites and redundant examples (#40457)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(speech): keep words spoken while the model loads (#40454)
Stopping a CPU dictation closed the renderer's audio port while frames still
waited behind a decode in the speech worker; the close ended the stream at once
and the queued frames were dropped. A close after 'end' now leaves them to
decode. A model slower than 30 s to load also lost the start of the dictation,
since the renderer kept only 30 s of startup audio; it now keeps as much as the
host waits for the load.
* fix(dictation): match the pill's Chinese and Japanese phrases to the inserted text, and space Korean ones (#40455)
* fix(dictation): join Chinese and Japanese phrases without a space, and space Korean ones
The shared transcript fold joined every phrase with a space, so the pill and
phone replies showed Chinese and Japanese text with spaces the inserted text
doesn't have. It now joins with the same rule as insertion. That rule treated
Hangul like Chinese and Japanese, so Korean phrases were inserted with no space
between sentences; Korean spaces words, so Hangul now spaces like Latin text.
* fix(dictation): don't space after Chinese and Japanese full-width punctuation
* fix(dictation): join retried phrases with the same spacing rule
* fix(dictation): escape the spacing rule's non-ASCII marks for the orcad bundle
The shared fold now pulls the spacing rule into the orcad server bundle, which
must stay ASCII. A rich-draft test pinned Hangul joining without a space; it
now expects the Korean spacing.
* Improve project group ordering across hosts (#39816)
* Improve project group ordering across hosts
* fix(project-groups): restore each group order after a failed drop
A deleted group made the aggregate rollback stop early, leaving other groups at
the ranks from the failed drop. Restore each group independently and log the
swallowed single-update failures again.
* refactor(main): give project group RPC methods their own module
Keeps repo.ts under the 300-line cap as the project group surface grows.
* test: remove low-value browser, CLI and budget checks (#40459)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(i18n): preserve web runtime error details (#40267)
* fix(web): preserve runtime failure details
* fix(i18n): update chat behavior settings hint
* feat(speech): commit dictation text at each pause with Silero VAD (#39378)
Offline models write out the speech before each pause while recording goes on.
Short noises and slow window-padded decodes are held off the pause cuts, a VAD
error falls back to bounded chunks, and slow phrase decodes are judged per
dictation against the time spoken. The VAD download carries legacy files and
fetches after any GGUF model.
* test: remove low-value CLI, browser and E2E checks (#40466)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* Show the setup-script choice instead of greying out Create (#40341)
* Show the setup-script choice instead of greying out Create
With a project's setup script set to "Ask every time", Create stayed
disabled until the user picked Run or Skip, but that choice only renders
inside the collapsed Advanced section, so nothing explained the greyed-out
button. Keep the choice out of the disabled gate (as the gate's own comment
already intends) and have Create open Advanced to show it.
* Annotate the partial submit fixture cast
* Bring the setup choice into view when Create needs it
Create now scrolls the Run/Skip choice into the dialog's view and focuses
it on every attempt, including when Advanced is already open, and the
late-discovered setup path uses the same reveal. A submit that only jumps
to an existing pending creation no longer asks for a setup choice.
* Reveal the setup choice once per Create attempt
The choice clears the reveal request after scrolling and focusing, so a
later remount (for example after switching projects) cannot pull focus
without a new Create.
* Drop a pending setup reveal once the user has chosen
Choosing Skip in the moment before the reveal fired could still move focus
onto Run, so a later Enter switched the choice.
* Save a pasted workspace directory as the path it names (#40347)
* Save a pasted workspace directory as the path it names
A workspace directory with a leading space (" /Users/me/dev") was saved as
typed. Readers treat it as relative, so Orca resolved it inside every
registered repository and created an empty " /Users/me/dev" tree in each.
Normalize the saved value once where settings are written and loaded, as
the leading ~ fix did: leading whitespace before an absolute or home path is
dropped, while relative paths and trailing characters stay exact. A value
repaired on load keeps its old spelling in history so checkouts under the
old root stay visible. The settings field shows the saved value.
Co-authored-by: Eng. Mahmoud Bek ElNemer <ElNeMeR70@users.noreply.github.com>
* Expand ~\ only where it is a home path; drop type casts
* Classify the padded path with the host's own path rules
On macOS and Linux a leading backslash is part of a relative name, so only
Windows treats \work as absolute.
---------
Co-authored-by: Eng. Mahmoud Bek ElNemer <ElNeMeR70@users.noreply.github.com>
* fix(i18n): translate browser password prompts (#40446)
* fix(i18n): translate browser password prompts
* fix: wrap localized password save actions
* OpenCode subagents show in Chat UI and keep a chat open while they run (#40141)
* fix(native-chat): show OpenCode subagents and keep a chat open while they run
OpenCode reports each subagent as a child session when the client opts in.
Orca now opts in, files each child's tool calls and replies under its own
subagent, and keeps the subagent open until the child reports that it
completed, failed or was interrupted, including after the parent turn ends.
Co-authored-by: SeaBee <85791528+seabee33@users.noreply.github.com>
* fix(native-chat): keep a subagent's tool context when its rows are read back from the journal
Co-authored-by: SeaBee <85791528+seabee33@users.noreply.github.com>
* fix(native-chat): a Stop also ends running OpenCode subagents, and each subagent can be stopped from the strip
Co-authored-by: SeaBee <85791528+seabee33@users.noreply.github.com>
* fix(native-chat): only a chat Stop closes OpenCode subagents, an early subagent Stop stays available, and the close request has a deadline
Co-authored-by: SeaBee <85791528+seabee33@users.noreply.github.com>
* fix(native-chat): a subagent Stop that the subagent confirms while the request is out reads stopped
Co-authored-by: SeaBee <85791528+seabee33@users.noreply.github.com>
* refactor(acp): close child sessions from the agent connection
Keeps the session runtime under the line limit after the main merge.
* test(acp): read a child command through a type guard
* fix(native-chat): a subagent that reports its ending reads stopped even when the close request fails
A child Stop's session/close now asks the agent to drop the call on timeout instead of withdrawing the write.
* test(native-chat): OpenCode subagent calls group with other agents' subagent calls
---------
Co-authored-by: SeaBee <85791528+seabee33@users.noreply.github.com>
* fix(native-chat): honor Windows environment overrides consistently (#40301)
* fix(native-chat): apply Windows environment overrides consistently
Use the same case-aware composition for native chat launches, preflight,
model discovery and naming. Canonicalize configured Windows names before
account readers and preserve account pins and POSIX case distinctions.
Tracked in #39075.
Co-authored-by: 김태겸 <oharapass@gmail.com>
Co-authored-by: Vitalii Kulish <mancunianez@gmail.com>
* test(native-chat): cover effective Windows catalog changes
* test(native-chat): retain child environment test import after sync
* test(native-chat): verify Windows child environment precedence
---------
Co-authored-by: 김태겸 <oharapass@gmail.com>
Co-authored-by: Vitalii Kulish <mancunianez@gmail.com>
* Source Control's Codex model menu lists your account's models even when Codex's catalog is large (#40117)
* Source Control lists Codex models from app-server model/list instead of debug models
The Codex text-action picker read 'codex debug models', a dump of Codex's whole
catalog with prompt templates (40-90 KB per model). Once it passed the 4 MiB
output cap discovery failed and the picker kept Orca's built-in list, and the
dump's hidden entries were selectable. List models with app-server model/list
(hidden rows excluded), over Source Control's own launch, lock and teardown,
with the same 4 MiB input budget and 60 s deadline.
* Bound Codex model discovery input in bytes, key its cache case-insensitively on Windows, and stop the app-server only when it ignores stdin EOF
- Count raw bytes from both streams against the 4 MiB budget.
- Read CODEX_HOME (and other account dirs) case-insensitively on Windows for the host cache key.
- Skip the post-listing kill when the app-server already exited; fail waiting listing requests once discovery settles.
- Report an incomplete model list as such.
- Tests: fake-timer grace and successor admission after a successful listing, method-not-found and unreadable-page fallbacks.
* Key the Codex discovery cache on the env spelling Windows spawn uses
Windows env names ignore case and Node's spawn takes the lexicographically first spelling, so
CODEX_HOME wins over codex_home; the cache key now picks the same one.
* Narrow Codex app-server records with the provider record guard instead of type assertions
* Read Source Control action model picks under the repo's host key, as the picker saves them
Local repos resolved generation under the 'unknown' host key because their connection id is undefined, so the saved pick was skipped and the agent default ran.
* Key Source Control model picks by connection until the repo record loads, and test with a real local repo
* Key a native Codex listing's cache on process.env when no agent env was resolved
* feat(speech): record each model's languages, licence and measured error rates in the catalog (#40431)
Error rates come from Orca's speech bench (transcribe-cpp 0.4.1, Metal, pinned GGUFs):
LibriSpeech for English, 5 FLEURS dev clips for de, es, fr, ja, ko, pt, ru, tr and zh.
speechModelQuality turns them into the Voice settings word scale.
* fix(speech): let a slow on-device finish run while the engine still answers (#40460)
* fix(speech): let a slow on-device finish run while it still returns text
The stop timeout counted 60 s from Finish however much audio the engine still had
to decode, so a CPU model on a busy machine failed a dictation it was still
transcribing. It now fails only after 60 s without text for that dictation.
* fix(speech): count any engine answer as progress while a dictation finishes
* fix(mobile): close the details card when you touch the terminal (#38823)
* fix(mobile): close the details card when a touch lands outside it
Co-authored-by: zhangxaochen <3416677+zhangxaochen@users.noreply.github.com>
* fix(mobile): explain the pointerdown listener and drop a focus check that can't fail
---------
Co-authored-by: zhangxaochen <3416677+zhangxaochen@users.noreply.github.com>
* feat(dictation): pulse three dots in the pill while spoken words are still on their way (#40443)
* feat(dictation): show pending dots while the engine holds speech it hasn't committed
The VAD pause segmenter already knows when a phrase is open. The recognizer
now posts speech-pending when a phrase opens and clears it once that phrase's
text is posted, and the desktop pill shows three dots after the text while it
is on. Only pause-cut on-device streams send it, so cloud, the paired web
client and phones keep today's pill.
* fix(speech): keep a lone click from turning the pending dots on
* perf(native-chat): addressed tab-map transitions for chat membership (#40098)
* perf(native-chat): project structured chat tabs per workspace bucket
The shared chat-tab list was keyed on the whole unifiedTabsByWorktree
identity, so every tab write anywhere (terminal title batches included)
rescanned all tabs and handed every consumer a new list. Rebuild only the
buckets whose identity changed and return the previous list while no chat
tab changed.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* perf(native-chat): reconcile chat status membership per changed tab
The status bridge rebuilt every member and host group and captured every
chat on any tab-map or owner-input change, and recaptured every chat on any
launch notification. Mem…
audichuang
pushed a commit
to audichuang/orca
that referenced
this pull request
Nov 12, 2026
)
* style(menus): roomier 26px rows, lighter icons, solid surface
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(orchestration): record orchestration as the origin of nested workers on connected servers; lead the guide with new-child (#40091)
worker-start --on <server> --worktree new-child now tells the server that
orchestration picked the parent, so the server records the child's lineage as
orchestration, as a local child is, instead of cli. Older coordinators omit the
field and keep cli. The guide now shows new-child first and new-top-level as
the no-parent choice.
* fix(claude): name Orca as the client of its Claude chats (#40057)
* fix(claude): name Orca as the client of its Claude chats
Orca's Claude chats reported the SDK's default entrypoint (sdk-ts), or the
value of a Claude session Orca was launched from. Set CLAUDE_CODE_ENTRYPOINT
to orca for every structured Claude launch; a value in Orca's launch
environment still wins.
* fix(claude): keep a differently cased Windows entrypoint override
Windows env names are case-insensitive, so a launch value spelled
claude_code_entrypoint lost to the uppercase Orca default when Node
deduplicated the keys.
* fix(claude): let a launch value replace a differently cased inherited one on Windows
* fix(claude): store a Windows entrypoint override under the name the SDK reads
* fix(orchestration): refuse a paired-server worker start onto a busy terminal before any wait (#40102)
One terminal claim owner now covers local Dispatches and attachments a paired
coordinator starts here, so either kind refuses the other with terminal_busy
before readiness waits or briefs.
* Show usage reset dates in account switcher (#40210)
* feat(cli): add `orca vm env doctor` to check that an environment can run agents (#40120)
* feat(cli): add orca vm env doctor to check a workspace environment
Checks required CLIs (git plus what the repo manifests imply), agent CLIs
and their sign-in, Git fetch and a dry-run push, the orca.yaml setup script
(optionally re-running it with Orca's runner), and free disk. Pass/warn/fail
with --json; checks live in src/main/environment-doctor for runtime reuse.
* fix(env-doctor): ship the doctor modules in the packaged CLI and share the check formatter
* fix(env-doctor): run Git probes in the C locale so folder detection is locale-independent
* fix(orchestration): keep a paired server's worker list when one Dispatch is from an earlier pairing (#40170)
* fix(orchestration): keep a paired server's worker list when one Dispatch is from an earlier pairing
The server's fleet snapshot refused the whole batch when one requested
Dispatch was not this home's (for example, one started before the home
re-paired), so the home showed every worker on that server as
host_unavailable. Now only that Dispatch reads as unverifiable.
* test(orchestration): cover a live Dispatch held for another home in the fleet snapshot
* test(orchestration): assert the other home's fleet item without a cast
* fix(ci): reuse installed pinned Bun in test workflows (#40234)
* fix(vm): resume a paired-server VM whose host went away on its own (#40199)
* fix(vm): resume a paired-server VM whose host went away on its own
* fix(vm): count only continuous failures as a lost paired server
* fix(browser): restrict paired-host browser tunnel destinations (#40203)
* feat(mobile): cancel dictation in place and show which device is transcribing (#40185)
* feat(mobile): cancel dictation in place and show which device is transcribing
* fix(mobile): give each composer its own dictation cancel target
* fix(mobile): keep the dictating composer row on one line
* refactor(mobile): share the dictation mic face and measure the cancel target per platform
* fix: request native ABI process report only on Linux (#40233)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* feat(vm-recipes): add "Set up with an agent" to Cloud VMs settings (#40131)
* feat(vm-recipes): add Set up with an agent to the Cloud VMs settings
Starts the default agent in the project's workspace with a prompt that loads
the per-workspace environment skill, loops on the recipe and environment
doctors, and ends with a commit and PR. The launcher also takes failure
context (redacted log tail) for callers such as a failed VM create.
* refactor: split recipe log redaction into a browser-safe module
* fix(vm-recipes): bound and redact failure text in the setup-agent prompt
* fix(worktrees): offer nested-worktree delete on remote runtime hosts (#40235)
* fix(worktrees): offer nested-worktree delete for remote runtime hosts
A remote host's 'contains another registered worktree' refusal showed only
the raw error. Add worktree.previewNestedRemoval and an approved-plan
worktree.rm path on the runtime, and route the toast's nested-delete dialog
to the workspace's own host.
* fix(worktrees): re-check checkouts between remote nested deletes; scale reply timeout
* chore: compose nested worktree ids; record improved ratchets
---------
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(speech): send cloud dictation through the proxy set in Settings (#40236)
* fix(speech): send cloud dictation through the proxy set in Settings
* fix(speech): keep OpenAI cookies out of the desktop session
* refactor(speech): send transcription and the key check through one request helper
* refactor: move browser contracts and publication to defining owners (#40209)
* refactor: move atomic publication to its filesystem owner
* refactor: group shared browser definitions by feature
* refactor: bind proxy process and session contracts to defining owners
* refactor: consolidate direct session contract type imports
* refactor: retain atomic publication test timing under moved owner
* fix(benchmark): resolve historical tunnel framing source before loading
* Plugins: add workspace.rename and project names in workspace.list (#40197)
* feat(plugins): add workspace.rename and project names in workspace.list
Plugins that name workspaces had to read Orca's private runtime token and call
worktree.set over the runtime socket, bypassing capability consent. workspace.rename
(workspace:write, worker only, host API 1.5) does the same update as a sidebar
rename. workspace.list rows gain the project name so plugins can prefix names
without reading the runtime's repo list.
* fix(plugins): harden workspace.rename against twin folders and hidden characters
Folder renames require a unique folder id, so twins on two hosts are not both renamed,
and fail when no folder has the id. Names refuse C1, bidi and zero-width characters,
which could make a label read as another workspace's name.
* fix(plugins): workspace.rename matches a sidebar rename for folders and reports kept names
A folder rename also cancels a pending first-agent-message rename, so the automatic
title cannot replace the plugin's name. A rename Orca does not apply (during a WSL
move) is a conflict instead of a silent success. workspace.list's project is optional,
so mocks written for host API 1.4 still validate. More invisible characters are refused.
* feat(dictation): dictate into the focused field of a page in the browser pane (#40191)
* feat(dictation): dictate into the focused field of a page in the browser pane
* test(dictation): cover dictation into a focused browser page
* fix(dictation): type page dictation through the frame that owns the field
* fix(dictation): space page rich-text dictation within its block and offer editors the beforeinput
* test(dictation): simplify the page insertion test mock
* fix(dictation): copy page dictation to the clipboard when an editor blocks the input
* feat(dictation): Enter or Send while dictating sends once the words land (#40226)
* feat(dictation): Enter or Send while dictating sends once the words land
* refactor(dictation): composer queued send as a hook
* fix(dictation): queue only Enter typed into the terminal; keep the pill until the send runs
* fix(dictation): a cancel during the terminal's Enter delay drops the Enter
* fix(dictation): keep the queued label until the terminal Enter is pressed
* fix(dictation): keep the queued send compilable
* feat(vm-recipes): build checklist and failure card for VM creates (#40152)
After a recipe provisions a VM, run the environment doctor on the VM's own
server (new environment.doctor RPC) before creating the workspace. The VM
create sheet shows Provision VM, Check environment and Create workspace; a
failed step gets Fix with agent, Retry, Edit recipe, and (for checks) Open
anyway, which keeps the VM. Older VM servers skip the checks; dismissing
aborts a running check and destroys the VM as before.
* Polish agent picker search and rows (#40242)
* wip
* Polish agent picker interactions
* test: reconcile VM mobile and native test removals with current main (#40154)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* test: remove low-value shared and native suites (#40172)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* Fix Simplified Chinese translation for floating button action (#40252)
* fix(vm-recipes): destroy a recipe VM when a phone deletes its workspace (#40205)
Deleting a recipe workspace from the phone removed only its checkout and
left the VM this desktop created for it running. Only the desktop window
ran the destroy.
The relaying desktop now tags the rows of workspaces whose VMs it created
with the environment's name, and says whether deleting will destroy it.
The phone's delete sheet names the environment, and its delete asks for
the destroy (`destroyHost: true`). The desktop then owns that removal:
- it runs as a workspace lifecycle delete
- the environment's Orca removes the checkout and must answer positively.
An older Orca that answers on acceptance is polled until the workspace
is gone.
- the VM is destroyed through the shared cleanup, behind any running wake
or suspend, and only when no other workspace remains on it
- the result reports host.state truthfully: destroyed, kept, or
left-running (no destroy step)
The environment's own error codes reach the phone unchanged, and a failed
removal shows its message on the phone instead of only a haptic.
Removals that don't ask for the destroy (older phones, the CLI, other
clients) keep today's behavior. No CLI API changes.
Based on #39235 by jutaz, a port of #28435.
Co-authored-by: Justas Brazauskas <brazauskasjustas@gmail.com>
* fix(dictation): stop phone and browser cloud dictation at the 10-minute limit with a notice (#40240)
* fix(dictation): stop a phone's cloud dictation at the 10-minute limit with a notice
* test(dictation): pin the cap flag on every phone chunk reply
* perf(dictation): skip decoding phone audio the host will drop past the cloud cap
* ci(release): mirror published downloads to Cloudflare R2 (#40254)
onorca.dev offers an opt-in 'mirror link' (https://downloads.onorca.dev)
next to the GitHub download for when GitHub release downloads 5xx.
Upload the onorca.dev download assets there right after each stable
desktop release and each Android release, instead of polling.
- config/scripts/release/publication/mirror-release-to-r2.sh: retrying,
resumable download from GitHub, size + sha256 check, S3 multipart
upload to R2 (no 300 MiB wrangler cap)
- release-mirror-r2.yml: reusable + manual backfill
- release-cut: run after publish-release for stable vX.Y.Z tags only
- mobile-android-release: run before bump-apk-download so the site's
mirror link never points at a missing APK (success not required)
* Keep hosted reviews, conversations, and optional GitLab jobs accurate (#40080)
* Fix hosted review selection, conversations and optional job failures
Co-authored-by: Mahedi Hasan Emon <mahedi.emon62@gmail.com>
Co-authored-by: Victor GALISSON <victor.galisson@purecontrol.com>
* Retain complete review history within provider bounds
* Declare optional membership retention policy
* Narrow hydrated revision metadata without a cast
* Preserve completed check presentation through the shared classifier
* Read malformed revision metadata without retaining it
* Exercise legacy alternate discovery after local absence
* Preserve observable remote review routing coverage
* Keep optional GitLab job warnings consistent in details
* Reuse the optional job presentation color
---------
Co-authored-by: Victor GALISSON <victor.galisson@purecontrol.com>
* Continue every usage-limited chat at once, and stop after five automatic refails (#40055)
* fix(native-chat): continue every usage-limited chat at once and stop after five automatic refails
The automatic continue sent one chat per 10 s sweep, so chats stopped by the same limit resumed one by one. Its retry budget belonged to the cut, so a continuation that hit the limit again started a fresh budget and could repeat indefinitely.
Send every due chat in one pass, one at a time. Count consecutive automatic continues that ended in another usage limit from the journal: each continue's message id names the cut it answered, and the next cut's turn is joined to that submission through its key or provider item. After five, the chat shows that Orca won't continue it automatically.
* fix(native-chat): read the usage-limit continue chain from the tail, not the whole conversation
The chain walk built a map over every journal row and rescanned history for each link. Walk back from the end instead, so the work is the chain's own rows; add an N/10N contract. Replace the fan-out test's casts with typed fixtures.
* test(native-chat): count a Claude echo-opened continue in the usage-limit chain
* fix(native-chat): derive the usage-limit continue chain once per cut
A status rebuild for the same cut reuses the chain it already derived, since only history before the cut decides it; the turn's limit is read without copying its rows.
* fix(native-chat): skip slash-command turns when walking a usage-limit continue chain
A /compact run after a usage limit sits between the cut and its automatic continue; the latest-turn read skips it, so the chain walk must too. Count visited rows in the perf contracts with typed getters.
* test(native-chat): type-guard the recorded Claude capture events
* fix(native-chat): recompute the usage-limit chain when a late receipt attributes its opener
Reuse across rebuilds is keyed on the cut, its turn row's revision and the newest send, so a late attribution that completes a join is counted instead of keeping a stale zero.
* test(native-chat): guard usage-limit chain reuse at the status projection
Drives StructuredAgentSessionJournalProjections.read through real journal invalidations at 100 and 1000 turn rows: one chain derivation for an unchanged cut, again for a new cut or epoch, and a recount when a late receipt attributes the continue's opener.
* fix(native-chat): reuse a usage-limit chain only while everything it read is unchanged
The chain walk now reports the turn rows it looked up and the oldest submission it examined; the status projection keys reuse on their revisions and join evidence, so a late receipt for any link, not just the newest send, recounts the chain.
* fix(native-chat): derive the usage-limit chain fresh on each status rebuild
Reuse across rebuilds kept missing inputs the walk reads (late receipts, revised failure rows) and its key re-serialized settled history. The status projection's own cache still skips unchanged reads; each rebuild now walks only the chain's tail. Contract tests at the projection count total reads: independent of earlier history, linear in the chain's rows, one scan of the sends when no opener matches.
* fix(native-chat): find an echo-opened turn's opener without reading the turn before it
A Claude echo-opened turn names the provider's key while its opener row keeps the submission's, so the slash-command check scanned the whole previous turn and missed echo-opened commands. It now stops at the nearest root user row.
* fix(dictation): save Auto mode so older builds keep a working shortcut, and show it on the phone (#40231)
* fix(dictation): store Auto as Toggle plus hold-to-record so older builds keep a working shortcut
* test(mobile): type the Auto mode settings fake instead of casting
* fix(dictation): migrate a stored Hold without hold-to-record
* fix(dictation): keep phone mode segments typed and clear hold-to-record when a phone picks Hold
* refactor(dictation): reuse the shared mode settings in the migration and phone writes
* fix(agent-picker): list agents named by the search before other agents' model setups (#39806)
* fix(agent-picker): list agents named by the search before other agents' model setups
Typing "codex" in the agent picker showed OpenCode/Cursor model setups
(e.g. "OpenCode · GPT-5 Codex") above the Codex agent itself, and Enter
picked the first setup. Direct agent matches now render first and are the
Enter target.
* test(agent-picker): assert search highlight and Enter target for named agent
* test(agent-picker): import fireEvent after rebase
* test: remove low-value WSL and renderer suites (#40237)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(native-chat): pad the sender name chip in orchestration worker cards (#40258)
The compact sender name had no horizontal padding, so its hover fill hugged
the text. Add an inlineChip button size (inline height, px-1.5).
* test: remove low-value renderer and budget suites (#40222)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* docs: put Chat or Terminal first in README features (#40262)
* fix(dictation): a paired phone or browser waits as long as the computer for long cloud dictations (#40238)
* fix(dictation): wait as long as the host's cloud deadline when a paired phone or browser stops
* fix(dictation): compute the host's cloud deadline from its exact sample count
* fix(orchestration): explain the --terminal and --agent refusal; name chat addresses in terminal commands (#40092)
* docs(dictation): say why Hold can't see a key release inside a browser page (#40269)
* test: remove low-value mobile renderer and rate-limit suites (#40188)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(terminal): end a dead preserved terminal host's PTYs as host loss (#40095)
* fix(terminal): end a dead preserved terminal host's PTYs as host loss
After an update Orca keeps the previous version's terminal host so agents
survive. That host has no respawn, so when it later died nothing ended its
PTYs: panes stayed connected on a frozen frame and input went nowhere.
Once every reconnect attempt finds its endpoint refused or missing, each of
its PTYs now ends as host loss with history kept, and the pane's restore is
no longer refused because the dead host cannot answer.
Fixes #38432
* fix(terminal): require process-exit proof on POSIX and keep checking until proven
Review follow-ups: an unproven attempt restarts the count instead of ending
the check; on POSIX the old host's pid must also be gone; a proven-gone host
answers 'not live' for every id; one throwing exit listener cannot strand
the remaining sessions.
* feat(i18n): translate the dictation pill, error pill and queued-send copy (#40266)
* fix(dictation): don't throw when the paired web client has no speech catalog
* feat(i18n): translate the dictation pill, error pill and queued-send copy
* fix(i18n): say Chinese queued sends happen automatically
* test: remove low-value provider and renderer assertions (#40279)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* test: remove low-value copy, inventory, and runner assertions (#40282)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* feat(release): publish a server-only Linux tarball for orca serve (#40280)
* feat(release): publish a server-only Linux tarball for orca serve
Each release now also uploads orca-server-linux-x64.tar.gz and
orca-server-linux-arm64.tar.gz (orcad slot from the qualified template, the
pinned Node, and an orca-ide launcher) plus orca-server-sha256sums.txt, so a
Linux host can run orca serve without the desktop package.
The tarballs are packed and smoke-tested (serve --recipe-json, then pair a
second profile) on both architectures, including bare ubuntu:24.04 and
debian:12-slim containers. Upload runs only after the release is published
and nothing depends on it, so it cannot hold the desktop release.
* fix(release): keep the server tarball's launcher env out of its terminals; skip refs that predate it
- The launcher runs the CLI with ELECTRON_RUN_AS_NODE=1, as the packaged app does, and the CLI strips it
before starting orcad; ORCA_APP_EXECUTABLE and ORCA_SERVE_RUNTIME are cleared.
- Ship Node's LICENSE beside the runtime.
- Skip packing on release refs that predate the scripts, and upload only when both tarballs passed.
- Run the PR smoke when the CLI's serve-runtime selection changes; document service install.
* refactor: group renderer workspace ownership and navigation (#40230)
* refactor: group renderer workspace ownership and navigation
* refactor: use the defining WSL rewrite store identifier
* refactor: route new upstream consumers to workspace owners
* refactor: consolidate connection owner test imports
* refactor: preserve upstream review-owner test retirement
* test: remove low-value wrappers, inventories, and timing checks (#40284)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* test(vm): pin file saves in a recipe-created workspace, across server restart (#11762) (#40275)
* test(vm): pin file saves in a recipe-created Orca server workspace (#11762)
* test(vm): wait for the save round trip, let the app reconnect itself, edit a plain-text file
* test(vm): say why the recipe save spec needs a longer timeout
* fix(tabs): preserve lastFocusedAt on native chat tabs across host snapshots (#40288)
Host session-tab snapshots rebuild native chat tabs without the
client-owned focus visit, so Cmd+J recents ranked chats last and showed
their creation time.
Fixes #39841
* test: remove low-value renderer, chain, and native checks (#40287)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* test: remove low-value work budgets and relocation selftest (#40294)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(ports): keep sticky External Ports header opaque on hover (#40073)
The sticky External Ports header used hover:bg-accent/50, a translucent
background that let scrolled port rows show through on hover. Blend the
accent into the popover color so the hover state stays opaque.
Fixes #40056
* fix(tour): allow chat split for agent sessions without a TUI agent tag (#39976)
The native chat split action required the source agent-session tab to carry
a TUI agent tag, so sessions without one (e.g. untagged or non-TUI agents)
could not be split and the tour's split step stalled. Any agent-session tab
in a known group is now a valid split source.
Co-authored-by: Neil <neil@stably.ai>
* fix(native-chat): move the cursor to the composer after Add to chat (#39845)
The composer refuses focus while an overlay is open, and the selection
popover was still open when the quote was appended. Close it first.
* test(pty): await readiness signals instead of polling with waitFor (#40082)
The plain-shell readiness test polled with vi.waitFor (1s default budget)
for reconcileConfig and the spawn env. Under CPU load the spawn takes over
a second and the test failed with 'expected undefined to be defined'.
Await an explicit reconcile-started signal and the spawn itself, and move
cleanup to onTestFinished so the gate is released and spies/env restored
even when a regressed spawn blocks until the test timeout.
Fixes #40078
Co-authored-by: Jerry Wu <haoyuwu@andrew.cmu.edu>
* fix(terminal): don't restart every dead saved tab when a worktree opens; log how the daemon exited (#40289)
* fix(terminal): don't restart every dead saved tab when a worktree opens; log how the daemon exited
Opening a worktree mounted every saved terminal tab that had no PTY, and each
hidden mount started a fresh shell or agent. With many finished agent tabs this
started dozens of agents at once and could exhaust a host's process limit.
Saved tabs with no PTY anywhere and nothing queued to start now wait until
they are shown; the existing capped idle warm-up still admits up to four.
The main process now records the daemon's exit code or signal and names it in
the respawn log line.
Fixes #39166
* fix(daemon): forget a predecessor's exit when a replacement daemon launches
* fix(diff): persist inline / side-by-side diff view via the Default Diff View setting (#40256)
* fix(diff): persist inline / side-by-side diff view via the Default Diff View setting
The file diff and combined diff toolbars toggled inline vs side-by-side only
in local component state (plus a session-only module preference for the
combined diff), so switching worktrees or agent threads reopened the diff in
the saved inline default.
The toggle now writes the existing diffDefaultView setting, and both viewers
derive sideBySide directly from it. The per-view cache and module memory no
longer carry a separate sideBySide value.
Fixes #40241
Co-authored-by: Wooseong Kim <2222333+innocarpe@users.noreply.github.com>
* test(diff): drop the removed sideBySide field from the cached combined-diff view
---------
Co-authored-by: Neil <neil@stably.ai>
* feat(dashboard): show last messages in agent dialog when no live terminal (#40147)
When a dashboard card has no live PTY (e.g. chat-session tabs), the agent
dialog previously showed only the "preview unavailable" notice. It now also
renders the card's stored last user/agent messages, unclamped and scrollable,
below the notice. The rendering is extracted into AgentCardLastMessages and
shared with the kanban card, which keeps its line clamps.
Fixes #40144
Co-authored-by: Neil <neil@stably.ai>
* fix(claude): verify model switches when terminal echoes omit vendor prefix (#40064)
Claude echoes "Set model to Opus 5.5" without the "Claude" vendor prefix,
and never echoes the picker-only " alias" suffix or a raw "claude-" id
prefix. The confirmation observer required every picker-label token, so a
successful switch resolved to unknown and showed "Could not verify the
model change". Normalize the expected label before matching; context
tokens such as 1M are still required.
Fixes #40058
Co-authored-by: Neil <neil@stably.ai>
* fix(markdown): lower link underlines below descenders (#40218)
Link underlines in Native Chat, the markdown preview and the rich markdown
editor sat 2px below the baseline, so descenders (g, y, p, j) crossed them and
skip-ink broke the line into dashes. Use a 0.25em offset that scales with font
size and zoom, and override the shared renderer's underline-offset-2 in Native
Chat.
Fixes #40217
Co-authored-by: Neil <neil@stably.ai>
* test: remove low-value copy suites and manual status benchmark (#40305)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(native-chat): group deferred context rows separately in the usage popover (#39917)
Claude reports deferred categories (MCP tools, system tools loaded on
demand) that sit outside the used total, but summarizeContextUsage
dropped the flag, so the popover listed them as window percentages next
to real usage and the rows summed to well over 100%.
Keep the deferred flag on each summary row and render deferred rows in
their own group under a divider, with token counts instead of a share of
the window and a note that they are not counted in the used total.
Fixes #39878
Co-authored-by: Neil <neil@stably.ai>
* refactor: group editor browser document and simulator owners (#40273)
* refactor: group editor browser document and simulator owners
* refactor: update active simulator reliability command links
* refactor: preserve upstream editor and emulator test retirements
* fix(codex): close TOML multiline strings on runs of four or five quotes (#40089)
The Codex config line scanner only treated exactly three quotes as the
multiline closer, so a value like '''printf 'ok'''' left the scanner
inside the string and later tables (e.g. [projects."..."]) were missed
when writing project trust. Match toml_parser: a run of 3-5 quotes
closes the string, with up to two quotes belonging to the content.
Co-authored-by: Neil <neil@stably.ai>
* fix(linear): include project in Linear issue list and search results (#40194)
Request the project on the shared issue node fields and map it in
mapRawIssueForWorkspace, so list/search rows carry the project the same
way issue detail already did. Detail now reuses the shared mapping.
Co-authored-by: Neil <neil@stably.ai>
* fix(build): bundle browser-extension-preload as a standalone sandboxed script (#39884)
The browser-extension preload was a main-build Rollup input, so it could be
split into shared CJS chunks that a sandboxed preload cannot require. Build it
with the other guest preloads as a self-contained bundle, and share the
one-byte unminified output options between the preload build and sandboxed
bundles so the extension preload stays one-byte in V8.
Co-authored-by: Neil <neil@stably.ai>
* test: remove obsolete manual tools and duplicate launch coverage (#40317)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(terminal): ignore the inverse caret glyph in an empty Claude composer (#40225)
Claude paints the caret over the first glyph of a dim composer suggestion
as an undimmed inverse cell. The typed-text read kept that glyph, so an
empty composer reported a one-character draft and the stock Try "..."
placeholder was never recognized. Treat a lone inverse caret glyph ahead
of a longer dim suggestion as untyped, while keeping a real typed last
glyph that sits before a dim argument hint (e.g. /commit [message]).
Fixes #40195
Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
* test(e2e): give the provisioned-root VM a reachable git remote (#40318)
* test(e2e): give the provisioned-root VM a reachable git remote
VM creates now run the environment checks before creating the workspace
(#40152). The fixture VM's origin pointed at a GitHub URL it cannot push
to, so the git push check failed and the create paused on the build
sheet; the spec then read the VM's primary checkout before it was
adopted. Point the VM checkout at a local bare repo so the checks pass.
* test(e2e): wait for the provisioned root's adoption, not its listing
The VM's primary checkout appears under its branch name once its project
is set up, before the environment checks finish and adoption writes
ephemeralVmCheckoutMode. Poll for the adopted row instead.
* refactor(environment-providers): add EnvironmentProviderDriver, contract test kit and ShellRecipeDriver (#40315)
One lifecycle seam (create/resume/suspend/destroy/status + capability flags and a
catalogued error type) that every environment provider implements, a shared
vitest contract any driver runs from its own test, and ShellRecipeDriver, which
wraps today's orca.yaml / plugin VM recipe runner and passes the contract.
No production callers yet.
* refactor: group agent launch, status, and messaging owners (#40313)
* refactor: group agent launch, status, and messaging owners
* refactor: consolidate direct owner imports
* refactor: import pane ownership directly in status listeners
* Update README downloads badge (#40336)
Co-authored-by: buf0-bot[bot] <252831055+buf0-bot[bot]@users.noreply.github.com>
* refactor(environment-providers): run shell recipes through ShellRecipeDriver (#40332)
The runtime service and failed-start cleanup now reach orca.yaml environment
recipes and plugin VM recipes through ShellRecipeDriver's recipe-shaped steps.
Same arguments, same runner, same results: records, failure copy and
diagnostics are unchanged.
* test: remove low-value hook and mirror tests and search benchmarks (#40335)
* test: remove private hook checks and manual search benchmarks
* test: remove masked mirror hydration case and exclusive scaffolding
---------
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(native-chat): show approved Codex automatic reviews as neutral notices (#40161)
Codex reports both approved and denied automatic approval reviews on the
guardianWarning channel. Orca rendered every one as a yellow "safety review
warning", so routine approvals looked like problems. Approved reviews now
render as a neutral "approved this action" notice on desktop and mobile;
denials and timeouts keep the warning tone.
Co-authored-by: Sean876-alt <224890246+Sean876-alt@users.noreply.github.com>
Co-authored-by: Neil <neil@stably.ai>
* test: remove low-value composer activation provider and layout coverage (#40342)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* test: remove low-value draft and editor save coverage (#40350)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* test: remove low-value bridge speech and lineage checks (#40356)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(vm-recipes): keep a VM's checkout out of the sidebar until its create finishes (#40355)
A recipe VM create registers the VM's project before its environment
checks run, so the VM's primary checkout showed as a normal workspace
next to the pending row while the checks ran or were paused on a
failure. Hide that checkout in both sidebar list models until the
create adopts it (or makes its worktree). A cancelled or failed create
keeps it hidden while its VM is cleaned up; a VM that could not be
cleaned up is shown again so it can be removed.
* test: remove low-value messaging simulator and editor suites (#40363)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* feat(runtime): tell phones when relay hosts change (#40122)
* feat(runtime): tell phones when relay hosts change
* fix(runtime): keep the relay host backstop live and watch every list input
* fix(mobile): hold the relay host feed only for desktops that announce changes
* perf(runtime): watch relay host inputs only while phones read the list
* perf(github): use the desktop's PR fallback rule on the phone and forward refreshes (#40128)
* perf(github): use the desktop's PR fallback rule on the phone and forward refreshes
* fix(github): keep a merged fallback PR while the phone has no head
* feat(mobile): keep Tasks and new-workspace drafts across kills (#40127)
* feat(mobile): keep Tasks and new-workspace drafts across kills
Task comments (per item and project row), the New issue title and body,
and the New workspace note now live in device-store draft rows. They come
back after the form closes or the app is killed, and only into an empty
field. A comment's setter stays bound to its item, so a send that settles
after the user moved on clears the right row.
* fix(mobile): rebuild comment sends when the draft's item changes
* fix(mobile): key the workspace note by host and keep cleared fields cleared
* fix(mobile): clear only the note a finished create sent
* fix(mobile): count clearing an empty draft field as the user's choice
* perf(mobile): cap field drafts, read sheet drafts on open, retry a failed read once
* fix(mobile): retry a failed draft read after a pause and keep New issue text typed during a create
* fix(mobile): save draft text again once a failed store read can be retried
* fix(mobile): remove a stored draft when an unread field is cleared
* fix(mobile): floor event-driven reads after failures and catch up reads that span a stream reopen (#40142)
* fix(mobile): floor event-driven reads after failures and catch up reads that span a stream reopen
* test(mobile): pin the event router's read floor after a refused read in a recording
* perf(mobile): stop rebooting the Home spare page on every hop and after iOS memory warnings (#40270)
* perf(mobile): back off spare page refills after an unclaimed drop or memory warning
* fix(mobile): skip a spare whose store read outlived an unclaimed drop
* fix(mobile): arm the spare refill timer on whole milliseconds
* feat(vm-recipes): show VM lifecycle states in the sidebar, with Suspend/Resume VM (#40046)
* feat(vm-recipes): show VM lifecycle states in the sidebar, with Suspend/Resume VM
* fix(vm-recipes): Suspend VM suspends an idle parent with active children; dedupe repeat suspends
- With active children, Suspend VM sleeps this workspace too, so its VM
suspends once their sessions stop.
- A repeat Suspend VM while one is pending is dropped in the coordinator
instead of trusting a possibly stale suspended record.
- After a direct suspend, re-probe the host so its header reads Suspended.
* perf(mobile): keep three visited terminals mounted (#40111)
* perf(mobile): keep three visited terminals mounted and release hidden WebGL
* fix(mobile): scope the mounted-terminal LRU to the terminal frame
* fix(mobile): keep chat's lease-only stream when a terminal pane unmounts
* fix(mobile): report a hidden terminal's cell box only once it is shown
* perf(mobile): keep hidden terminals' WebGL contexts instead of rebuilding them on every switch
* feat(mobile): open chats on their last messages after a relaunch (#40166)
* feat(mobile): open chats on their last messages after a relaunch
The phone's store keeps each chat's newest rows (up to 512 KiB, 500 rows)
and its resume point, written when a turn settles, on hidden and when the
chat closes. A relaunched session opens on its stored chat tab, paints the
saved rows, and resumes from the stored cursor; the live read restates what
the agent is doing. Offline, the composer line says when the copy is from.
* test(mobile): keep the relaunch test typechecking
* i18n(mobile): translate the offline as-of line
* perf(mobile): encode chat copies in slices off the settle frame
* feat(mobile): keep commit, PR and review drafts across app kills (#40114)
* feat(mobile): keep commit, PR and review drafts across kills
* refactor(mobile): build commit, PR and review drafts on the shared draft fields, and clear only the text that was sent
* fix(mobile): keep a toggle made during Write with AI, the edit note while its sheet closes, and a newer PR edit after an earlier save
* test(mobile): wait for the saved review note row instead of sleeping
* perf(mobile): keep a hash of the PR text an edit was typed against, not a second copy
* test: remove low-value VM creation assertions (#40367)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* perf(mobile): open Home with last-known workspaces and counts (#40129)
* perf(mobile): open Home with last-known workspaces and counts
* fix(mobile): keep disconnected desktops on Home and judge agents by the client's connect time
* fix(mobile): store the seeded Home counts before removing the old snapshot
* fix(mobile): floor router reads after failures, catch up reads that span a stream reopen, seed the wide host list from Home
* fix(mobile): keep the old Home snapshot until the store can take it, and never re-date stored totals
* perf(mobile): key Home's counts in the host list module so the page boot never loads Home's code
* test(mobile): type the Home catalog adapter's modules with type imports
* perf(mobile): read Home's stored rows in one batch beside the host list, and keep mark-read a delta read
* perf(mobile): paint Home's desktop rows without waiting for the stored counts
* perf(mobile): restore Home's stored rows after the desktop list paints, from its host ids
* perf(mobile): read Home's counts on the connected edge itself, not a render later
* test: remove browser startup and CLI prerequisite mock suites (#40371)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* test: remove low-value VM, mobile, work-item and terminal suites (#40376)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* test: remove sidebar VM-wake and template hover suites (#40379)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(vm-recipes): hide an in-progress VM checkout in every window, the phone and the jump palette (#40373)
* fix(vm-recipes): hide an in-progress VM checkout in every window, the phone and the jump palette
A VM create's checkout was hidden only in the sidebar of the window that
started the create. Windows now publish their pending VM checkouts to the
main process, which shares every window's set with all windows and
filters the paired phone's host workspace list and workspace context.
The jump palette and the sidebar read the shared set, and a grouped VM
project no longer draws an empty-project placeholder while its create
is pending. A window's set is dropped when it closes, crashes or reloads.
* test(project-groups): reset leaked runtime environment revisions between files
* test: remove thin agent-hook and mobile migration suites (#40382)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(vm-recipes): tell paired phones to re-read workspaces when a VM create's pending checkout changes (#40384)
The phone filters in-progress VM checkouts only when it reads its host
workspace list, so a read made before a window's hide reached the main
process kept showing the checkout until the next unrelated change. Emit
worktreesChanged for each repo whose pending checkout appears or goes
away; phones already re-read their host workspace list on that event.
* test: remove agent-hook projections and URL inventories (#40388)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* test: remove low-value agent-hook and row-projection coverage (#40395)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(mobile): stop Review's branch compare re-reading back to back during git bursts (#40278)
* fix(mobile): stop Review's branch compare re-reading back to back during git bursts
fetchHostQuery re-read a compare as soon as it landed marked by a git event, so a burst of gitStatusChanged events with reads slower than the event spacing kept the desktop running compares back to back, and kept going after Review closed. A re-read now goes at once only after a quiet spell (a write's own event), otherwise floorMs after the last read landed, and stops once Review's build is no longer current. A superseded build no longer evicts the entry a newer build is reading.
* fix(mobile): show each compare that lands during a git burst while Review reads it again
* fix(mobile): keep note edits when a later compare lands on a shown Review build
* test: remove low-value browser, store and adapter suites (#40399)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* test: prune low-value worktree, SSH and activation coverage (#40406)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* test: prune low-value terminal and workspace coverage (#40413)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* feat(speech): run GGUF models on transcribe-cpp with a CPU fallback (#39326)
* feat(speech): run GGUF models on transcribe-cpp, falling back to the CPU
The speech host child can now load a second engine. A model whose files
are GGUF runs on transcribe-cpp (Metal on Apple silicon, Vulkan on
Windows and Linux, CPU otherwise); everything else stays on sherpa-onnx,
which remains the only engine on Intel Macs.
A GPU that fails to load, errors, stalls for 25 s or crashes the process
moves the dictation to a CPU-only process (TRANSCRIBE_BACKENDS=cpu) that
replays the audio the GPU had not decoded yet, so no words are lost or
repeated. A GPU that crashed or would not load is remembered per
transcribe-cpp version and OS release, and voice.speechGpu = 'off' keeps
it on the CPU.
Packaging copies transcribe-cpp, koffi and the target's native package
into resources/node_modules outside asar, fails when a target's package
is missing, and ships the MSVC runtime beside transcribe.dll on Windows.
No catalog model is GGUF yet, so nothing runs on transcribe-cpp until
the catalog change that follows.
* fix(speech): keep the speech queue running after a failed task, and drop audio frames after a discard
* fix(speech): keep the engine's file reads off the main thread's hot paths
The engine lookup and the GPU failure marker are read once per process
instead of on every dictation start and mobile catalog request, the marker
is written asynchronously, and the child reads the hotwords file with
fs/promises. The baseline moves the existing engine presence checks from
stt-worker-paths to the shared package table and adds the once-per-process
marker reads.
* test: prune low-value browser WSL and telemetry coverage (#40418)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* feat(mobile): keep a failed dictation's recording and offer Retry (#40276)
* feat(speech): dictate through any OpenAI-compatible transcription service (#40160)
Add an OpenAI-compatible model whose base URL, model and optional key
are set up in a Voice settings dialog and sealed together in ~/.orca,
so a key is never sent to a host it wasn't saved for. It reaches
OpenAI, Groq, Mistral and local servers, and replaces the unused
userModels setting.
* test: remove low-value browser, hook and SSH cases (#40423)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* feat(dictation): show committed and in-flight words in the dictation pill (#40428)
The pill showed only the current partial and went back to Listening after
each final, so pause-committed phrases from transcribe-cpp never appeared.
The host's transcript fold moves to src/shared and the desktop pill uses it
too: committed text in the foreground, tentative text muted.
* test: remove redundant browser matrices and SSH inventories (#40429)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* feat(settings): add a Use GPU switch for on-device dictation (#39466)
* feat(settings): add a Use GPU switch for on-device dictation
On by default (Auto: the GPU when it works, the CPU when it fails).
Turning it off keeps the transcribe-cpp speech process on the CPU, for
machines whose GPU driver freezes or restarts them. The row shows when
the selected model runs on transcribe-cpp.
* fix(speech): reload the warm speech model when Use GPU changes
A loaded recognizer kept the GPU choice it started with, so turning Use GPU
off left the next dictations on the GPU until the model unloaded.
* fix(speech): reload the speech model after a dictation when Use GPU changed during it
A recognizer still in use when Use GPU changed stayed loaded afterwards with
the old choice. It now unloads as soon as its last dictation ends, and the
warm-up loads it again with the new choice.
* test: remove low-value terminal, browser-session and SSH cases (#40433)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* perf(mobile): show accounts from the last snapshot (#40425)
* perf(mobile): show accounts from the last snapshot
* fix(mobile): never count a stored accounts snapshot as live
* test(mobile): pin when accounts usage counts as live
* fix(mobile): date accounts reads by when they were sent and block switches until live
* fix(mobile): show accounts usage only from this screen's own read, drop replies from before a reconnect
* feat(mobile): save the chat when the app leaves the foreground (#40417)
* feat(mobile): save the chat when the app leaves the foreground
A swipe-kill from the app switcher can end the app before the page is
hidden: iOS fires visibilitychange only at background, and Android Recents
leaves the activity resumed. The shell now sends an appInactive frame on
iOS inactive and Android window blur, to pages that declare they read it,
and the page saves any chat rows the store doesn't hold yet.
* fix(mobile): keep the leave callback out of render
* fix(mobile): notice a changed middle row before skipping a chat save
* test: remove low-value locale, automation and settings cases (#40437)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* feat(mobile): keep dictating after leaving the session, with a floating pill (#40421)
* feat(mobile): keep dictating after leaving the session, with a floating pill
* feat(mobile): translate the dictation pill and its toasts
* fix(mobile): type away words without claiming the terminal, and keep the pill above screens
* fix(mobile): float the pill above bottom bars, reopen the owner's own screen, and tell a refused start wherever you are
* fix(mobile): float the dictation pill above the source control bar
* fix(mobile): keep pill state out of the host context and reopen the starting screen first
* refactor(mobile): subscribe the pill only while it shows and trim the session dictation hook
* fix(mobile): key bar clearances by symbol
* feat(speech): move the speech models to transcribe-cpp and offer an update for old downloads (#39468)
* feat(speech): move the speech catalog to transcribe-cpp models
Parakeet v2/v3, Whisper tiny and SenseVoice now download their GGUF
builds, which run on transcribe-cpp everywhere, Intel Macs included (on
the CPU). A model still holding its old sherpa-onnx download shows
"Update to the faster version (<size>)"; updating replaces the old
files, and dictating before then says the model needs that update.
The five models with no GGUF build are retired and their users moved
over: the Japanese Parakeet, the Chinese-English Zipformer and the
Paraformer to SenseVoice, and the Korean and Chinese streaming
Zipformers to the new Nemotron 3.5 (28 languages). Nemotron's locale
codes (ko-KR) are matched from the ISO language setting.
* feat(speech): offer the speech model update once after the engine change
A card in the notification corner tells people whose selected on-device
model needs the new download, or whose retired model was replaced, and
starts the same download as Settings > Voice. After a replacement it
offers to delete the retired model's files.
* feat(speech): move retired Korean and Chinese models to SenseVoice and offer Whisper Large v3 Turbo
On transcribe-cpp 0.4.1 with Metal, SenseVoice beat Nemotron 3.5 on Korean
and Chinese FLEURS clips, so the retired Korean and Chinese streaming
Zipformers now move to SenseVoice. Whisper Large v3 Turbo (Q8_0, 886 MB)
joins the catalog as the most accurate choice for Japanese, Korean and
Chinese. Nemotron 3.5 stays, described by the languages it does best.
* Update README downloads badge (#40440)
Co-authored-by: buf0-bot[bot] <252831055+buf0-bot[bot]@users.noreply.github.com>
* perf(github): answer phone PR lookups from the desktop's last result (#40430)
* perf(github): answer phone PR lookups from the desktop's last result
* fix(github): order last PR outcomes by lookup start sequence
* fix(github): keep reused phone PR outcomes out of the refresh observers
* fix(github): reuse a fallback-found PR only for the same fallback number
* test: remove low-value CLI, settings and shortcut suites (#40441)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* refactor(speech): remove sherpa-onnx (#39473)
transcribe-cpp is now the only on-device engine on every platform, so
the sherpa-onnx packages, their packaging (extraResources, the darwin
libonnxruntime prune, the native-variant assert and the Linux libstdc++
exemption), the sherpa recognizer in the speech process and the
per-model engine choice all go. Hotwords are written as plain terms.
* test: remove low-value CLI and renderer inventories (#40445)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* feat(runtime): tell phones when the desktop refreshes a PR (#40438)
* feat(runtime): tell phones when the desktop refreshes a PR
* fix(runtime): name every checkout a coalesced PR read stood for
* fix(runtime): don't count a read that couldn't load checks as a checks change
* feat(speech): spell dictated code terms with a personal and per-repo dictionary (#40450)
* feat(speech): spell dictionary terms in dictation, with repo terms and Whisper prompt
* test(speech): pin host repo terms for phone dictation
* fix(speech): keep symbol terms whole, accept null setup params, resolve SSH repos
* refactor(speech): key transcript words once and type phone terms at the reply schema
* refactor(speech): merge speech-types imports in the speech IPC
* test: remove low-value suites and redundant examples (#40457)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(speech): keep words spoken while the model loads (#40454)
Stopping a CPU dictation closed the renderer's audio port while frames still
waited behind a decode in the speech worker; the close ended the stream at once
and the queued frames were dropped. A close after 'end' now leaves them to
decode. A model slower than 30 s to load also lost the start of the dictation,
since the renderer kept only 30 s of startup audio; it now keeps as much as the
host waits for the load.
* fix(dictation): match the pill's Chinese and Japanese phrases to the inserted text, and space Korean ones (#40455)
* fix(dictation): join Chinese and Japanese phrases without a space, and space Korean ones
The shared transcript fold joined every phrase with a space, so the pill and
phone replies showed Chinese and Japanese text with spaces the inserted text
doesn't have. It now joins with the same rule as insertion. That rule treated
Hangul like Chinese and Japanese, so Korean phrases were inserted with no space
between sentences; Korean spaces words, so Hangul now spaces like Latin text.
* fix(dictation): don't space after Chinese and Japanese full-width punctuation
* fix(dictation): join retried phrases with the same spacing rule
* fix(dictation): escape the spacing rule's non-ASCII marks for the orcad bundle
The shared fold now pulls the spacing rule into the orcad server bundle, which
must stay ASCII. A rich-draft test pinned Hangul joining without a space; it
now expects the Korean spacing.
* Improve project group ordering across hosts (#39816)
* Improve project group ordering across hosts
* fix(project-groups): restore each group order after a failed drop
A deleted group made the aggregate rollback stop early, leaving other groups at
the ranks from the failed drop. Restore each group independently and log the
swallowed single-update failures again.
* refactor(main): give project group RPC methods their own module
Keeps repo.ts under the 300-line cap as the project group surface grows.
* test: remove low-value browser, CLI and budget checks (#40459)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(i18n): preserve web runtime error details (#40267)
* fix(web): preserve runtime failure details
* fix(i18n): update chat behavior settings hint
* feat(speech): commit dictation text at each pause with Silero VAD (#39378)
Offline models write out the speech before each pause while recording goes on.
Short noises and slow window-padded decodes are held off the pause cuts, a VAD
error falls back to bounded chunks, and slow phrase decodes are judged per
dictation against the time spoken. The VAD download carries legacy files and
fetches after any GGUF model.
* test: remove low-value CLI, browser and E2E checks (#40466)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* Show the setup-script choice instead of greying out Create (#40341)
* Show the setup-script choice instead of greying out Create
With a project's setup script set to "Ask every time", Create stayed
disabled until the user picked Run or Skip, but that choice only renders
inside the collapsed Advanced section, so nothing explained the greyed-out
button. Keep the choice out of the disabled gate (as the gate's own comment
already intends) and have Create open Advanced to show it.
* Annotate the partial submit fixture cast
* Bring the setup choice into view when Create needs it
Create now scrolls the Run/Skip choice into the dialog's view and focuses
it on every attempt, including when Advanced is already open, and the
late-discovered setup path uses the same reveal. A submit that only jumps
to an existing pending creation no longer asks for a setup choice.
* Reveal the setup choice once per Create attempt
The choice clears the reveal request after scrolling and focusing, so a
later remount (for example after switching projects) cannot pull focus
without a new Create.
* Drop a pending setup reveal once the user has chosen
Choosing Skip in the moment before the reveal fired could still move focus
onto Run, so a later Enter switched the choice.
* Save a pasted workspace directory as the path it names (#40347)
* Save a pasted workspace directory as the path it names
A workspace directory with a leading space (" /Users/me/dev") was saved as
typed. Readers treat it as relative, so Orca resolved it inside every
registered repository and created an empty " /Users/me/dev" tree in each.
Normalize the saved value once where settings are written and loaded, as
the leading ~ fix did: leading whitespace before an absolute or home path is
dropped, while relative paths and trailing characters stay exact. A value
repaired on load keeps its old spelling in history so checkouts under the
old root stay visible. The settings field shows the saved value.
Co-authored-by: Eng. Mahmoud Bek ElNemer <ElNeMeR70@users.noreply.github.com>
* Expand ~\ only where it is a home path; drop type casts
* Classify the padded path with the host's own path rules
On macOS and Linux a leading backslash is part of a relative name, so only
Windows treats \work as absolute.
---------
Co-authored-by: Eng. Mahmoud Bek ElNemer <ElNeMeR70@users.noreply.github.com>
* fix(i18n): translate browser password prompts (#40446)
* fix(i18n): translate browser password prompts
* fix: wrap localized password save actions
* OpenCode subagents show in Chat UI and keep a chat open while they run (#40141)
* fix(native-chat): show OpenCode subagents and keep a chat open while they run
OpenCode reports each subagent as a child session when the client opts in.
Orca now opts in, files each child's tool calls and replies under its own
subagent, and keeps the subagent open until the child reports that it
completed, failed or was interrupted, including after the parent turn ends.
Co-authored-by: SeaBee <85791528+seabee33@users.noreply.github.com>
* fix(native-chat): keep a subagent's tool context when its rows are read back from the journal
Co-authored-by: SeaBee <85791528+seabee33@users.noreply.github.com>
* fix(native-chat): a Stop also ends running OpenCode subagents, and each subagent can be stopped from the strip
Co-authored-by: SeaBee <85791528+seabee33@users.noreply.github.com>
* fix(native-chat): only a chat Stop closes OpenCode subagents, an early subagent Stop stays available, and the close request has a deadline
Co-authored-by: SeaBee <85791528+seabee33@users.noreply.github.com>
* fix(native-chat): a subagent Stop that the subagent confirms while the request is out reads stopped
Co-authored-by: SeaBee <85791528+seabee33@users.noreply.github.com>
* refactor(acp): close child sessions from the agent connection
Keeps the session runtime under the line limit after the main merge.
* test(acp): read a child command through a type guard
* fix(native-chat): a subagent that reports its ending reads stopped even when the close request fails
A child Stop's session/close now asks the agent to drop the call on timeout instead of withdrawing the write.
* test(native-chat): OpenCode subagent calls group with other agents' subagent calls
---------
Co-authored-by: SeaBee <85791528+seabee33@users.noreply.github.com>
* fix(native-chat): honor Windows environment overrides consistently (#40301)
* fix(native-chat): apply Windows environment overrides consistently
Use the same case-aware composition for native chat launches, preflight,
model discovery and naming. Canonicalize configured Windows names before
account readers and preserve account pins and POSIX case distinctions.
Tracked in #39075.
Co-authored-by: 김태겸 <oharapass@gmail.com>
Co-authored-by: Vitalii Kulish <mancunianez@gmail.com>
* test(native-chat): cover effective Windows catalog changes
* test(native-chat): retain child environment test import after sync
* test(native-chat): verify Windows child environment precedence
---------
Co-authored-by: 김태겸 <oharapass@gmail.com>
Co-authored-by: Vitalii Kulish <mancunianez@gmail.com>
* Source Control's Codex model menu lists your account's models even when Codex's catalog is large (#40117)
* Source Control lists Codex models from app-server model/list instead of debug models
The Codex text-action picker read 'codex debug models', a dump of Codex's whole
catalog with prompt templates (40-90 KB per model). Once it passed the 4 MiB
output cap discovery failed and the picker kept Orca's built-in list, and the
dump's hidden entries were selectable. List models with app-server model/list
(hidden rows excluded), over Source Control's own launch, lock and teardown,
with the same 4 MiB input budget and 60 s deadline.
* Bound Codex model discovery input in bytes, key its cache case-insensitively on Windows, and stop the app-server only when it ignores stdin EOF
- Count raw bytes from both streams against the 4 MiB budget.
- Read CODEX_HOME (and other account dirs) case-insensitively on Windows for the host cache key.
- Skip the post-listing kill when the app-server already exited; fail waiting listing requests once discovery settles.
- Report an incomplete model list as such.
- Tests: fake-timer grace and successor admission after a successful listing, method-not-found and unreadable-page fallbacks.
* Key the Codex discovery cache on the env spelling Windows spawn uses
Windows env names ignore case and Node's spawn takes the lexicographically first spelling, so
CODEX_HOME wins over codex_home; the cache key now picks the same one.
* Narrow Codex app-server records with the provider record guard instead of type assertions
* Read Source Control action model picks under the repo's host key, as the picker saves them
Local repos resolved generation under the 'unknown' host key because their connection id is undefined, so the saved pick was skipped and the agent default ran.
* Key Source Control model picks by connection until the repo record loads, and test with a real local repo
* Key a native Codex listing's cache on process.env when no agent env was resolved
* feat(speech): record each model's languages, licence and measured error rates in the catalog (#40431)
Error rates come from Orca's speech bench (transcribe-cpp 0.4.1, Metal, pinned GGUFs):
LibriSpeech for English, 5 FLEURS dev clips for de, es, fr, ja, ko, pt, ru, tr and zh.
speechModelQuality turns them into the Voice settings word scale.
* fix(speech): let a slow on-device finish run while the engine still answers (#40460)
* fix(speech): let a slow on-device finish run while it still returns text
The stop timeout counted 60 s from Finish however much audio the engine still had
to decode, so a CPU model on a busy machine failed a dictation it was still
transcribing. It now fails only after 60 s without text for that dictation.
* fix(speech): count any engine answer as progress while a dictation finishes
* fix(mobile): close the details card when you touch the terminal (#38823)
* fix(mobile): close the details card when a touch lands outside it
Co-authored-by: zhangxaochen <3416677+zhangxaochen@users.noreply.github.com>
* fix(mobile): explain the pointerdown listener and drop a focus check that can't fail
---------
Co-authored-by: zhangxaochen <3416677+zhangxaochen@users.noreply.github.com>
* feat(dictation): pulse three dots in the pill while spoken words are still on their way (#40443)
* feat(dictation): show pending dots while the engine holds speech it hasn't committed
The VAD pause segmenter already knows when a phrase is open. The recognizer
now posts speech-pending when a phrase opens and clears it once that phrase's
text is posted, and the desktop pill shows three dots after the text while it
is on. Only pause-cut on-device streams send it, so cloud, the paired web
client and phones keep today's pill.
* fix(speech): keep a lone click from turning the pending dots on
* perf(native-chat): addressed tab-map transitions for chat membership (#40098)
* perf(native-chat): project structured chat tabs per workspace bucket
The shared chat-tab list was keyed on the whole unifiedTabsByWorktree
identity, so every tab write anywhere (terminal title batches included)
rescanned all tabs and handed every consumer a new list. Rebuild only the
buckets whose identity changed and return the previous list while no chat
tab changed.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* perf(native-chat): reconcile chat status membership per changed tab
The status bridge rebuilt every member and host group and captured every
chat on any tab-map or owner-input change, and recaptured every chat on any
launch notification. Mem…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
If you highlight text in a chat reply and click "Add to chat", the quote goes into the chat box, but the typing cursor stayed where it was, so you had to click the box before you could type. The "Add to chat" bubble was still open when the app tried to move the cursor, and the app doesn't move the cursor while a popup is open. The bubble now closes first, and the cursor ends up in the chat box ready for typing.
What Changed
Before: clicking "Add to chat" on a text selection put the quote in the composer but left focus outside it. Keystrokes went nowhere until you clicked the composer.
After: the quote is added and the cursor sits in the composer under it, as #26018 originally described.
Mechanism:
focusMountedNativeChatEditorreturns early whilegetOverlayFocusOwners()is non-empty. That gate was added in #37403. The button inSelectionAddToChatPopovercalledonAddfirst andsetRequest(null)after it, so the popover'srole="dialog"content was still mounted withdata-state="open"during the chainappendText->writeNativeChatComposerText->focusMountedNativeChatEditor, and the popover blocked focus for its own action. The handler now:flushSync(() => setRequest(null)),onAdd(text, rect).The popover content is rendered conditionally, so it unmounts right away and leaves no open node behind during an exit animation. The markdown preview uses the rect to place its menu. The rect is read before the popover closes, so that menu still opens in the right spot.
Why
Adding a quote is almost always followed by typing a reply. The right-click "Add to chat" path (
use-native-chat-context-menu.tsx) was already fixed this way in #37403:flushSyncthe close, then append. This change reuses that order instead of adding a second focus path. We considered marking the popover as a non-owning surface withdata-focus-behaviorand rejected it. That attribute is meant for page lists and editor suggestions, and closing first also matches what the user sees.Linked Issue
Fixes #39844
Visual Proof
N/A. Nothing on screen changes except where the text cursor ends up after the click. Tests cover this directly: the regression test checks the real overlay-focus gate, and a probe checks where
document.activeElementlands (see Testing).Testing
Reproduced on
main: I ran the new test againstorigin/mainsource. It fails atNativeChatSelectionQuote.test.tsx:114with the open popover (data-slot="popover-content" role="dialog") reported as a focus owner (1 failed, 7 passed).Independent probe: this one renders the popover with a contenteditable composer and calls the real
focusMountedNativeChatEditorfromonAdd. Onmain,document.activeElementis<body>. With this change, focus lands in the composer, andonAddruns once and receives aDOMRectfor both mouse and keyboard activation.With this change:
selection-quotespasses 8/8. The neighboring suites (native-chat quote focus, selection quote draft, markdown preview) pass: 17 files, 76 tests.Static checks:
oxlint,oxfmt --check, the anti-slop, native-plugin and ast-grep gates, and the changed-code quality gate are all clean on the touched files.Platforms: tested on macOS only. The change is renderer-only, with no platform-specific code and nothing that touches SSH/remote, mobile, or folder workspaces.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Risk
The riskiest part is the markdown preview, which shares this popover and opens a menu at the button's position from
onAdd. Because the rect is read before the close, the menu keeps its position. If that broke, the menu would open in the wrong place. The change is renderer-only, with no saved data, settings, or remote protocol changes. A plain revert backs it out.Level: Low
Review
Original fix by @manuelmeurer in #39845. It was squashed onto current
mainwith no code changes and authorship preserved.Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)