Repository navigation
fix(tab-bar): hold the tab strip still while closing tabs with the mouse - #24271
AmethystLiang merged 563 commits into
Conversation
|
There was a problem hiding this comment.
ℹ️ Minor suggestion inline. The hold/restore mechanism is well-scoped and its focused suite passes — nothing blocking.
Reviewed changes
- Mouse-close spacer —
use-tab-strip-close-spacer.tsrecords the strip extent before each close and, for a single mouse-initiated close on an overflowing strip with the pointer over it, adds a trailing spacer equal to the closed tab's measured width and restores the pre-closescrollLeft, so tabs hold position. - Release paths — settles on wrapper
pointerleave, any keydown, a pointer press outside the strip, window blur, and worktree switch; opens shrink the spacer, and keyboard/agent/bulk/fit-strip closes are not held. - Scroll helpers extracted —
scrollTabStripByStep/isTabStripScrolledToEndmoved unchanged totab-strip-scroll-step.ts; the deferred-revealpointerleavelistener moved from the strip to its wrapper. - Close-button markers —
data-tab-close-buttonadded to browser and hosted-page rows; one capture listener handles close clicks and middle-clicks. - Tests — the layout harness now models the real flex strip (180px basis, 100px floor, clamped
scrollLeft) and a new suite covers the hold/settle cases.
I also traced the release lifecycle for a stuck spacer (drag-reorder, ⌘W while held, strip remount, agent close inside the window) and found no path where the spacer is added and never released.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
Co-authored-by: OrcaWin <[email protected]>
* fix(markdown): avoid offset arrays for ASCII Find * test(markdown): pin ASCII Find memory budget --------- Co-authored-by: OrcaWin <[email protected]> Co-authored-by: Neil <[email protected]>
…4653) Co-authored-by: OrcaWin <[email protected]>
Co-authored-by: OrcaWin <[email protected]>
…4657) Co-authored-by: OrcaWin <[email protected]> Co-authored-by: Neil <[email protected]>
…24659) Co-authored-by: OrcaWin <[email protected]> Co-authored-by: Neil <[email protected]>
…he (#24669) Co-authored-by: OrcaWin <[email protected]>
* fix(jira): expire cached attachment images while idle * test(jira): preserve cache bounds and site expiry after clears --------- Co-authored-by: OrcaWin <[email protected]> Co-authored-by: Neil <[email protected]>
…gs (#24680) Co-authored-by: OrcaWin <[email protected]> Co-authored-by: Neil <[email protected]>
…#24686) Co-authored-by: OrcaWin <[email protected]>
Co-authored-by: OrcaWin <[email protected]>
Co-authored-by: OrcaWin <[email protected]>
Co-authored-by: OrcaWin <[email protected]>
…24721) Co-authored-by: OrcaWin <[email protected]>
…24805) Co-authored-by: OrcaWin <[email protected]>
…24833) Co-authored-by: OrcaWin <[email protected]>
…red Orca servers (#24204) * fix(native-chat): a host admits structured sessions by client capability, not its own chat setting A host's experimentalStructuredNativeChat decided whether any paired client could reach agentSession.* at all, and whether session.tabs.* showed it structured tabs. That setting is the host user's own launch preference: whether a new agent opens as a chat or a terminal is decided by whoever launches it. Using it as admission control meant a client whose own preference was "structured chat" was refused on a host whose preference was "terminal", and chats opened while the setting was on were withheld from mobile once it was turned off. The gate now asks one thing: did the client advertise agent-session.structured.v1 (in-process callers negotiate nothing and are always admitted). Tab projection and restore follow the same rule. With the setting no longer gating anything, the separate cleanup gate (close, cancel, unsubscribe, release), which existed only so those kept working after the setting was switched off, is identical to the main gate and is folded into it. The settings listener that republished tabs when the setting changed is removed, since projection no longer depends on it. The host setting still picks the default for launches that start on the host itself (agent.launch from mobile, orchestration worker-start). * fix(native-chat): the desktop declares structured chat support to paired hosts The desktop renderer advertised agent-session.structured.v1 (and the Claude, turn-item and background-task capabilities that go with it) to its own main process but not to a paired Orca server. The server therefore refused every agentSession.* call from the desktop and stripped structured chat tabs out of the tab list it published to it, so a structured chat running on a paired server never appeared on the desktop, even though the renderer already mirrors a host's agent-session tabs and drives each one against the server that owns its workspace. The same renderer reads structured chats on either host, so the remote Electron list now carries the same structured-session capabilities as the local one, and the capability test pins that nothing is advertised only locally. * fix(native-chat): negotiate client-chosen launch mode so released phones and old servers keep terminals Hosts advertise agent-session.structured.client-launch-mode.v1: they admit structured sessions by client capability alone. A remote client that does not advertise it (phones released before agent.launch) asks createSupport to pick the launch mode, so the host keeps answering that with its own setting, exactly as before. Cleanup methods keep their own named gate so a future admission condition cannot make close or cancel refusable. * refactor(runtime): keep the Electron client capability list in its own module protocol-version.ts is at its line budget; the list is what the desktop advertises to paired hosts, not the host's own contract. * fix(native-chat): the desktop declares it picks each launch mode itself Paired hosts and the desktop's own main process then answer createSupport by the workspace rather than by their own chat setting. * chore(native-chat): justify the two type assertions this change's lines touch * fix(native-chat): chats that already exist keep showing whatever the chat setting says The structured chat setting decides only what new agents open as. With it off, this machine's structured chats used to be hidden while the host, which no longer reads the setting, still reported them to the workspace activation gate, so a workspace holding only a chat opened empty. The local chat mirror and its startup restore now run whatever the setting says, the continue-after-restart offer follows the chats that exist, and the setting's copy says it applies to new agents. * test(native-chat): pin that a host advertises the client-chosen launch mode * fix(native-chat): mirror this machine's chats only where it holds them Round 1 ran the local chat mirror for everyone so existing chats show whatever the setting says. That gave every desktop a permanent session-tabs listener, which turns on the runtime's phone replication paths, plus two full session-tab censuses at startup, and made the browser client mirror its remote host a second time. The runtime now says whether it holds structured chats: its structured host is built only when saved chats were restored at startup or a client created one here, and it announces the moment one is built. The mirror, the startup restore and the continue-after-restart offer run only when the setting launches chats or the host holds some, and never in the browser client. A chat a paired client creates here with the setting off still appears at once. The chat behaviour settings show wherever chats exist, and the setting's copy says it picks what new agents open as. The toggle-off teardown this made dead is removed. * test(native-chat): record install listeners without a cast * fix(native-chat): mirror this machine's chats only once it holds one, not once its host is built Session history, resume preparation, terminal resume commands and replay-safe phone launches all build the structured host for users who never had a chat, which turned on the chat mirror and the structured-only settings rows until the next restart. The signal is now derived from the host's records (or a records file still owed its import) and pushed when the first chat is restored or created. A throwing listener no longer fails the install that fired it. * feat(native-chat): createSupport reports the saved selection a new chat on this host starts with A chat on a paired server starts with the server's saved model and options, which the desktop could not read, so its picker showed a guess. createSupport's answer, which the desktop already waits for before a paired launch, now also carries that seed as a new optional field (older clients ignore it). Create and createSupport read it through one resolver so they cannot drift. * refactor(protocol): move the Electron remote client capability list into its own module Merging main left protocol-version.ts one line over the max-lines limit on this branch. The list of capabilities the desktop advertises to a paired host moves, unchanged, into electron-remote-runtime-client-capabilities.ts, the module the next PR in the stack already uses for it; importers point there. * test(cross-version): stub the launch seed resolver createSupport now reads * test(protocol): pin the desktop capability divergence against what a paired server receives Every paired transport sends the shared remote base plus the Electron list, so the divergence test now compares that union with the renderer's local list instead of the declared Electron list. A capability added only to the shared base can no longer slip past it. The two base-only capabilities it surfaced are recorded: skills.install-result.v2 has no local caller; the authoritative-inventory label is read by the local tabs sync but dropped by main, and is marked unsettled. The turn-item and both background-task-stop capabilities were already sent through the shared base, so the Electron list no longer repeats them. The wire set is unchanged; this PR's real change on the wire is structured.v1, the Claude structured capability and the client launch-mode capability. * fix(native-chat): the desktop tells its own host it picks each launch mode, so retrying an existing chat works with the setting off * docs(native-chat): name the real exit for the released-phone createSupport rule * test(cross-version): a released client still gets the host-setting createSupport answer; a launch-mode client gets supported plus the seed
Co-authored-by: OrcaWin <[email protected]>
…24781) Co-authored-by: OrcaWin <[email protected]>
Co-authored-by: Orca Worker <orca-worker@localhost>
* fix(mobile): release callbacks retained by canceled streams * test(mobile): cover delayed frames after stream cancellation Preserve late-ready cleanup while rejecting canceled scrollback and terminal routing; cover unsent cancellation across browser, client events and session tabs. * test(mobile): model unavailable queued stream transport The encrypted sender rejects writes until connection setup completes. Keep existing session-tab unsubscribe attempts and assert canceled queued openers are never replayed. --------- Co-authored-by: OrcaWin <[email protected]> Co-authored-by: Neil <[email protected]> Co-authored-by: m4air <[email protected]>
) * fix(mobile): reduce base64 allocations for encrypted text frames * Correct screencast encoder comment after byte-codec extraction --------- Co-authored-by: OrcaWin <[email protected]> Co-authored-by: m4air <[email protected]>
…24670) * fix(cursor): restore exact conversation after startup snapshot * fix(terminal): preserve ready snapshot reattach and isolate bridge fixtures * test(cursor): seed the real startup bridge after module resets * test(terminal): settle startup snapshots in remote restore fixtures Signed-off-by: Neil <[email protected]> --------- Signed-off-by: Neil <[email protected]>
…24707) Co-authored-by: OrcaWin <[email protected]> Co-authored-by: m4air <[email protected]>
…chat launch (#24564) * fix(native-chat): remove the "still starting" notice that flashed on chat launch Every structured chat passes through a starting phase, and the pane showed "<agent> is still starting. Messages wait until it is ready; close this chat to give up on it." for it. A 5 s grace period only narrowed the flash to starts that finish just past it. A message sent while the agent starts already counts as working, so the chat's working indicator and Stop cover that state; the notice only repeated it. Removes the notice, its copy in every locale, the delayed-status hook that existed only for it, and the per-child key the chat read only to reset it. * docs(agents): no pop-up notices for transient or internal states Records the rule the removed startup notice broke, so agents building UI show transient states through existing surfaces instead of new messages. * docs(agents): allow the common delayed loading placeholder The rule against delaying a flashing message should not forbid a quiet skeleton or spinner that waits a moment before appearing. * fix(native-chat): stop publishing which provider child is starting hostExecutionChild existed only to re-key the removed starting notice's delay. Older clients read it as optional, so omitting it only changes when their notice appears after a still-starting child is replaced. * docs(agents): narrow the status-notice rule's wording Ban 'execution host' rather than ordinary host copy, scope 'confirming' to a connection, and keep the no-delay rule where the common pattern delays. * docs(agents): let a control's own busy state wait, per the style guide The status-notice rule covers notices and status lines; a delayed in-place label swap like "Saving…" stays as STYLEGUIDE.md describes. * docs(agents): keep the status-message guideline out of the repo
…tart, no "Not reported" caption (#24588) * fix(native-chat): stop the loading flash, the doubled launch failure, and the "Not reported" caption - A structured chat no longer paints "Start a chat" or the full-pane "Loading conversation..." text before its first read settles; the pane stays blank until the history (or its absence) is known. A chat this view just started keeps its empty state through publish. - A failed chat start is said once, by the chat's own Retry line. The "Could not open <agent> chat" toast that fired beside it, and again on every failed Retry, is removed; the raw error still goes to the log. - The Fast mode switch in the options menu no longer carries a "Not reported" / "Default" caption. * fix(native-chat): show a quiet spinner if a chat's first read lasts The blank pane stayed blank with no cue for as long as the first read took, including a slow remote read or a pending resume. The pane now holds a textless spinner (announced as "Loading chat") that a CSS animation delay keeps invisible for the first 250 ms, so a quick read still paints nothing. A cancelled launch no longer holds the pane in that state; it shows what the chat shows when not launching. * test(native-chat): a refused new-tab chat start reports in its chat, not a toast The new-tab launch opens (or reuses) the chat tab before the start can fail, so its Retry line is the one report. The guard tests now pin that the chat tab exists and no toast fires, for both a refused start and one whose outcome could not be confirmed. * fix(native-chat): leave a failed resume's pane blank beside its Retry line A resumed chat whose start failed or could not be confirmed kept the loading spinner turning forever above "Chat could not be started.", though nothing was reading its history. The spinner now shows only while a read or the resuming launch is in flight. Also log a chat tab that throws while opening during worktree creation, and drop a comment that still described the removed launch-failure toast.
* fix(native-chat): plain wording for chat errors and status rows
Replaces Orca-internal words (host, journal, transcript, outbox, process,
unverifiable, "no contact", byte budgets) in native chat refusals, status
rows, the skills menu, subagent and background-task state labels and the
history-load error with plain language, and routes the two hard-coded
English composer errors through translate(). Copy only; no behaviour change.
* fix(native-chat): match chat copy to what happens and to the sidebar's words
- The held-message row says Orca keeps checking, which it does: the idle
sweep retries the unproven stop and a landed retry sends what waited.
- An unsettled earlier message reads as unconfirmed, not undelivered.
- The skills-unavailable line names SSH chats, its only cause.
- Subagent and background-task rows say "no recent update", the sidebar's
words for the same state, and "status unavailable" after a count; the
row no longer repeats the state as a reason.
* test(native-chat): find the repair row by its own text, not the old wording
* fix(native-chat): word the history-repair and too-large rows in the reader's language
Both rows were finished English the host wrote into the chat, so nothing could
translate them. Each now names itself with a presentation, the way the
compaction row does, and the chat says it through translate(). The English text
stays on the row for clients that predate these presentations and for the phone.
* fix(native-chat): say composer send errors with the chat's notice sentences
The composer's two errors had their own wording file beside the sentence table
every other chat notice uses. The send outcome now carries notice parts, worded
by the same function as the rest. A refused redelivery says "Orca couldn't
confirm your message reached the agent. Check the chat, then send it again if
needed." (the same sentence the failed-send rework uses), and a message this
client couldn't store says "Couldn't save your message. Try again."
* fix(native-chat): drop the retry line, keep one name for a lost task, and say only true causes
- The history error pane no longer adds "Orca keeps trying to load this chat."
under its title: the read still retries on its own, but the pane says only
that the chat didn't load.
- A write refused as unsupported asks for an Orca update only when no reason
came back, which means the host is older. A named reason (a location or agent
that can't run there, no chat host, a client missing the capability) now reads
"This isn't available in this chat.", since updating doesn't fix it.
- A task Orca lost track of is "no recent update" everywhere; after a count it
reads "2 agents with no recent update" instead of a second name.
- The skills menu announces the same sentence it shows, including in SSH chats.
- The row for messages held behind a previous agent reads "{{agent}} from before
may still be running. Your messages will send once it stops."
* fix(native-chat): a chat whose host can't run it says its history didn't load
A history read refused as unsupported with a named reason left the error pane
saying only "This isn't available in this chat.", which never said the chat
failed to load and named nothing the reader asked for. A read now says "This
chat's history couldn't be loaded."; other writes keep the shorter sentence.
* fix: make keep-awake tooltip lid behavior platform-aware Extracted platform-specific lid behavior notes into a reusable function and updated the keep-awake tooltip to show accurate descriptions for each OS: macOS explains that closing the lid may still sleep the device, Windows references device power settings, and Linux clarifies Orca's lid-close request behavior. Updated copy to be device-agnostic instead of Caffeinate/MacBook specific. * fix: clarify macOS keep-awake tooltip copy and add translations Update agent keep-awake descriptions on macOS to accurately explain that the feature prevents idle sleep (not all sleep modes) and only works with the lid open. Add translations for Spanish, French, Japanese, Korean, and Chinese.
…s it (#24606) * fix(native-chat): no "unconfirmed" line while Orca resends a send on its own A send whose answer was lost (for example after reopening the chat mid-send) showed "Message delivery is unconfirmed." with a Retry for the moment before the automatic resend under the same message id confirmed it. One rule now decides both: the resend runs, and the notice stays quiet, only while the send's answer is lost, the user never retried it, it was not still going out when the user pressed Stop, and the host has no record of it yet. Once the host has any record of it, the line and Retry are exactly as before. * fix(native-chat): say "Sending…" on a message until the host confirms it A send whose answer was lost was resent quietly under the same id but looked like any delivered message. Every message still in the outbox with no failure to show now says "Sending…", muted, in place of its time, until the journal holds a row for it. Rows that say a message did not go through keep only that line and its Retry. The notices read the outbox through the same reconcile as the transcript, so a row that lands clears the marker in one step. * fix(native-chat): keep "Sending…" until the host has the message, in the time's slot A message the user retried, a second message in doubt, or one requeued over a rejected row had a journal row that did not hold it, so it showed nothing and looked sent. "Sending…" now stays until the row is pending or accepted. The marker took the place of the whole meta row, so the copy button went away while sending and the row jumped when it cleared. The row now stays mounted: copy keeps its hover reveal and "Sending…" sits where the time goes. * test(native-chat): move the delivery probe tests into their own file NativeChatStructuredSessionDelivery.test.tsx went over the 800-line lint limit after main was merged. The eight tests for the automatic probe of an unconfirmed message move unchanged to NativeChatStructuredSessionDelivery.probe.test.tsx, which uses the shared structured-session test harness for its mocks. The outbox seeding and probe clock helpers move into that harness so both files share them. The at-most-once reliability gate now lists the new file, with a fresh evidence run.
* fix(mobile): keep the working rings turning on the OTA page Animated.loop starts a native loop whenever the timing asks for the native driver; the web has none, so the JS fallback ran one turn and froze at 360deg. Ask for the native driver only off the web. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): pin the native driver on native spinners Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * refactor(mobile): share the working ring rotation between both rings Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
Restore IME Enter protection in workspace details by reusing the existing composition tracker. Reset Notes ownership at textarea detachment and preserve sizing behavior. Repair isolated native test-window delivery without changing the production foreground policy or original native input assertions. Fixes #24097 Related contributor history: #10711, #11067, #13128, #13282. Original implementation and macOS recordings: @setodeve, commit b30f095. Verified on required stock Linux X11/Wayland checks and independent frozen-source review. Co-authored-by: setodeve <[email protected]>
…25176) * Preserve image insertion targets with one captured destination * Set image paste test caret through the editor selection
) * feat(orchestration): support OpenCode worker model selection Allow supervised OpenCode workers to use per-launch model overrides through the existing launch-preference and receipt path. Preserve existing OpenCode agent arguments while replacing only model flags, and reject unsupported effort values explicitly. Keep Native Chat option exposure unchanged and update the worker CLI and orchestration guidance. * fix: wait for OpenCode worker composer before first dispatch Reuse captured composer readiness on local and paired execution hosts and revoke launching-shell paste anchors. Co-authored-by: Brennan Benson <[email protected]> * feat(opencode): probe execution-host CLI capabilities * fix(opencode): select plugin default for execution host loader * fix(opencode): limit prompt prefill capability to verified release * feat(orchestration): gate OpenCode worker model preferences by host capability Co-authored-by: user141514 <[email protected]> * feat(opencode): probe launch capabilities on the execution host * feat(opencode): probe execution-host CLI capabilities * feat(opencode): probe launch capabilities on the execution host * feat(orchestration): resolve explicitly configured command aliases * fix(opencode): select plugin loader for the launched host binary * fix(opencode): match WSL probe cwd and declared guest environment * fix(orchestration): verify available OpenCode model on execution host * fix(opencode): preserve launch environment deletion boundaries * wip(opencode): authorize native startup prompt intent at execution owner * fix(opencode): atomically replace status plugin entrypoints * fix(opencode): retain plugin permissions across restrictive umasks * test(opencode): resolve permission fixture from primary cwd * feat(opencode): install startup prompt plugin independently of status hooks * fix(opencode): wait for admitted startup intent and preserve failed-launch briefs * fix(opencode): confine overlay manifest cleanup to owned directories Co-authored-by: Adnan Khan <[email protected]> * fix: wait for OpenCode worker composer before first dispatch Reuse captured composer readiness on local and paired execution hosts and revoke launching-shell paste anchors. Co-authored-by: Brennan Benson <[email protected]> * feat(opencode): probe execution-host CLI capabilities * fix(opencode): select plugin default for execution host loader * fix(opencode): limit prompt prefill capability to verified release * feat(opencode): probe launch capabilities on the execution host * fix(opencode): select plugin loader for the launched host binary * fix(opencode): match WSL probe cwd and declared guest environment * fix(opencode): preserve launch environment deletion boundaries * wip(opencode): authorize native startup prompt intent at execution owner * fix(opencode): atomically replace status plugin entrypoints * fix(opencode): retain plugin permissions across restrictive umasks * test(opencode): resolve permission fixture from primary cwd * feat(opencode): install startup prompt plugin independently of status hooks * fix(opencode): wait for admitted startup intent and preserve failed-launch briefs * fix(opencode): unsubscribe hook settings during async host shutdown * fix(opencode): confine overlay manifest cleanup to owned directories Co-authored-by: Adnan Khan <[email protected]> * test(readiness): census recorded OpenCode composer boots * fix(opencode): reject redirected overlay parents before cleanup * fix(orcad): retain runtime cleanup when subscribing to hook settings * refactor(launch): extract OpenCode config and attachment authority * fix(opencode): retain host version selection across relay restarts * fix(opencode): pass run prompts as positional messages Preserve run flags and use the existing shell quoting and run-command detector to append the initial message after --, reusing an existing separator. TUI launches retain their version-selected prompt transport and draft behavior. Original run-order work: @coelho-doti (#13065, tracked in #17551). * fix(opencode): keep wrapped run tasks positional Recognize supported environment prefixes and PowerShell call operators without mistaking prompt arguments for executables. Keep environment and run separators separate, preserve the task text and exclude run commands from native submission. Source-parent: 23fc08b Related-to: stablya/orca#17551 Credits: @coelho-doti (stablya/orca#13065) * Prepare complete private OpenCode launch validation source Integrate the complete reviewed readiness, capability, native prompt, overlay and positional-run source onto frozen main. Preserve canonical atomic ACL retry, status generator/disposal, restrictive-umask fixtures and unowned source. Keep supported wrapped run commands positional. Private-validation-source: a44345c Original-full-source: 23fc08b Original-core-base: 8186ded Frozen-main: 08ee7ba Owned-source-paths: 111 Publication-policy: private validation only; preserve the six separate PR boundaries and held model/provider drafts Co-authored-by: Brennan Benson <[email protected]> Co-authored-by: Adnan Khan <[email protected]> Credits: juli-gonzalez readiness contribution; Ahmed Nagy atomic plugin writer; coelho-doti positional run contribution * Prepare private complete 111-path launch validation on current main Private validation only. Preserve main credential additions and original launch ownership. Held model and provider topics remain excluded. * Recognize env options before positional OpenCode run messages * STRICT launch CI contract correction * CAPS launch CI contract correction * INTENT launch CI contract correction * test(opencode): wait for malformed claim retries before expiring intent Observe real endpoint I/O completion under fake timers before forcing expiry. * test: initialize Claude prompt state in output retention fixture * Verify OpenCode catalog model launches and preserve current launch behavior * Verify OpenCode catalog model launches and preserve current launch behavior * Wait for OpenCode location hydration in intent startup * Refuse unverified new-worktree OpenCode model launches and record startup attribution * fix(opencode): bind startup readiness to the composer location * Bind OpenCode startup readiness to the current location in intent startup * Restore the owning Orca CLI path after shell profiles * Use a literal marker for the Bash lookup regression * Preserve plain panes and initialize zsh after prompt hook replacement * Preserve user line-editor dispatchers during deferred startup * fix: retain CLI startup when global Zsh replaces prompt hooks * test: replay global Zsh hook replacement after host startup * test: isolate controlled Zsh widgets from distro keyboard setup * fix(shell): preserve user hooks during deferred zsh initialization * Retry interrupted OpenCode startup prompt claims * Keep completed Zsh startup hooks retired when the wrapper is sourced again * Reject truncated OpenCode catalogs and explain worktree model limits * Use a template literal in truncated-catalog coverage * Refuse unfinished OpenCode model catalogs --------- Co-authored-by: Brennan Benson <[email protected]> Co-authored-by: user141514 <[email protected]> Co-authored-by: Ahmed Nagy <[email protected]> Co-authored-by: Adnan Khan <[email protected]> Co-authored-by: Orca startup hydration review <[email protected]> Co-authored-by: Codex <[email protected]> Co-authored-by: Orca maintenance <[email protected]> Co-authored-by: Orca <[email protected]> Co-authored-by: Orca campaign <[email protected]> Co-authored-by: Orca OpenCode issue campaign <[email protected]> Co-authored-by: OpenCode issue campaign <codex@localhost>
* Keep workspace deletion warnings from shifting the dialog * Tighten spacing in workspace deletion confirmations * Address deletion dialog review and synchronize localization catalogs
…fail with Access denied (#24489) * fix(editor): read files outside projects without a grant a restart loses A file opened from outside every project (e.g. ~/notes.txt from the floating workspace) read through an in-memory grant. After a restart the restored tab only renewed that grant when it stored a full path, so a tab saved relative to the floating workspace folder failed with "Access denied" and Retry repeated it. Single-file reads (read, stat, exists) and open-editor-tab saves now resolve a path outside every project in place. Paths inside a project keep the full containment check, so a project's symlinks still cannot escape it, and every other write stays inside projects. * fix(editor): re-grant restored floating-workspace tabs by owner, not path shape Problem: a file opened from the floating workspace (e.g. ~/notes.txt via Cmd-click in the floating terminal, the floating markdown picker, or a .md opened from the OS) loads until restart, then shows "Access denied: path resolves outside allowed directories". Main's external-path grants live only in memory. On restore the editor re-granted only tabs that stored an absolute path, but floating tabs store a path relative to the floating root (~ by default), which is deliberately not an authorized root, so they were never re-granted. Restored floating notebooks also failed to start a kernel. The previous commit on this branch let main read and save any path outside a project without a grant. That widened fs:readFile/stat/pathExists for every caller, including automatic reads of untrusted content (markdown preview images), which opened a Windows UNC credential leak and a /dev/zero main-process memory blowup. This reverts that model entirely. Fix: one helper decides which client-local path a tab needs re-granted by ownership: a floating-workspace tab, or a tab stored outside its own project. It never grants paths a local project root covers (a grant would also authorize a project symlink's outside target), and skips SSH-owned, runtime-owned and not-yet-hydrated owners. Every reader that can touch a restored tab before or without the editor loader uses it: the loader, the restored dirty-tab conflict scan, and the paired-mobile markdown bridge. * fix(editor): let main decide which restored-tab paths a project already covers Problem: the restore re-grant helper decided "already inside a project" in the renderer from its worktree list. At startup that list only holds repos the session references, so a floating tab inside an unlisted repo was granted (including a symlink's outside target), and the renderer's path matcher disagrees with main's on WSL \\wsl$ vs \\wsl.localhost, which stranded a folder-workspace tab with "Access denied" after restart. The helper also treated a folder workspace with a missing or ambiguous host as local. Fix: the renderer now decides only by owner (a floating-workspace tab, or a tab stored outside a project whose owner is explicitly local) and asks main with `skipIfInsideAllowedRoots`. Main checks the path against its own allowed and registered roots, in both the named and canonical-parent spelling against both root spellings: a path a project covers gets no grant, an alias spelling of a project path gets only that spelling, and a project symlink's outside target is never granted. Explicit-open grants (Cmd-click, drag, explorer) are unchanged. Tests now prove each reader waits for the grant before reading. * fix(fs): decide a restored tab's project membership from every ancestor's real path Problem: the restore re-grant decided "inside a project" from the named path and the real path of its parent only. When a tab path crossed a project directory symlink and named the project through a spelling that was neither the registered root nor its realpath (a second alias, a `..` segment, a case variant on a case-insensitive disk, a /var-style alias of an ancestor), no check matched, the path took the full grant, and the symlink's outside target became readable and writable. Fix: a path is inside a project when the named path is inside a root, or the real path of any ancestor folder is inside a root in its registered or real spelling. Such a path gets at most its named spelling, never its realpath. An ancestor that fails to resolve for any reason other than "missing" now fails closed to the named-spelling grant instead of falling through to the full one. Tests cover each spelling; the non-symlink case also runs on Windows. * fix(fs): read local files as regular files only, from one bounded handle Problem: fs:readFile stat'ed a path and then read it to EOF. A character device such as /dev/zero reports size 0, passes the size limit and never ends, so the main process buffers until memory runs out; a FIFO hangs the open. Writes could also target an existing device or FIFO. Fix: every local fs:readFile (editor and log snapshot) opens the path once, non-blocking, refuses anything but a regular file, and reads the size check, binary probe and content from that same handle, capped at the limit even if the file lies about its size. The AI Vault log tail opens non-blocking too, and fs:writeFile refuses an existing non-regular target. * feat(fs): let desktop file requests declare their shape Problem: main decided every local file request against one allow-list plus a set of in-memory grants the renderer had to recreate after every restart, so a file the user opened outside a project (for example from the floating workspace) was denied once Orca restarted. This adds the request shape the common pattern uses, alongside the grants for now: - no shape (the default): the path must be inside a project root main recognises, symlinks included. Desktop requests also accept the app-owned floating-workspace folder; paired-client RPC never does. - user-file: a single file the user named by absolute path, used in place. Only fs:readFile/stat/pathExists and saving (fs:writeFile) accept it. - document-resource: an image or PDF a document references, limited to every project root when the document is in one, else to the document's folder, and refused by path text before any disk or network access. Notebook kernels and AI Vault log tails check their open file as user-named. * feat(editor): send each local file request's shape from the renderer Problem: after a restart, a tab opened outside every project (a floating workspace file, a file opened by absolute path, an OS-opened markdown) could only be read if the renderer first re-granted its path, and readers that ran before the editor loaded the tab had no grant at all. The renderer now says what kind of request it is making, and main checks that: - A persisted tab opened outside its owner's root (floating workspace, or an absolute stored path) whose owner is explicitly local reads and saves as a user-named file, from every reader: the editor loader, the restored-tab conflict scan, the change banner and compare dialog, the paired-phone markdown bridge and the save queue. Project tabs stay inside their root. - Clicks, drops, typed paths and browser-opened notebooks stat as user-named. - Markdown preview and rich-editor images are document resources, limited to the document's roots or folder. Images the user pasted or attached into a chat show as user-named; agent images stay inside the project. - The image cache keys on the shape, so one shape's image never answers another's request. A ratchet test lists every renderer file allowed to create a user-named request. * refactor(fs): delete the in-memory path grant system Problem: main kept a set of paths the renderer had asked it to allow (fs:authorizeExternalPath). The set lived only in memory, so a file the user opened outside every project could be read until Orca restarted and was then denied, and every new reader of a restored tab had to remember to recreate the grant first. Three rounds of re-deriving grants at restore each found another reader or path spelling it missed. Now that every desktop request declares its shape, nothing needs a grant: - delete the grant set, authorizeExternalPath, the restore re-grant from the earlier commits on this branch, the fs:authorizeExternalPath channel and its preload and web-client entries; - delete every renderer grant call (terminal and markdown link clicks, drops, typed paths, the file explorer, AI Vault logs, chat attachments, browser notebooks) and every main one (floating markdown picker and folder, OS-opened markdown, keybindings.json, pasted images, import and upload sources); - the floating workspace's picker-approved folders stay a terminal-cwd allowlist only. Main now holds no per-path permission, so a restart can't change any answer. * feat(editor): open project links that lead outside the project as named files Problem: a file inside a project that is a symlink to something outside it opened fine from the file explorer or a terminal Cmd-click, then showed "Access denied" after a restart: its tab was stored as a project file, and a project request is refused when it resolves out of the project. A folder link out of the project expanded in the explorer until restart and then failed with a raw access error. Now the click decides and the tab keeps that decision. Both gestures stat the path inside the project first; if only the user-named check passes, the path leads out of the project: - a file opens by its absolute path, so it reads and saves as a file the user named, the same before and after a restart; - the explorer does not follow a folder link out of the project and says so ("This folder links outside the project, so it can't be opened here."). Paths that stay inside the project still open as contained project tabs. Also drops the AI Vault "path not authorized" message, which nothing shows now. * chore: drop the casts the changed-code quality gate flags on this branch The FileContent casts in the editor loader and the paired-phone markdown bridge were never needed (the read result is already assignable). Tests stub window.api through vi.stubGlobal and pass narrow stores without casting; the one test store that still needs a cast states why. * fix(fs): load chat images by type, and keep escaping project links readable Problems found in review: - Chat transcript images were trusted by message role: any user-role "[Image: source: <path>]" (an injected Claude record, `orca terminal send`, a paired client's image-ref) became an automatic user-named read as the row scrolled into view, of any file type, and on Windows a network-share path would have opened an SMB connection to that host. - A document image named like an image but linking to a text file (logo.png -> .env) was read as text. - Windows device names (NUL.png, COM1.jpg) passed the path-text check of the automatic image loads. - A project symlink leading out of the project, opened by a typed path, a tab-strip drop or a browser file:// notebook, was stored as a project tab and immediately refused. Fix: - New chat-image request shape for every transcript image and the composer preview, whoever's turn named it: an absolute local path whose requested and real targets are image files, a regular file, size-capped; network-share and device-namespace paths and Windows device names are refused by path text before any filesystem call. Pasted screenshots still show after a restart, and agent images outside the project now render. - Document resources check the real target's type too, and refuse Windows device names by path text. - Typed paths, tab-strip drops and browser notebooks stat through the same check as the explorer and terminal, and open an escaping link by its absolute path. - Tests pin the shape at the change banner, compare dialog, markdown preview and image prewarm; a second ratchet lists every file that can open a tab the tab rule reads as user-named, and its comment says what it can't see. - Stale grant wording removed. * fix(fs): tighten automatic image loads and the project-link check Problems found in review: - Two unit tests went red on this branch: the browser-share test still expected reads without a shape, and the rename test's electron mock had no app, which the desktop root check now needs. - The device-name check ran on the raw path, so `NUL.png\.` or `COM1.png\x\..` (reachable from markdown ``) reached the filesystem; a document image whose real target was a device name passed. - Chat images in a project that lives on a Windows network share no longer rendered, though the markdown preview showed them. - Any failed project check (a missing file, a dropped connection) was taken as "this link leads out of the project" and opened as an absolute tab. - Every local read allocated about 2 MiB, even for a tiny image. Fix: - Device names and device-namespace paths are checked on the resolved path and on the real target, for chat images and document resources alike. - A network-share path in an automatic load is read only inside a project root (the user chose that share when adding the project); anywhere else it is still refused by path text before any filesystem call. - Only main's "outside allowed directories" refusal marks a project path as leading out of the project; other errors surface as before. The message now lives in shared code so both sides agree on it. - Reads size their first buffer from fstat and confirm EOF with a 1-byte probe; a file that grows past its reported size is still read in bounded chunks up to the cap. - Fixed the two red tests. * refactor(fs): name file access by its role, not its structure Problem: the static-analysis anti-slop check failed the PR because the new code named the request's file access a "shape" (`shape`, `RequestShape`, `TabShape`), which describes structure rather than the role. Rename the main-process module filesystem-request-shape.ts (and its tests) to local-file-access-resolution.ts, rename the symbols to fileAccess, FileAccessResolution and TabFileAccessFields, and say "file access" or "access kind" in the comments and test names. No behaviour change. * fix(fs): refuse every Windows device-name spelling in automatic image loads Problem: the device-name check split a file name only on '.', so names such as NUL:.png, COM1:.png, NUL:stream.png (an alternate data stream) slipped through, and CONIN$, CONOUT$, CLOCK$, COM0 and LPT0 were not listed. Those reached the filesystem from a document or chat image before being refused. Split on ':' as well, list the missing device names, and test each with Windows path rules and zero filesystem calls. Also cover the case of a local link that leads onto a network share outside every project (refused for chat images), and correct the shared comment on chat-image access. * fix(editor): let users rename and insert images into files opened outside projects Renaming a file opened outside every project (tab double-click, editor header) and inserting an image into such a markdown document failed with "Access denied", even before a restart: both writes only passed the project-root check. Document resources and chat images were also limited by file type more strictly than users expect. - Add a "document-folder" access kind for writes beside a document the user opened: main allows renaming only that document, to a name inside its own folder, and importing new files only into that folder, checked by path text and again by real path, with Windows device names refused. The renderer sends it only for local user-named, writable tabs (rename, its undo/rollback, image insert); SSH and runtime requests never carry it. - Document resources: drop the image/PDF type allowlist; folder confinement, regular-file reads, the cap and path-text refusals remain. - Chat images: judge only the real target's type, against every previewable image type (AVIF added). * fix(fs): a declared file-access kind never refuses what the project check allows A full-path tab for a file inside a project (for example a link that leads out, opened by its absolute path) was renamed under the document-folder rule, which limited the new name to the file's own folder, although the same rename with no declared access could move it anywhere in the project. Any declared kind could be stricter than the default in the same way. Every desktop local file request now goes through one resolver, resolveLocalRequestPath: it runs the default project check first (roots, Orca's floating folder, symlink containment, outside-root path text refused before any filesystem call) and only on a refusal applies the declared kind's rule, which adds paths outside projects. Reads, saves, rename source and target, and import destinations all use it, so a new kind gets the rule for free. Automatic loads (document and chat) still refuse Windows device paths and names by text first, even inside a project; a device is never a file to show. The document-resource rule no longer needs its own project branch, and chat images no longer re-run the roots check for shares. * fix(fs): symmetric outside-project renames, notebook real folder, same-share images - Renaming a file opened outside every project accepted a name in a subfolder (`archive/todo.md`), but the Undo and the rollback rename, declared from the moved file, were then refused and the file stayed moved. A rename under document-folder access must now land directly in the document's own folder (checked by path text before any filesystem call), so rename, Undo and rollback are symmetric. Image import still accepts the folder or a folder under it. Inside projects the default check still allows any in-project target. - A notebook opened through a link inside a project started its kernel in the link's folder instead of the real file's folder (main's behaviour), because notebook and AI Vault log-tail paths skipped the project check. Both now resolve through resolveLocalRequestPath (project check first, then the user-file rule). - A markdown file opened from a Windows share outside every project could not show the images beside it. Document images on a share are now allowed inside the document's own folder; the folder text check refuses every other host and share before any filesystem call. - resolveDesktopAuthorizedPath is async, so a synchronous failure in the default check rejects like any other refusal. * fix(fs): refuse share images outside projects again; keep renames and kernels as on main - Reverts the same-share document image rule from the previous commit. Its folder check compared hosts case-insensitively, so a host spelled with U+212A KELVIN SIGN (or a decomposed accent) passed as the document's own share and was contacted, reopening the network credential leak. Document and chat images on a share outside every project are again refused by path text before any filesystem call; tests now cover the look-alike hosts with zero filesystem calls. - Renaming a file opened outside every project into a project folder passed the project check, but its Undo (declared from the new path) was refused and the file stayed moved. When the rename source is allowed only as the opened document, the new name must now land directly in the document's folder even if a project would accept it (resolveLocalRenamePaths). - A notebook opened through a link outside every project started its kernel in the link's folder; main used the real file's folder. The kernel cwd is now the real file's folder in every case. * fix(fs): a file opened outside every project renames to any path, and keeps its access Renaming a document the user opened (floating workspace or full-path tab) now follows the user-file rule: the source must be the opened document, and the new path can be any absolute path, so a rename into another folder, a subfolder or a project works, and its Undo (declared from the moved file) comes back from there. Any other rename keeps the project check only. Remove the same-folder rename rule and its tests; image import stays in the document's own folder. After a move, a tab stored by its full path keeps its full path instead of being recomputed project-relative, so it keeps user-file access for save, the next rename, image insert and restore after restart. Folder moves go through the same remap. Also un-export unused resolver exports and avoid a copy for single-chunk reads.
) * fix(native-chat): start a new chat after an earlier start failed A chat whose start the host refused stayed registered under its agent and workspace, so the + menu and new-tab search kept that agent disabled with a spinner, and any later "new chat" for that agent (for example "Send notes to > New agent") restarted the failed chat instead and dropped its own prompt. Only launches in flight now hold the agent/workspace slot that later starts join. The registry keeps every launch by session id and derives the holder, so a failed chat keeps its own Retry while a new start makes a new chat. * test: import the launch status from its own module * test: name the owning host on the launch intents the new tests build * fix(native-chat): a new start never joins an unconfirmed or retried chat A new start for an agent joined a chat whose create answer was lost, or a failed chat whose Retry was in flight, and dropped its own text: the source-control "Fix with AI" action reported success with nothing sent, "Send notes to > New agent" sent nothing, and after a reload the text became an unsent draft in the old chat. Only a new start's own first create now coalesces later starts (double click, two callers at once). Each attempt records whether it is that first create or a Retry/re-check of an existing chat; an unconfirmed or retried blank chat keeps its own Retry and a new start opens a new chat with its text. A resume still re-checks or joins its conversation's launch, since the host refuses a second adoption. * fix(native-chat): a different new request always opens its own chat A new start used to join any blank chat still in its first create or still sending its opening text, so a second "Fix with AI" for another check, or notes sent to a new agent, landed in that first chat. Each first attempt now keeps the request it was started with (its text and whether it is sent or drafted). Only a repeat of that request (a double click, a retried call) joins it, and it shares the text already staged, so the text is sent once. Any other request opens a new chat with its own text. The + menu, new-tab search and send-notes menus disable an agent only when their own pick would join. Resume launches are unchanged. * fix(native-chat): an empty chat still starting takes the first text sent to it A blank chat that is still starting (a + pick, the empty-workspace default chat) is empty, so the first request with text, such as notes sent to a new agent, now goes into it instead of opening a second chat beside it. That request becomes the chat's own request: an identical repeat joins and is sent once, and any other request opens a new chat. Move the logic that decides which launch a start joins out of the launch registry into its own module, so the registry stays under the line limit once #24904 lands beside it. Pin that a repeat arriving while the opening text is still sending is sent once. * test: an empty chat delivers the claiming text the way its request asked * fix(native-chat): only a chat its user has not used yet takes another request's text A blank chat that is still starting was claimable by the first request with text even after its user had sent a message into it or typed into its composer, so notes or a Fix with AI prompt could land in a conversation the user had already started. Emptiness is now read from what the chat holds: nothing in its outbox and no text in its composer draft. A chat its user has used stays theirs, and the request opens a new chat. If the claiming text cannot be saved, the claim is not recorded: the request falls through to a new launch, whose save failure shows on that chat as for any new launch, instead of reporting a failure nothing showed. * fix(notes): notes handed to a send leave the next send until it settles Notes sent to an agent stayed in the notes shelf until their chat delivered them, so a second "Send notes" made while the first new chat was still starting collected the first notes again. With every different request now opening its own chat, those notes reached two chats. When notes or browser annotations are handed to a send (a new agent, a running agent from the menu, or a sidebar agent row), they are held in memory against that send's own delivery result and left out of the next send. Delivered notes are removed as before; a failed, refused or undelivered send releases the hold, so they come back for the next send. The notes menu now builds each scope's prompt from the notes it will send. * test: give the annotation tray fixture its hand-off callback * fix(notes): offer no send when every note is already on its way When every note or annotation in a send is held by an earlier send still in flight, the built prompt is empty. The notes menu already disabled its trigger then, but its New agent rows still started an agent with no text, the annotation Send buttons still opened, and a sidebar agent row could be sent an empty prompt. The New agent rows, the annotation Send buttons and the sidebar send now offer nothing when there is nothing to send. * fix(notes): a new chat's staged prompt decides when its notes leave the shelf Notes sent to a new agent were released back to the shelf as soon as the chat's start failed, while that failed chat kept the same text staged for its own Retry. Re-sending and pressing Retry put the notes in two chats, and Retry alone left delivered notes listed as unsent. For a new chat, the notes now follow the prompt it staged: held while that message is in the chat's outbox, cleared from the shelf when any dispatch (Retry or re-check included) sends it on, and back on the shelf when the chat is closed and its outbox thrown away. A paired server's chat is found once its start settles. Running-agent sends keep their own result. While notes are only on their way, the send button reads "Sending…" rather than "All notes sent". * fix(notes): a new chat's saved message keeps its notes out of another send across a reload The hold that keeps notes sent to a new agent out of the next send lived only in memory. A reload while that chat had not yet sent them put the notes back on the shelf while the chat's saved message still carried their text, so a second "Send notes" sent them twice. The staged message now saves the send keys of the notes it was built from. The shelf treats a note as on its way while any saved message carries its key, read from the saved outboxes on first use and kept current by the outbox's one write funnel. When a message carrying notes is sent on (its own start, a Retry or the re-check), those notes are cleared from their shelf; when it is thrown away with its chat, they come back. Browser annotations sent to a new chat use the same keys while the app runs. Running-agent sends keep their in-memory hold. This replaces the per-message watch and outcome promise from the previous change. * fix(notes): release a gone chat's notes, and clear sent ones in the web client too Two gaps in keeping notes out of another send while a saved chat message carries them: - The web client never installed the clearing that removes notes once a chat sends them on, so after a Retry there the notes stayed listed. It is now installed, once per renderer, by the background services both the desktop and the web client load with App. - A saved message carrying notes was thrown away only by this window's own close. A chat closed from the phone, another window or while Orca was off, or closed here without a known host, kept its notes held for good. A chat the host stops listing (affirmed, and not a launch still starting or failed) now has its queued messages thrown away once that sync lands, as does a close that can name no host, so the notes come back. * Revert "fix(notes): release a gone chat's notes, and clear sent ones in the web client too" This reverts commit ae0b9f3. * Revert "fix(notes): a new chat's saved message keeps its notes out of another send across a reload" This reverts commit b88d0dc. * fix(native-chat): a new chat joins only a re-delivery of the same user action "The same request" was recognised by its content (agent, workspace, trimmed text, sent or drafted), which split one action whose text changes between deliveries ("Fix with AI" re-fetches logs) and merged two different actions that happen to carry the same text. Each user action now mints one request id where it is handled (the click, menu pick, notes send, shortcut, Fix with AI press, quick command; a worktree create uses its creation id; programmatic starts mint once at their entry) and passes it through the launch plan, its verdict and the structured launch options, where it is required. A new start joins a chat only when its first attempt carries the same id: a double click or a caller retrying its own call makes one chat and sends the first delivery's text once; any other action opens its own chat, whatever its text. An empty chat that is still starting is still claimed once by the first action with text, and then belongs to that action's id. Resume launches keep joining their conversation's launch. The + menu and new-tab search no longer grey out an agent while one of its chats starts: every pick is a new action and opens its own chat. The id lives in memory only; nothing reads it after a reload (a restored launch is reached by its session id through Retry, never joined). * fix(native-chat): a new chat with no text reuses an empty one instead of stacking another Two bare "+ > Claude" picks (or new-tab search, the new-agent shortcut, the dashboard) opened two empty chats. A request with no text now focuses an existing empty chat for that agent in that workspace: one still starting (joined in the launch, as a re-delivery is) or one that published and sits idle (its host's journal holds no request, read live from the status feed). Empty also means nothing queued, no composer text or images, and no launch draft its composer has not taken. Failed, unconfirmed, resumed and other-agent/workspace chats are never reused. A request with text still opens its own chat, or claims an empty starting one as before; request-id dedupe is unchanged. * fix(native-chat): a new chat with no text reuses an empty chat only in the split it was opened from Pressing + in the right-hand split focused an empty chat sitting in the left-hand split. The reuse now looks only in the tab group the pick targets (the caller's group, else the workspace's active group, which is where its tab would open); a pick in another split opens a new chat there. Applies to both an empty chat still starting and one that published and sits idle. * fix(native-chat): text sent to a new agent claims an empty starting chat only in its own split Notes sent from the right-hand split could land in, and focus, an empty chat still starting in the left-hand one. A request with text now claims an empty starting chat only in the tab group it opens in, the same rule a request without text follows; elsewhere it opens its own chat there.
…5357) #25176 and #24489 landed together and collided in insertRichMarkdownImageFromPath. #25176 added three test files whose @/store mock returns { settings, folderWorkspaces, worktreesByRepo }. #24489 made the same function look up the open document with state.openFiles.find(...) to pass document-folder access to the import. Under the mock, openFiles is undefined, so the lookup throws, the catch shows "Failed to insert image", and no image is inserted -- 38 tests fail on main. The real store always carries openFiles, so production behavior of both PRs is intact; the mocks were just written against the pre-#24489 shape. Add openFiles: [] to the three mocks.
* feat(orchestration): support OpenCode worker model selection Allow supervised OpenCode workers to use per-launch model overrides through the existing launch-preference and receipt path. Preserve existing OpenCode agent arguments while replacing only model flags, and reject unsupported effort values explicitly. Keep Native Chat option exposure unchanged and update the worker CLI and orchestration guidance. * fix: wait for OpenCode worker composer before first dispatch Reuse captured composer readiness on local and paired execution hosts and revoke launching-shell paste anchors. Co-authored-by: Brennan Benson <[email protected]> * feat(opencode): probe execution-host CLI capabilities * fix(opencode): select plugin default for execution host loader * fix(opencode): limit prompt prefill capability to verified release * feat(orchestration): gate OpenCode worker model preferences by host capability Co-authored-by: user141514 <[email protected]> * feat(opencode): probe launch capabilities on the execution host * feat(opencode): probe execution-host CLI capabilities * feat(opencode): probe launch capabilities on the execution host * feat(orchestration): resolve explicitly configured command aliases * fix(opencode): select plugin loader for the launched host binary * fix(opencode): match WSL probe cwd and declared guest environment * fix(orchestration): verify available OpenCode model on execution host * Add host-owned OpenCode and Devin account profiles * fix(orchestration): inspect OpenCode models with selected account environment * fix(orchestration): bind model validation to direct existing-workspace launch * fix(opencode): preserve launch environment deletion boundaries * fix(orchestration): limit effective model contract to verified OpenCode release * wip(opencode): authorize native startup prompt intent at execution owner * fix(opencode): atomically replace status plugin entrypoints * fix(opencode): retain plugin permissions across restrictive umasks * test(opencode): resolve permission fixture from primary cwd * feat(opencode): install startup prompt plugin independently of status hooks * Restore inherited account environment and preserve cleanup retries * fix(opencode): select plugin loader for the launched host binary * fix(opencode): match WSL probe cwd and declared guest environment * fix(opencode): preserve launch environment deletion boundaries * wip(opencode): authorize native startup prompt intent at execution owner * fix(opencode): atomically replace status plugin entrypoints * fix(opencode): retain plugin permissions across restrictive umasks * test(opencode): resolve permission fixture from primary cwd * feat(opencode): install startup prompt plugin independently of status hooks * Check relay environment values before merging * fix(opencode): wait for admitted startup intent and preserve failed-launch briefs * fix(opencode): confine overlay manifest cleanup to owned directories Co-authored-by: Adnan Khan <[email protected]> * fix: wait for OpenCode worker composer before first dispatch Reuse captured composer readiness on local and paired execution hosts and revoke launching-shell paste anchors. Co-authored-by: Brennan Benson <[email protected]> * fix(orchestration): validate configured aliases with target shell grammar * fix(orchestration): use actual shell and refuse assignment-only aliases * fix(opencode): wait for admitted startup intent and preserve failed-launch briefs * Support verified OpenCode v2 model selection in fresh native workers * fix(opencode): refuse unsupported startup preferences before model probing * feat(opencode): probe execution-host CLI capabilities * fix(opencode): select plugin default for execution host loader * fix(opencode): limit prompt prefill capability to verified release * feat(opencode): probe launch capabilities on the execution host * fix(opencode): select plugin loader for the launched host binary * fix(opencode): match WSL probe cwd and declared guest environment * fix(opencode): preserve launch environment deletion boundaries * wip(opencode): authorize native startup prompt intent at execution owner * fix(opencode): atomically replace status plugin entrypoints * fix(opencode): retain plugin permissions across restrictive umasks * test(opencode): resolve permission fixture from primary cwd * feat(opencode): install startup prompt plugin independently of status hooks * fix(opencode): wait for admitted startup intent and preserve failed-launch briefs * fix(opencode): unsubscribe hook settings during async host shutdown * fix(opencode): confine overlay manifest cleanup to owned directories Co-authored-by: Adnan Khan <[email protected]> * test: preserve typed calls in configured worker target checks Replace Reflect.apply with the existing typed prototype call pattern so the unchanged regression cases pass the anti-slop lint gate. * test: check typed model host calls and terminal delay state Replace Reflect dispatch and property reads with checked access and typed calls. Complete the existing resume request fixture with its required identity fields without changing the rejection boundary or assertions. * test(readiness): census recorded OpenCode composer boots * fix(opencode): reject redirected overlay parents before cleanup * fix(orcad): retain runtime cleanup when subscribing to hook settings * refactor(launch): extract OpenCode config and attachment authority * fix(opencode): retain host version selection across relay restarts * fix(opencode): pass run prompts as positional messages Preserve run flags and use the existing shell quoting and run-command detector to append the initial message after --, reusing an existing separator. TUI launches retain their version-selected prompt transport and draft behavior. Original run-order work: @coelho-doti (#13065, tracked in #17551). * fix(opencode): keep wrapped run tasks positional Recognize supported environment prefixes and PowerShell call operators without mistaking prompt arguments for executables. Keep environment and run separators separate, preserve the task text and exclude run commands from native submission. Source-parent: 23fc08b Related-to: stablya/orca#17551 Credits: @coelho-doti (stablya/orca#13065) * Prepare complete private OpenCode launch validation source Integrate the complete reviewed readiness, capability, native prompt, overlay and positional-run source onto frozen main. Preserve canonical atomic ACL retry, status generator/disposal, restrictive-umask fixtures and unowned source. Keep supported wrapped run commands positional. Private-validation-source: a44345c Original-full-source: 23fc08b Original-core-base: 8186ded Frozen-main: 08ee7ba Owned-source-paths: 111 Publication-policy: private validation only; preserve the six separate PR boundaries and held model/provider drafts Co-authored-by: Brennan Benson <[email protected]> Co-authored-by: Adnan Khan <[email protected]> Credits: juli-gonzalez readiness contribution; Ahmed Nagy atomic plugin writer; coelho-doti positional run contribution * Prepare private complete 111-path launch validation on current main Private validation only. Preserve main credential additions and original launch ownership. Held model and provider topics remain excluded. * Recognize env options before positional OpenCode run messages * STRICT launch CI contract correction * CAPS launch CI contract correction * INTENT launch CI contract correction * test(opencode): wait for malformed claim retries before expiring intent Observe real endpoint I/O completion under fake timers before forcing expiry. * test: initialize Claude prompt state in output retention fixture * Verify OpenCode catalog model launches and preserve current launch behavior * Verify OpenCode catalog model launches and preserve current launch behavior * Refuse unverified new-worktree OpenCode models and complete host audits * Wait for OpenCode location hydration in intent startup * Refuse unverified new-worktree OpenCode model launches and record startup attribution * fix(opencode): bind startup readiness to the composer location * Bind OpenCode startup readiness to the current location in intent startup * Restore the owning Orca CLI path after shell profiles * Use a literal marker for the Bash lookup regression * Preserve plain panes and initialize zsh after prompt hook replacement * Preserve user line-editor dispatchers during deferred startup * fix: retain CLI startup when global Zsh replaces prompt hooks * test: replay global Zsh hook replacement after host startup * test: isolate controlled Zsh widgets from distro keyboard setup * fix(shell): preserve user hooks during deferred zsh initialization * Retry interrupted OpenCode startup prompt claims * Keep completed Zsh startup hooks retired when the wrapper is sourced again * Reject truncated OpenCode catalogs and explain worktree model limits * Use a template literal in truncated-catalog coverage * Refuse unfinished OpenCode model catalogs --------- Co-authored-by: Brennan Benson <[email protected]> Co-authored-by: user141514 <[email protected]> Co-authored-by: Ahmed Nagy <[email protected]> Co-authored-by: Adnan Khan <[email protected]> Co-authored-by: Orca startup hydration review <[email protected]> Co-authored-by: Codex <[email protected]> Co-authored-by: Orca maintenance <[email protected]> Co-authored-by: Orca <[email protected]> Co-authored-by: Orca campaign <[email protected]> Co-authored-by: Orca OpenCode issue campaign <[email protected]> Co-authored-by: OpenCode issue campaign <codex@localhost> Co-authored-by: Nathan Parker <[email protected]>
* test(config): reproduce rejected repository OpenCode config * Add repository OpenCode permissions and allow its reviewed root config * fix: preserve sensitive OpenCode confirmation prompts --------- Co-authored-by: Orca campaign recovery <[email protected]> Co-authored-by: Orca OpenCode Campaign <[email protected]>
…es (#25350) evacuateDeadCells ran one query that joined every assignment to its cell's liveness and fence state, ordered by primary key with LIMIT 100. In production no row ever matched (the only dead cells are stale existing-only cells without a committed fence), so the planner walked the whole relay_assignments primary key every call: 551 ms mean over 85k calls, ~12% of relay database time. A cell-level pre-check now evaluates the predicate's cell-only half over the ~33-row cell tables (3 ms in production). It is a superset of the cells the host query can act on, so the sweep returns early when it is empty and otherwise restricts the host query to those cells. The host predicate is unchanged.
… batches (#25352) relay_control_connection_reservations was never deleted: 13.8M rows and 9.1 GB in production, 99.999% of them in state 'released' and ~400k more a day. Nothing reads a released row (every reader filters it out by state), but each placement still locks all of its host's rows, ~160 on average. A new director sweep step deletes released rows older than a day. It walks the heap in TID ranges of 16 pages, because without an index on released_at a `LIMIT n` delete plans as a sequential scan from page 0 that gets slower as the head of the heap empties (production EXPLAIN). Each statement selects its rows FOR UPDATE SKIP LOCKED, so a row a request holds is skipped rather than waited on, and deletes them by `ctid = ANY(ARRAY(...))` so the delete is always a TID scan. A tick stops at 400 rows, 128 pages or 250 ms, which drains the backlog over about three days at five directors.
…after promotion (#25367) Both were promoted to general on 2026-10-01 (selector 344 shows them general), but the same-cap job still classed them migration-only. Rollback mode on either would isolate (general -> migration-only) before its no-op check failed, demoting a live cell. They stay out of the fleet pool list (pool 10, not 16). Claude-Session: 1145a80d-dec4-4a9b-9373-bbbb876b9041
Start and resume Qoder through the existing execution-host selector when only the documented qoder command exists. Preserve legacy qodercli preference, explicit commands, quoting and session identity; disconnected SSH execution refuses without local fallback. Mobile history uses command-at-create only with the optional owned-create capability and an existing stable mutation identity. Reconcile authoritative execution-host inventory before retrying creation, adopt the same surviving operation, preserve WSL/incarnation metadata and restore only missing original launch metadata. Changed retry settings cannot replace original capture. Bounded evidence expires after 15 minutes; unavailable inventory or original evidence refuses recovery and leaves surviving execution untouched. Authoritative inventory proving absence preserves the existing recreation behavior; this is not a durable exactly-once ledger for completed one-shot side effects. Older hosts retain the acknowledged create-then-send path. Scope mobile launch authority to the current committed host/client generation, and recheck operation ownership after asynchronous preparation before later sends. Retire the mutation once the host acknowledges the resume; later ownership changes stop navigation without reporting a completed resume as failed or reusing a cached legacy pane. Preserve genuinely interrupted mutation identity. Preserve current-main OpenCode validation and merged Pi/Cursor behavior. Correct unchanged-main editor test fixtures to their production insertion-range and store contracts while retaining original assertions and production behavior. Credit: Neil Parker (@nwparker); Soperf and jyang for Qoder integration/history groundwork in #24614; actual Pullfrog and CodeRabbit reviews and the independent Source reviewer for the mobile retry, launch capture, evidence lifetime and connection ownership findings. Conservative positional process recognition and existing folder-history matching-worktree limitations remain documented.
… days (#25353) * fix(relay): retain confirm results for a week and audit events for 90 days relay_confirm_results (8.3M rows, 5.8 GB) and relay_audit_events (8.4M rows, 3.6 GB) were never deleted. The director's credential cleanup now reaps both after its existing passes: - Confirm results older than 7 days. The only reader replays a stored result for a retry of the same request on the same connection basis; a different basis is already refused as a tuple mismatch. committed_at has no index, so this uses the TID-window reaper from the reservation prune, capped at 250 rows a tick (the 7.4M-row backlog drains over 2-3 days). - Audit events older than 90 days, ordered by `at` so the batch walks relay_audit_events_at. Nothing in the relay reads them back. The oldest row is from 2026-07-14, so this deletes nothing until 2026-10-12. reapBatch now deletes by `ctid = ANY(ARRAY(...))` on Postgres: with `ctid IN (...)` the planner can choose a hash join over a sequential scan of the whole table. * chore(relay): record the decided audit retention
* Measure remaining CI import, diagnostic and checkout savings * Qualify remaining CI candidates on hosted runners * Qualify independent mobile typecheck overlap on Actions * Keep explicit RPC test registries from loading unused methods * Qualify complete RPC registry cohort and mobile cancellation * Promote measured CI setup and typecheck savings * Recognize the shared RPC test guard in lint policy * Align the mobile barrier contract with independent typechecks
* refactor(relay): stop creating three tables nothing writes relay_confirmable_splices, relay_cell_drain_attempts and relay_migration_leases are created at every boot and referenced nowhere else on main except tests. In production all three hold 0 rows and pg_stat_user_tables shows 0 inserts, 0 sequential and 0 index scans since the 2026-09-28 stats reset. This removes them from the schema and the transaction-phase table, and drops the test references. It does not drop them: an older image still runs CREATE TABLE IF NOT EXISTS at boot, and a drop racing that create can fail the older boot's schema step. A follow-up can drop them once no image that creates them can be rolled back to. * docs(relay): note the account-erasure prerequisite for dropping retired tables
… does not list yet (#25375) Codex models newer than Orca's built-in list (gpt-6.x) were capped at xhigh, so worker-start refused --effort max/ultra that the installed Codex supports. Unknown Codex models now accept the full known effort vocabulary; unknown effort names are still refused. Refs STA-9312
Closing a tab in an overflowing strip shortened it: at the scrolled end the browser clamped scrollLeft so every tab left of the closed one slid under the cursor, and near the overflow threshold every tab widened. After a single close made with the mouse (x button or middle-click) while the pointer is over the strip, a trailing spacer takes the closed tab's width and the scroll position is restored, so the next tab slides in under the cursor. The strip settles in one frame when the pointer leaves, on a key press, a press elsewhere, window blur, or a worktree switch. Keyboard and programmatic closes, bulk closes, and strips that fit are not held.
6068844 to
be8b064
Compare
There was a problem hiding this comment.
Important
The merge that brought the base branch in reverted main's anti-slop fix on the e2e spec, so the head now fails the audit:anti-slop CI gate.
Reviewed changes
This run re-reviewed the delta since the prior pullfrog review at 6068844876 (pre-merge head be8b064cce). The only new commit is the merge ab243c2812, which merges the declared base hard-to-locate-current-tab-in-many-tabs (f6ee37ba) into the branch and changes exactly one file.
- Base branch merged in —
ab243c2812mergesf6ee37bainto the feature branch; the tree diff against the pre-merge headbe8b064cceis onlytests/e2e/tab-strip-active-dock.spec.ts. - Conflict resolution on the e2e spec — replaced the
declare globalWindowaugmentation pluswindow.__tabStripDockSamplesaccess withReflect.set/Reflect.get.
The authored feature code is untouched by the merge, and the previously flagged middle-click arm finding remains resolved.
⚠️ The merge reverted main's anti-slop fix on the e2e spec
tests/e2e/tab-strip-active-dock.spec.ts:145 now calls Reflect.get(window, '__tabStripDockSamples'), which trips anti-slop/no-reflect-get (configured error, and the audit runs with --deny-warnings). Both main (3f6225deeb) and the pre-merge head (be8b064cce) use the typed declare global form here; the merge took the base branch's older Reflect form instead, reverting that fix. This is why a full pnpm lint stops at line 145 — and why the PR workflow's "Reject low-evidence patterns" step will fail.
Technical details
# `anti-slop/no-reflect-get` fails on the merged e2e spec
## Affected sites
- `tests/e2e/tab-strip-active-dock.spec.ts:145` — `Reflect.get(window, '__tabStripDockSamples')`
- `tests/e2e/tab-strip-active-dock.spec.ts:123` — the same resolution switched `window.__tabStripDockSamples = samples` to `Reflect.set`
## Required outcome
- The spec uses typed property access again so `pnpm run audit:anti-slop` (and therefore `pnpm lint`) passes.
## Suggested approach
- Restore `main`'s version of the file (`git checkout main -- tests/e2e/tab-strip-active-dock.spec.ts`): the `declare global { interface Window { __tabStripDockSamples?: DockSample[] } }` block plus `window.__tabStripDockSamples = samples` and `... ?? []`. The rest of the file is identical between `main` and the current head.
## Evidence
- `pnpm exec oxlint --config config/oxlint-anti-slop.json tests/e2e/tab-strip-active-dock.spec.ts` → `1 error` at `145:7`: `anti-slop(no-reflect-get)`.deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
fb5f504
into
hard-to-locate-current-tab-in-many-tabs

ELI5
With lots of tabs, closing one with the mouse made the tab bar jump: the tabs next to the one you closed slid over or got wider, so the next × you were about to click moved away. Now, while your mouse is on the tab bar, the tabs stay put and the next tab slides in under your cursor, the way Chrome does it. The bar tidies up once when you move away.
What Changed
Before: when the tab strip overflows, closing a tab makes it shorter, and the browser fixes that in one of two ways:
After: a close made with the mouse (a click on × or a middle-click) on an overflowing strip, while the pointer is still over it, is held:
use-tab-strip-close-spacer.ts) takes exactly the closed tab's measured width.The strip settles in one frame when the user moves on:
pointerleavenever arrives (titlebar drag regions, hidden worktrees, app switches);A tab that opens while space is held takes that space, so the strip doesn't jump then either. The settle uses
flushSync, so the scroll arrows and the tab widths update in the same frame.These closes aren't held, and the strip shrinks the normal way:
Mouse closes are recognised by the existing
data-tab-close-buttonattribute, now also on browser and hosted-page tabs, plus middle-click. One capture listener on the strip handles both.The deferred-reveal
pointerleavelistener moves to the strip's wrapper, so it measures after the spacer is gone and moving onto the scroll thumb doesn't count as leaving.scrollTabStripByStepandisTabStripScrolledToEndmove unchanged totab-strip-scroll-step.ts, to keep the hook under the line limit.Why
This is Chrome's behaviour: tabs hold still while you close them with the mouse, and settle when the mouse leaves the tab strip. Alternatives I considered:
Keeping the strip's width covers both cases with one mechanism, and only for the interaction where it matters. Holding every close while the pointer happens to rest on the strip would turn repeated ⌘W into a growing blank, so only mouse closes are held.
Linked Issue
No existing issue. Stacked on #24010; the base branch is that PR's branch.
Visual Proof
The change is the absence of motion, which screenshots can't show. Frame-by-frame recordings from a hidden dev build are in Testing. A screen recording is still to come.
Testing
Unit tests (
tab-strip-growth-scroll.test.tsx). The harness now models the real flex layout: 180px tab basis, a 100px floor, a strip that shrinks to fit its tabs, and a clampedscrollLeft. The new tests cover:Each guard was checked to fail when removed.
Independent review: a separate agent reviewed the first version and found:
All are fixed above, with a test each.
Dev build on macOS, a hidden window driven over the DevTools protocol with real mouse clicks, recording every frame:
Checks: 835 tab-bar, tab-group and floating-terminal tests,
pnpm tc:web, oxlint and anti-slop on changed files, the changed-code quality gate, the max-lines check and the dead-classes check all pass.Not run:
tests/e2e/tab-strip-active-dock.spec.ts: its setup rebuildsout/, which a dev build running from the same worktree uses.Full
pnpm lint: it stops at an existing anti-slop error in that spec (Reflect.get, line 145), which comes from fix(tab-bar): keep the active tab visible when the tab strip scrolls #24010, not this change.Linux, Windows and SSH: not tested. The change is DOM and CSS only, with no platform-specific code.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand 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-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
scrollLeftread per scroll event;keydownandpointerdownchecks that return early when nothing is held.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)