Commit Graph
20254 Commits
Author SHA1 Message Date
Jinwoo Hong 9f140c62b0 fix(terminal): see a prompt's turn start while child work keeps the agent busy (#38394)
* fix(terminal): see a prompt's turn start while child work keeps the agent busy

A Claude Code agent sitting at its prompt with background agents or shells
running reports working, held open by that child work. A prompt sent with
terminal send then started a turn without moving the row's state clock, so
the receipt never saw turn_started and warned the Enter may have been
swallowed, even when the prompt was submitted and answered.

Submission observation now reads the main agent's own turn start. The
receipt warning says the start was not seen yet rather than implying a
swallowed Enter, and terminal send --help describes --wait-submit and
--retry-request.

* test(terminal): type the child-work test's main-agent row instead of casting it
2026-11-08 02:27:37 -05:00
Jinjing ec07019a12 Use Ctrl+K for search on Windows and Linux (#39767)
* Use Ctrl+K for search on Linux and Windows

Preserve existing search and terminal clear shortcuts for legacy profiles until reset.

* Preserve existing Windows and Linux search shortcuts on rollout

* Preserve saved shortcuts in new profiles

* Keep window shortcut tests independent of defaults
2026-11-07 23:16:47 -08:00
Neil 4e66fb5510 fix(terminal): stop recovery snapshots from piling up on slow links; let opt-in pacing engage under floods (#39765)
* fix(terminal): send one ACK overflow recovery image per drained window

Recovery snapshots bypass ACK windows, so on a link slower than a flooding
TUI each ACK while overflowed published another full-screen image behind
the queued window. Measured through real orcad over a 1 Mbit/s shaped link
this queued images without bound: keystroke echo grew from 22s to 50s over
a 45s flood and the pane took 51s to settle. Holding the next image until
the output sent ahead of the previous one is acknowledged bounds that
queue to the window plus one image (echo <= 18s, settle 7s, 10x fewer
snapshot bytes). Server-only; no protocol change.

* fix(terminal): let adaptive ACK pacing engage under overflowing TUI floods

Through real orcad on a shaped 1 Mbit/s link, ORCA_TERMINAL_ADAPTIVE_ACK_WINDOW=1
never paced a 60fps full-screen TUI: once its queue overflowed, recovery
images cleared the queue, so later sends counted as idle trickle and the
estimate never collected window-limited samples. When it did, the images
(never acked) inflated paced RTT and tripped the divergence fallback.

- A stream whose output outran the window stays backlogged until an ACK
  finds its queue empty, so sends after a recovery still measure the link.
- The estimate records recovery images: they count as queue ahead of later
  sends (no drained/paced samples behind them) and as delivered bytes once
  an ACK of a later send confirms them.

Shaped-link soak (1 Mbit/s, 50ms): echo p50 13s -> 2.2s, settle 7s -> 1.1s.
Bench gains a 6.4 MB/s TUI scenario: paced 7.7s -> 1.2s.
2026-11-07 23:02:27 -08:00
Neil 83f8e6340d refactor(shared): organize file operations and storage owners (#39746) 2026-11-07 22:58:35 -08:00
Kelvin Amoaba 82c3c05a70 perf(mobile): switch back to a terminal without rebuilding it (#39705)
* perf(mobile): switch back to a terminal without rebuilding it

* fix(mobile): keep resume positions across terminal handle swaps

* fix(mobile): snapshot a cleared, reloaded or errored terminal instead of resuming it

* fix(mobile): cancel only resumable streams on a dropped connection and forget positions on a text-size change

* test(mobile): give the startup recording its catch-up read

* test(mobile): give terminal webview harnesses the resume state

* fix(runtime): end resume for a stream that saw its coverage reset while live
2026-11-08 06:54:46 +00:00
Jinjing cdc0f0306b Focus session search when switching sidebar tabs (#39763) 2026-11-07 22:54:20 -08:00
Kelvin Amoaba 5e361be030 fix(mobile): Jump back in follow-ups from W8b (#39702) 2026-11-08 06:54:05 +00:00
Kelvin Amoaba b40e868132 feat(mobile): offer to restore unsaved file and Markdown edits after the app is killed (#39710)
* feat(mobile): offer to restore unsaved file and markdown edits

* fix(mobile): keep offered edits through other discards and clear saved Markdown drafts

* fix(mobile): offer a copy of edits to a now read-only document and key drafts by host

* refactor(mobile): one guard for the draft save effect

* fix(mobile): clear an offer once its edits are saved by hand
2026-11-08 06:53:26 +00:00
Neil d5ef05a973 relay: edge fence failures (stale/conflict) recorded and retried from the evacuation sweep; cap pushes under row lock at 8 in flight (2 s); jti on edge admin tokens (#39740) 2026-11-07 22:53:05 -08:00
OrcaWinandOrcaWin 79c05e3f14 refactor(i18n): read AgentLaunchSetupPanel's copy from useTranslate (#39761)
The batch skipped it because the rewrite would cross the line budget;
with the panel's current shape the converted file fits, so convert it
in place with no split.

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 22:50:03 -08:00
Kelvin Amoaba 29781fc694 feat(mobile): keep automation drafts across kills (#39683)
* feat(mobile): keep automation drafts across kills

* fix(mobile): drop a created automation's draft on affirm and restore saved fields under typed ones

* fix(mobile): stop saving an automation draft after it is dropped

* fix(mobile): reopen the automation editor with in-memory edits while the store can't be read

* refactor(mobile): one rule for which automation draft fields changed
2026-11-08 06:45:30 +00:00
Jinwoo HongandSeiya Iwaoka 291d584903 fix(cli): refuse ambiguous orchestration check callers (#38460)
Co-authored-by: Seiya Iwaoka <272756172+seiyaiwaoka-CR@users.noreply.github.com>
2026-11-07 22:43:36 -08:00
Kelvin Amoaba 81c97bb124 perf(runtime): push worktree row changes; host list poll becomes a 10 s backstop (#39688)
* perf(runtime): push worktree row changes; host list poll becomes a 10 s backstop

* fix(runtime): announce title-only agent status changes and gate the rows capability with the switch

* fix(mobile): keep event reads a floor apart while a read is out; announce a retired title clear

* test(runtime): assert the rows notice without counting events
2026-11-08 06:42:18 +00:00
Brennan Benson 104d01b686 Simplify the new-tab agent launch menu (#39279)
* feat(agent-launch): simplify the new-tab agent launch menu

Drop Permissions and Arguments from the launch-mode setup panel; they are
agent defaults edited in Agent settings. Put effort levels (unlabeled) and
Fast mode on one row, and make the Launch chat/terminal buttons fill the
row at a larger size with icons. Select-mode pickers (automations, new
workspace, source control, continuation) keep both controls.

* fix(agent-launch): let current Agent settings win over launch-menu speed edits

A Fast or speed-tier edit copies the current Permissions and Arguments into the
launch draft. With no Arguments editor in the launch menu, a later settings
change was silently ignored. Launch drafts now drop Arguments stamped by older
settings; the speed choice still applies. Also stop pointing hosts without a
model list at the removed Arguments editor.

* fix(agent-launch): show Fast as a button in the launch menu

Matches the mock: an outlined Fast chip with the lightning icon in place of the
"Fast mode" switch. The chat composer keeps its switch.
2026-11-07 22:37:41 -08:00
Kelvin Amoaba 3b6d5d4c15 feat(mobile): keep screen data on the phone between launches (#39719)
* feat(mobile): keep screen data on the phone between launches

* feat(mobile): keep the repo list snapshot id across launches

* fix(mobile): don't read a key again that the boot read just found empty

* fix(mobile): late-restored strips, revocation fence and reads never built on stored data

* test(mobile): give the session startup recording the late strip watch

* fix(mobile): remember Workspace options, keep the revocation fence until reauth, store no terminal output

* test(mobile): give the view settings recording its remember hook

* docs(mobile): say what a restored key means to a fetch

* style(mobile): format host-query after rebase onto Q11
2026-11-08 06:26:49 +00:00
buf0-bot[bot] 83a3d33681 Update README downloads badge (#39760)
Co-authored-by: buf0-bot[bot] <252831055+buf0-bot[bot]@users.noreply.github.com>
2026-11-08 06:26:44 +00:00
Neil 3a0e9a27d0 refactor: organize backend runtime by defining owner (#39625)
* refactor(main): organize runtime implementation owners

* test: retire wall-clock CLI title recovery case

* refactor: route new folder mutation to runtime store owner

* test: import folder mutation store contract from its owner
2026-11-07 22:24:34 -08:00
OrcaWinandOrcaWin 8f60fbb5a9 refactor(i18n): finish the review notes send menu and resume groups on useTranslate (#39755)
Both would go over budget once converted. The send-target ordering and
the resume tree's group node move to their own modules first, then the
codemod converts the menu, its target rows and the resume tree nodes.

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 22:15:43 -08:00
Brennan Benson 1f5a5e155c /btw asks a side question in a fork beside the chat (#39268)
* feat(chat): /btw asks a side question in a fork beside the chat

In a Chat UI chat that can fork, /btw <question> (or /side) forks the chat
through its newest finished response, sends the question there, and moves the
fork beside the chat the way dragging it does. The source chat is untouched;
the draft clears only once the question went out. Agents that cannot fork keep
their own /btw.

* fix(chat): type-guard the side chat command names

* fix(chat): side chats own the screen from Send and never place an unsent question

- Placement starts at Send, retires for good on any other selection in the
  workspace or on leaving it, and looks only at the requesting workspace.
- A question that never went out leaves its fork in the background; an
  unconfirmed one says to check the side chat before asking again; a failure
  the new chat already reported is not repeated.
- The command menu shows "Available after the first reply" / "when this reply
  finishes" while it is open, using the drawn turn order.
- File pills count as attachments; picking /btw completes the row.

* fix(chat): /btw reads the newest response the drawn transcript offers Fork on

The menu reason and Send now follow the transcript's own Fork rule as drawn,
reported when it changes, instead of rebuilding turn membership in the composer.

* fix(chat): side chat failures always reach the source; watch window starts when the fork opens

- A failed side question toasts in the source even when the fork recorded it,
  since the fork stays in the background.
- The 60 s placement window starts once the fork exists, not at Send.
- The fork-point scan stops at a /clear and, for tip-only agents, at the
  newest turn; split placement looks only in the requesting workspace.

* fix(chat): /btw forgets a fork point the transcript no longer offers

- Send and the menu reason refuse a reported response that is no longer
  forkable, and an unmounted transcript reports nothing to fork.
- The fork-point scan skips subagent sections before its early stops.

* perf(chat): /btw steps over a running turn instead of walking its rows

The slot builder groups root responses by turn in its existing pass; the side
chat's fork point reads those groups newest first and skips a running turn
whole, so streamed replies add no per-row work.

* fix(chat): /btw looks past responses outside any turn and skips the scan when nothing is forkable

* perf(chat): find the /btw fork point while laying out the transcript

Per the review ruling: the slot builder keeps the newest row that offers Fork
in its existing pass, only when /btw listens, and returns one point; the
response groups and their second search are gone.

* test(chat): /btw fork point contract through the transcript and Send hooks

* refactor(chat): response rows and /btw share one Fork rule

* test(chat): /btw fork point ignores pending-only renders and an emptied conversation

* test(chat): /btw contract counts every eligibility lookup and covers an undrawn transcript

* fix(chat): /btw shows ahead of agent commands, sends on one Enter, and focuses the side chat

- Side-chat rows lead the slash menu, so a long agent catalog no longer
  pushes them past the menu's row limit.
- Enter on a fully typed /btw sends it instead of only completing the row.
- Placing the side chat also moves keyboard focus to its composer.

* fix(chat): picking /btw completes the row again, as the common pattern does

Sending a fully typed /btw from the menu bypassed a same-named skill's
release and sent on a mouse click; a pick now always leaves '/btw ' to
add a question to.

* fix(chat): on layout-owner builds the moved side chat keeps its composer focus

Main selects a tab it moved once its frame shows it there, so placement no
longer selects it first in the source pane; moveTabToNewPaneColumn reports
whether main or this window moved it, as moveTabToGroup does.

* fix(chat): side chat placement owns main-drawn moves through to the drawn result

Per the review ruling: the placement claim stays alive while main draws the
move, reads the side chat's own new pane and selection as its own, and selects
and focuses the side chat once the frame shows it moved, in place when main
refuses, and never after the user selected elsewhere. The owner command takes
an optional completion in place of its own moved-tab selection.

* fix(chat): selecting the side chat in the pane it is leaving still retires the claim

Only what main's move changes elsewhere (a new pane holding only the side
chat, another pane showing it) reads as the request's own; the selection
counter in the placement contract reads every pane's selection, and the move
helpers' completion is exercised through main's frame transport.

* fix(chat): a side chat main never moves is selected where Fork put it

When main neither draws nor answers the move before the watch ends, the
side chat is selected in place rather than left hidden; the owner command's
completion path (no moved-tab intent, hand-back asks first) is tested.

* fix(chat): a side chat this window moves keeps its focus request

The move's own changes count as the request's from before the move starts,
so a synchronous move no longer retires the claim before the side chat is
selected and focused.

* fix(chat): picking an unavailable /btw row does nothing, as the common pattern does

* refactor(native-chat): keep /btw hooks compilable by React Compiler

* fix(chat): say side chats aren't ready while a fork from the chat is opening

* test(chat): assert the opening-fork refusal without its copy

* fix(native-chat): share one latest-turn scan between /btw and transcript rows
2026-11-07 22:14:45 -08:00
OrcaWinandOrcaWin 0545d1d89e test: mount the settings nav language test inside TranslationScopeProvider (#39754)
Without the provider useTranslate() falls back to the stable module
translate(), so `t` never changes in the test and only an unmemoized
render could pass it. Mount it the way the app does.

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 22:13:26 -08:00
Kelvin Amoaba 3e9ca6e85a perf(mobile): open the PR tab with its last state and refresh only what a write changed (#39709)
* perf(mobile): open the PR tab with its last state and refresh only what a write changed

* fix(mobile): allow the phone's comment re-read and settle review findings

* fix(mobile): keep PR reads current across path switches and overlapping writes

* refactor(mobile): share PR query keys and simplify PR write rollbacks

* chore(mobile): list every PR action and comment write kind explicitly

* fix(mobile): read the push-time PR reread through an effect event

* fix(mobile): report a comment write interrupted by a path switch as unconfirmed

* fix(mobile): settle a comment write whose reply was lost from the re-read comments

* style(mobile): format host-query after rebase onto Q12
2026-11-08 06:12:07 +00:00
Jinjing 18eadb8628 Reorganize the worktree context menu (#39739)
Group related actions into submenus and clarify the scope of sleep and
delete actions for workspaces with descendants.
2026-11-07 22:05:03 -08:00
OrcaWinandOrcaWin 800ed1976e refactor(i18n): read render-path translations from useTranslate in the remaining renderer files (top-level components, app shell, entry points, hooks, lib) (#39427)
Applies pnpm i18n:reactive-translate --helpers. Output is unchanged: t delegates
to translate() and helpers default the threaded parameter.

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 22:03:03 -08:00
OrcaWinandOrcaWin d50ca31308 test: drop the workspace cleanup facet rows' work-count assertions (#39748)
Three tests only counted how often facet, measurement and query passes
ran, and a fourth checked a zero count beside its real assertion.
AGENTS.md bans work-count tests, and they fail under React Compiler,
which memoizes differently. The behavior checks stay.

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 21:54:24 -08:00
Kelvin Amoaba b4eda05c81 perf(mobile): show the last task list per filter while it refreshes (#39668)
* perf(mobile): show the last task list per filter while it refreshes

* perf(mobile): read Tasks repos six at a time

* fix(mobile): hold Tasks paging while kept rows re-read

* test(mobile): pin Tasks paging held during a query switch

* perf(mobile): read Tasks repos four at a time, the desktop's gh limit

* test(mobile): give the Linear connect recording the revalidating input

* perf(mobile): open Tasks on its kept hydration and lists through host query families

* fix(mobile): keep the desktop's newer Tasks state and only cancel screen-read queries

* fix(mobile): type the Jira refresh harness and Tasks list read for CI
2026-11-08 05:53:45 +00:00
Kelvin Amoaba 2a62af0262 feat(runtime): confirm a structured chat send by clientMessageId past the first journal page (#39667)
* feat(runtime): confirm a structured chat send by clientMessageId past the first journal page

* fix(mobile): ask the send's own chat before handing it back

* fix(mobile): read send-recorded support when the deadline fires and settle rows that land mid-lookup
2026-11-08 05:53:23 +00:00
Kelvin Amoaba 1ef68f5062 perf(mobile): stop polling automations when the desktop reports changes (#39664)
* perf(mobile): stop polling automations when the desktop reports changes

* perf(mobile): ship the host event router in the query hooks' chunk
2026-11-08 05:52:59 +00:00
Kelvin Amoaba db7ff5c8ff fix(mobile): re-subscribe Home and the follow-up preference after the client event stream ends (#39655)
* fix(mobile): re-subscribe Home and the follow-up preference after the client event stream ends

* fix(mobile): try a refused client event wire once per connected edge

* refactor(mobile): mark replayed client event readies in the shared stream

* test(e2e): give the phone feed socket client a state listener
2026-11-08 05:52:38 +00:00
Kelvin Amoaba 408a262a87 fix(mobile): re-probe an empty "+" agent list and derive the sheet state (#39651)
* fix(mobile): re-probe an empty "+" agent list and derive the sheet state

* refactor(mobile): mark the agent refresh sent from the transport's beforeSend
2026-11-08 05:52:22 +00:00
OrcaWinandOrcaWin 0b5c8f66a0 refactor(i18n): read render-path translations from useTranslate in smaller component areas (managed runtime through WSL move) (#39425)
Applies pnpm i18n:reactive-translate --helpers. Output is unchanged: t delegates
to translate() and helpers default the threaded parameter.

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 21:43:29 -08:00
Neil d406a22214 perf(git): reuse the branch-compare changed-files list while its inputs are unchanged (#39747)
* refactor(git): share the .gitattributes ancestor stamp paths

* perf(git): reuse the branch-compare changed-files list per commit pair

* perf(git): charge cached change lists for the stdout their paths retain

* perf(git): bound branch change-list reuse to five minutes for unstamped system attributes

* refactor(git): share the deadline-bounded stamp probe

* perf(git): bound branch change-list attribute stamps by a 2s deadline and 4096 paths
2026-11-07 21:42:01 -08:00
965540a7bb perf(worktrees): re-rank only the worktrees a sort save moved (#39723)
A Smart-sort save rewrote every listed worktree's rank whenever the order
changed, so every repository on the host got an order-only
worktreesChanged event. planWorktreeSortOrderUpdates now keeps the
longest run of rows whose ranks already descend in the requested order
and re-ranks only the rest. It falls back to the full re-rank when a gap
is too tight for distinct whole ranks, or when the planned ranks would
not descend strictly (float rounding at huge ranks).

When the requested order holds a row the write cannot save (WSL-move
fenced or unknown host), the write keeps the full re-rank, since that
row's unqualified rank may belong to a same-ID twin and must never
anchor a partial re-rank.

Replaces #37142.

Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
Co-authored-by: BTForIT <223167996+BTForIT@users.noreply.github.com>
2026-11-07 21:34:57 -08:00
Jinwoo Hong a55de38395 feat(cli): set and rm folder workspaces through the folder workspace RPCs (#39670)
* feat(cli): set and rm folder workspaces through the folder workspace RPCs

worktree set and rm on folder:<id> (or a path:/name: selector that matches a
folder) now call folderWorkspace.update and folderWorkspace.delete after the
runtime confirms the folder id is unique. Flags with no folder meaning are
refused before any change, a missing method reports incompatible_runtime, and
worktree activate refuses folder workspaces as not supported yet.

* test: read mocked method names without a cast

* fix(runtime): refuse shared folder ids inside folder update and delete

The CLI's show preflight could not make the id-only folder RPCs safe: an older
show could select one of two same-id rows, and a twin added during teardown was
deleted too. folderWorkspace.update/delete now take requireUniqueId, which
refuses a shared id before any side effect, and delete removes only the row it
checked. Hosts advertise folder-workspace.unique-id-mutation.v1; the CLI
requires it and reports incompatible_runtime otherwise.

* fix(runtime): refuse a folder delete when a twin appears during teardown

Two rows that share a folder id share every record keyed by it, so delete
can't keep one row's sessions while removing the other. After the awaited
terminal teardown, delete checks the id again before any cleanup or removal
and refuses with the duplicate-id error; only the stopped terminals remain as
an effect. Removal by row identity is no longer needed and is dropped.

* fix(cli): give only the repair step for a duplicated folder id

The generic ambiguity recovery told agents to pass folder:<id>, which can't
name one of two folders sharing that id.
2026-11-08 00:34:44 -05:00
OrcaWinandOrcaWin 88bbb00b19 refactor(i18n): resolve the diff comment popover's default labels from useTranslate (#39744)
Its placeholder and submit labels defaulted through translate() in the
parameter list, which runs before a hook can bind. Resolve them from
`t` in the render instead.

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 21:34:24 -08:00
NeilandFlamingoPg 6a68dac421 fix(terminal): bound WebGL atlas pages and release removed page textures (#39715)
Cap merged atlas pages at FORCED_MAX_TEXTURE_SIZE instead of the device
MAX_TEXTURE_SIZE (16384 on Apple Silicon), stop the link render layer
from acquiring the shared atlas with a mismatched 2048 texture size, and
reset GL texture slots of removed atlas pages to the 1x1 placeholder.
Mirrors xtermjs/xterm.js#6187, #6156 and #6306 in the addon-webgl source
patch and regenerates the runtime patch and lock hash.

Co-authored-by: FlamingoPg <1106310035@qq.com>
2026-11-07 21:30:43 -08:00
OrcaWinandOrcaWin efeee83b2c refactor(i18n): read render-path translations from useTranslate in smaller component areas (activity through maintenance) (#39424)
Applies pnpm i18n:reactive-translate --helpers. Output is unchanged: t delegates
to translate() and helpers default the threaded parameter.

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 21:20:59 -08:00
Neil 261bc0f2be relay-edge: single-use admin tokens (jti), signing key rotation, auth-refresh metrics (#39738)
- Admin tokens with a jti (16-128 chars) are single use, enforced inside the target
  HostRelay (one storage key, expired ids pruned on each call, capped); a repeat is 409
  'replay'. Tokens without a jti are still accepted (metric admin_no_jti) unless
  ADMIN_REQUIRE_JTI=1.
- ADMIN_SIGNING_KEY_NEXT / ERASE_SIGNING_KEY_NEXT: second accepted key for rotation;
  validated >= 32 chars when set.
- Metrics auth_refresh (extended/unchanged/invalid/identity_changed) and
  auth_expired_close (seconds since the last extending refresh).
2026-11-07 21:14:12 -08:00
fb313c4745 perf(terminal): park and defer restored plain-shell tabs whose sessions no longer exist (#39725)
Restored tabs whose local daemon session is gone no longer mount and
respawn a shell at startup; they park and respawn on open.

- Separate pty:getGoneSessionIds probe, started unawaited at startup so
  it never gates reconnect; the authoritative-capability call is unchanged.
- Binding a PTY id (spawn, cold restore, attach) clears its gone mark so a
  revived pane gets parked exit/byte watchers again; late answers for bound
  ids are ignored.
- Agent tabs (launchAgent or sleeping record) and mixed live/gone splits
  keep the mounted restore path.

Replaces #37410.

Co-authored-by: m4air <m4air@Mac.localdomain>
Co-authored-by: thefrikidude <100475418+thefrikidude@users.noreply.github.com>
2026-11-07 21:11:15 -08:00
OrcaWinandOrcaWin 9dfc0bac93 refactor(i18n): render the usage charts in their test and read useTranslate there (#39737)
The usage chart test called both charts as plain functions, which kept
them on translate() and getIntlLocale(). Render them instead and
convert the charts. The pull request page's back label moves from a
parameter default into the render.

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 21:11:11 -08:00
OrcaWinandOrcaWin 6d95515306 test: remove 297 low-value tests (#39720)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 21:10:57 -08:00
Neil 7ae6448b44 perf(terminal): opt-in adaptive ACK pacing for alternate-screen streams on slow remote links (#39735)
* refactor(terminal): own multiplex ACK window accounting in one module

* perf(terminal): pace alternate-screen multiplex output to the measured link BDP

Slow SSH links queued up to 2MB of superseded TUI frames ahead of keystroke
echo. orcad now estimates delivery rate and base RTT from existing output ACK
timing, caps in-flight output for alternate-screen streams near 2x BDP on links
under 4 MB/s, and replaces a backlog larger than that budget with the existing
recovery snapshot. Normal-screen streams and fast links keep the legacy
windows. ORCA_TERMINAL_ADAPTIVE_ACK_WINDOW=0 restores legacy behavior.

* perf(terminal): back off unavailable superseding snapshots and bound legacy echo checks

* perf(terminal): gate ACK pacing to measured remote links and keep supersedes history-neutral

Pacing now needs a base RTT of at least 40ms, 16 fresh window-limited samples,
and a sample within 15s, so LAN/local links and stale estimates keep the legacy
windows. Superseding snapshots are screen-only, only replace frames that never
switch screen mode (rechecked after serializing), and leave client history
untouched. Paced streams keep today's total buffering before overflow, so
overflow recovery fires no earlier than with legacy windows.

* fix(terminal): close supersede gaps found in review

Scan for screen switches and OSC side effects across frame and send
boundaries (raw and JSON-escaped), back off after an aborted supersede so it
cannot re-serialize in a loop, and keep paced pending headroom until the queue
drains so leaving the alternate screen cannot force an overflow recovery.

* fix(terminal): judge supersedable backlogs on decoded text across every seam

Scan the joined text of the whole queue (plus the sent tail) so screen
switches split across any frame, send, or covered/retained boundary are
seen; never supersede span frames; reject bells (via the shared bell
detector), OSC clipboard/notification writes and 8-bit OSC; back off for 1s
after a rejected scan instead of rescanning on every ACK.

* perf(terminal): make backlog superseding opt-in and forget the sent tail after snapshots

Every recovery snapshot makes current clients replay their reattach reset
(cursor shape/visibility, focus reporting), which is visible when it fires
routinely, so superseding is opt-in via ORCA_TERMINAL_SUPERSEDE_ALT_BACKLOG=1
until clients can skip it. Pacing stays on by default: on a slow link the
existing overflow recovery then reaches the client promptly instead of queuing
behind a 2MB window. After any snapshot the sent tail is unknown (it can end
inside an escape), so superseding waits for the next text frame.

* test(terminal): cover default pacing and opt-in superseding separately

* perf(terminal): read the supersede switch once per connection and skip its bookkeeping when off

* perf(terminal): make adaptive ACK pacing opt-in and fix review findings

- Default off: ORCA_TERMINAL_ADAPTIVE_ACK_WINDOW=1 enables it; when off every
  new path is a single flag check, so behavior matches legacy windows.
- Base RTT is a windowed minimum kept honest by periodic probes that drain our
  own queue; a paced RTT beyond what our window can add means the path changed,
  so legacy windows hold while the base re-learns (no more self-tightening to
  64KiB after an RTT increase).
- Paced pending headroom is capped by the connection window legacy would have
  used and released on drain, pause and detach.
- Superseding refuses snapshots that end inside an escape.
- Replace the latency-threshold unit test with hardcoded estimator tests and
  move the link simulation to bench:terminal-multiplex-ack-pacing.

* perf(terminal): drop backlog superseding and harden opt-in ACK pacing

- Remove the opt-in backlog-superseding snapshot path (code, env switch,
  frame classifier and tests); it needs a client capability to skip the
  reattach reset before it can ship.
- Paced-ness is decided once at admission (alt screen checked before the
  estimate) and reused by the send, so a probe starting in between cannot
  mislabel a sample.
- Base RTT is fed only by sends with a near-empty connection queue; probes end
  only on such samples from paced streams, and a probe that cannot drain backs
  off. A path change forgets the base and holds legacy windows until a drained
  sample re-learns it.
- Paced pending headroom is sized from the steady window (never a probe's
  zero) and released whenever the queue drains back within the legacy cap.
- Flow-level tests: disabled pacing keeps legacy frames on a measured slow
  link; drained headroom returns so later output overflows at the legacy cap.

* fix(terminal): release paced headroom whenever the queue drains, including after recovery
2026-11-07 21:07:59 -08:00
OrcaWinandOrcaWin 2f45e26ee7 refactor(i18n): read render-path translations from useTranslate in pull request page, agent, onboarding, stats, new workspace and feature tips (#39421)
Applies pnpm i18n:reactive-translate --helpers. Output is unchanged: t delegates
to translate() and helpers default the threaded parameter.

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 20:59:26 -08:00
Neil c99e71b315 refactor: group renderer runtime resource owners (#39571) 2026-11-07 20:52:26 -08:00
c00f8448d5 perf(mobile): stop loading unrelated RPC schemas in shared readers (#39727)
Import MAX_BLOCKS/MAX_PROMPT_BYTES from the module that defines them and
move automationCanonicalLaunchSetup into automation-launch-setup-source
(re-exported) so mobile shared readers skip unrelated RPC schema modules.

Carries #39022 unchanged.

Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
Co-authored-by: gentslava <14369958+gentslava@users.noreply.github.com>
2026-11-07 20:44:38 -08:00
Jinwoo Hong f341558b82 feat(cli): match folder workspaces by path: and name:, keep same-id ps rows apart (#39637)
* feat(cli): match folder workspaces by path: and name:, and keep same-id ps rows apart

Adds one runtime matcher for worktrees and folder workspaces. With the new
matchFolderWorkspaces opt-in (advertised as workspace-selector.folder-match.v1),
path: and name: also match folder workspaces; branch:, issue: and identity:
stay repo-backed. Several matches refuse with each choice's kind, host, path
and selector; a folder id shared by two folder workspaces refuses with the
repair step. The CLI resolves path:/name: through it, so terminal, file and
ports commands reach a folder workspace, and create/set parents record a
folder parent. Explicit ambiguous parents report LINEAGE_PARENT_AMBIGUOUS.

worktree ps now keeps rows that share an id on different hosts apart, with
their own host, identity, metadata and activity; activity whose host can't
be proven attaches to neither.

* test: let the cross-version ps harness pass the host-qualified summary lookup

* fix(cli): read each ps row's own host session; qualify folder selector help

* fix(runtime): refuse unscoped duplicate folder ids; hand lineage the matcher's typed result

Unscoped folder:<id> refuses a duplicated id even when only one copy's host
is derivable; a host-scoped lookup still picks that host's copy. A wsl: hook
stamp counts as local host evidence. The lineage controller receives the
worktree-or-folder candidate directly instead of re-deriving the kind.

* docs(cli): guide the ambiguity fallback through truncated ps and id: selectors

* fix(cli): report an ambiguous parent by its own choices; cover per-host sessions

* fix(cli): send parents to the runtime parent resolver as typed; translate WSL paths for folders too

Parent selectors skip the CLI's show-based folder lookup, so worktree.create
and worktree.set classify them with parent rules: a folder spanning hosts is
a valid parent, and ambiguity reports LINEAGE_PARENT_AMBIGUOUS. Caller-distro
Linux path translation now also matches folder workspaces.

* chore(rpc): import the computer-use recovery data directly instead of through an alias

* fix(runtime): report a missing set parent as LINEAGE_PARENT_NOT_FOUND, as create does

worktree set and worktree create now share one explicit-parent error
conversion: several matches give LINEAGE_PARENT_AMBIGUOUS and none give
LINEAGE_PARENT_NOT_FOUND, so a missing parent is no longer reported as a
bare selector_not_found that could mean the child.
2026-11-07 23:35:33 -05:00
OrcaWinandOrcaWin ebe3aac000 refactor(i18n): finish EditorFileTab and the checks tab actions on useTranslate (#39726)
ChecksTabActions is called as a plain function, so it now takes the
checks tab's `t` instead of reading translate(). EditorFileTab would go
over budget once converted, so its mode icon choice moves to its own
module first.

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 20:34:28 -08:00
Neil 6d122f1eb5 perf(git): use git's untracked cache and reuse unchanged line stats in status reads (#39721)
* refactor(git): move porcelain status streaming into its own module

* perf(git): let status use the untracked cache and expand collapsed directories

-uall never matches the untracked cache's stored mode, so every poll rescanned the whole tree. Scan in the configured mode and list only the collapsed '? dir/' rows with ls-files, reapplying the entry cap so results match -uall exactly. Ignored reads and status.showUntrackedFiles=no keep -uall.

* refactor(git): let the settled diff cache and stamp serve multi-path reads

* perf(git): reuse status numstat passes while their stamped inputs are unchanged

Each poll re-ran up to two whole-worktree numstat diffs even when nothing changed. Cache each pass in a SettledDiffCache validated by the worktree diff stamp (HEAD, index, .gitmodules, plus every unstaged working file for the unstaged pass); racy writes, mutations and submodule rows still recompute.

* perf(git): defer status while index.lock is held

A status read during an agent's commit sees a half-written state and is immediately redone. Wait (up to 1s, abortable, inside the shared lease) for the lock in the worktree's own gitdir to go away; a lock that survives a full wait is remembered as stale so later reads skip waiting.

* perf(git): pick the untracked scan from config and fall back to -uall when expansion cannot win

Read status.showUntrackedFiles and core.untrackedCache in one config call, remember worktrees that need -uall so polls do not scan twice, and rescan with -uall when rows sit outside cwd, need more than one ls-files chunk, or list empty.

* refactor(git): keep numstat cache limits beside the file diff limits

* refactor(git): stamp host settings files and resolve the common gitdir

* perf(git): read untracked-scan config from a stamped snapshot, with a rollback switch

Cache 'git config --list --show-origin' per worktree while every config file it named (plus repo, worktree and global candidates) keeps its stamp, so steady-state polls spawn no config read. WSL and UNC checkouts keep -uall: their config cannot be stamped from the host and network mtimes cannot vouch for the untracked cache. ORCA_GIT_STATUS_UNTRACKED_EXPANSION=0 restores the plain -uall scan.

* fix(git): stamp config and attributes before reusing status numstat

Numstat output also depends on Git config (including includes) and on .gitattributes, info/attributes and core.attributesFile. Stamp all of them, plus every .gitattributes that can apply to a changed path, and skip reuse under WSL. ORCA_GIT_STATUS_NUMSTAT_REUSE=0 recomputes every pass.

* fix(git): stamp include targets and onbranch HEAD in the config snapshot, and share one read

Include and includeIf targets (and HEAD for onbranch conditions) are now stamped, so a branch switch or a filled-in include re-reads config. Concurrent cold reads coalesce, both numstat passes share one config read, folders without their own gitdir skip the snapshot, aborted reads keep the cached entry, and Windows HOME follows Git's HOMEDRIVE/HOMEPATH order.

* perf(git): expand untracked directories only when the untracked cache is opted in

Git's default core.untrackedCache=keep only reuses a cache someone already built, and fresh repos have none, so status plus ls-files cost more than one -uall scan. Expand only for core.untrackedCache=true or feature.manyFiles=true without an override.

* fix(git): bound config stamps on dead mounts and share commondir resolution

Config file stats run under the same 2s deadline as local-git-config-signature, coalesced per file set, so a hung home or network mount skips reuse instead of stalling status. readHeadComponent now uses resolveGitCommonDir.

* test(git): pin the -uall truncation contract of untracked directory expansion

* fix(git): treat an unreadable commondir as unstampable config

main's resolveGitCommonDir rethrows non-missing errors; the config snapshot must fall back to -uall rather than reject the status read.
2026-11-07 20:33:31 -08:00
OrcaWinandOrcaWin ab6a147332 refactor(i18n): read render-path translations from useTranslate in terminal pane, tab bar and work-item dialogs (#39418)
Applies pnpm i18n:reactive-translate --helpers. Output is unchanged: t delegates
to translate() and helpers default the threaded parameter.

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 20:23:56 -08:00
Neil 2ec81bc2ca feat(claude): match Claude Code's theme to the Orca terminal theme (#39447)
* feat(claude): sync the terminal theme into Claude Code

* fix(claude): retry missed theme reloads, keep settings key order, search entry

* fix(claude): persist theme ownership before settings writes, skip deliberate themes, restore only on toggle

* fix(claude): gate theme sync on Claude Code 2.1.119, follow Orca's Claude config dirs, keep restores owed

* refactor(theme): point markdown Monaco rules at the shared contrast helpers

* fix(claude): lock theme ownership edits across Orca processes, retry missed theme reloads with backoff

* test(e2e): opt-in real Claude Code theme sync journey; retry theme reloads for up to five minutes

* fix(claude): keep theme takeover recoverable when settings writes or the lock fail; steadier e2e journey

* fix(claude): serialize theme publication with takeover and restore, per-file reload retries; record the real-Claude e2e in the isolated home

* fix(claude): retry an owed restore publish, stop off-state retries, reread settings right before writing

* fix(claude): republish theme files under the cross-process lock

* refactor(theme): point chat selection contrast at the shared helpers

* feat(claude): default theme sync on for new profiles; offer it once to existing users at their next Claude launch

* fix(claude): offer theme sync to every existing profile, confirm only after the save, honest offer copy

* fix(claude): right-align the theme sync offer's two actions, primary last
2026-11-07 20:19:22 -08:00
Kelvin Amoaba 4eeba01db0 perf(mobile): tick only agent rows on the host list and keep repo looks across polls (#39636)
* perf(mobile): tick only agent rows on the host list and keep repo looks across polls

* fix(mobile): refresh the shared clock when a list comes back within one interval

A clock stopped less than one interval ago kept its old time and started a new full interval, so a quickly reopened host list could show agent ages up to about a minute old.
2026-11-07 20:19:03 -08:00