Commit Graph
45 Commits
Author SHA1 Message Date
71404c99be fix(native-chat): show when a Codex usage limit resets, like Claude (#40992)
* fix(codex): keep the reset time when a usage limit rejects before the report reaches 100%

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

* fix(codex): read the usage-limit error code from the renamed error info

* fix(codex): skip windows that already reset when blaming a nearly spent one

---------

Co-authored-by: moncha3 <moncha3@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 02:53:37 +00:00
Kelvin Amoaba afa538b3ab fix(codex): stop native chat running Orca's no-op Codex status hooks (#40904)
Native chat strips pane env, so Orca's Codex hooks only spawn a shell per
event. On Windows with Store PowerShell first on PATH, Codex fails every
command-hook spawn with os error 5 (openai/codex#47810), which native chat
showed after each tool call. Disable just Orca's hooks.json entries for the
app-server launch with a session -c hooks.state override; user hooks keep
running.
2026-11-10 23:13:06 +00:00
Kelvin Amoaba 19d0f15919 fix(native-chat): show Codex's model list when the Codex command points at a file in the project (#40897)
* fix(native-chat): list Codex models in the chat's folder when its command line needs that folder

A Codex command such as `node node_modules/@openai/codex/bin/codex.js` failed from Orca's empty probe folder, so the picker fell back to the built-in list. Like Claude's probe, a command line that may name files relative to the chat's folder now lists there, with that folder untrusted so its project config never changes the account's list.

* fix(native-chat): untrust the lowercased folder key Windows Codex looks up first
2026-11-10 23:03:55 +00:00
Kelvin Amoaba e844a85e8a fix(native-chat): keep Codex generated images visible when a turn folds (#40893)
The settled-turn fold kept only the last prose row, so a completed Codex image generation folded behind the final answer. Mark generated-image rows and keep them out of the fold, like plans and turn notices.
2026-11-10 22:52:41 +00:00
OrcaWinandOrcaWin 60d7605df4 Remove low-value test examples and two suites (#40883)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-10 14:20:52 -08:00
Brennan Benson bfa33f6c1c perf(agents): release completed helper payloads and avoid history scans (#40171)
* perf(agents): release published child payloads and index live work

* perf(codex): preserve live task order on membership changes

* fix(codex): preserve parent-first helper interruption

* test(codex): assert public helper task identities

* fix(codex): keep helper roots in original stop order

* fix(codex): retain complete live helper ancestry for Stop

* Preserve sibling order when reasserting helper ownership
2026-11-09 13:46:19 -08:00
Brennan Benson c804008e4f Show friendly advice for Codex turn failures (#39959)
* Show friendly Codex turn failure advice

* Match terminal failure callback to status row type

* Keep terminal diagnostics in Details and clarify unknown failure advice

* Preserve usage-limit diagnostic metadata

* Validate custom host advice in phone renderer fixture

* Check categorized compaction failures and retained diagnostics

* Complete localized model-unavailable notices

* test(mobile): keep the failure notice helpers main's test cleanup removed
2026-11-09 12:34:12 -08:00
Brennan Benson 90a0748576 Source Control's Codex model menu lists your account's models even when Codex's catalog is large (#40117)
* Source Control lists Codex models from app-server model/list instead of debug models

The Codex text-action picker read 'codex debug models', a dump of Codex's whole
catalog with prompt templates (40-90 KB per model). Once it passed the 4 MiB
output cap discovery failed and the picker kept Orca's built-in list, and the
dump's hidden entries were selectable. List models with app-server model/list
(hidden rows excluded), over Source Control's own launch, lock and teardown,
with the same 4 MiB input budget and 60 s deadline.

* Bound Codex model discovery input in bytes, key its cache case-insensitively on Windows, and stop the app-server only when it ignores stdin EOF

- Count raw bytes from both streams against the 4 MiB budget.
- Read CODEX_HOME (and other account dirs) case-insensitively on Windows for the host cache key.
- Skip the post-listing kill when the app-server already exited; fail waiting listing requests once discovery settles.
- Report an incomplete model list as such.
- Tests: fake-timer grace and successor admission after a successful listing, method-not-found and unreadable-page fallbacks.

* Key the Codex discovery cache on the env spelling Windows spawn uses

Windows env names ignore case and Node's spawn takes the lexicographically first spelling, so
CODEX_HOME wins over codex_home; the cache key now picks the same one.

* Narrow Codex app-server records with the provider record guard instead of type assertions

* Read Source Control action model picks under the repo's host key, as the picker saves them

Local repos resolved generation under the 'unknown' host key because their connection id is undefined, so the saved pick was skipped and the agent default ran.

* Key Source Control model picks by connection until the repo record loads, and test with a real local repo

* Key a native Codex listing's cache on process.env when no agent env was resolved
2026-11-09 12:08:24 -08:00
bfa941aa06 fix(native-chat): honor Windows environment overrides consistently (#40301)
* fix(native-chat): apply Windows environment overrides consistently

Use the same case-aware composition for native chat launches, preflight,
model discovery and naming. Canonicalize configured Windows names before
account readers and preserve account pins and POSIX case distinctions.

Tracked in #39075.

Co-authored-by: 김태겸 <oharapass@gmail.com>
Co-authored-by: Vitalii Kulish <mancunianez@gmail.com>

* test(native-chat): cover effective Windows catalog changes

* test(native-chat): retain child environment test import after sync

* test(native-chat): verify Windows child environment precedence

---------

Co-authored-by: 김태겸 <oharapass@gmail.com>
Co-authored-by: Vitalii Kulish <mancunianez@gmail.com>
2026-11-09 12:04:26 -08:00
OrcaWinandOrcaWin 19afa64ee7 test: remove low-value provider and renderer assertions (#40279)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-09 10:11:48 +00:00
Brennan Benson 3ad9b7c44f Fix the speed button's unknown, Flex and chat-options Escape cases (#40173)
* Fix the speed button's unknown, Flex and composer Escape cases

Follow-up to #40052 from its review:
- An unknown speed names no tier instead of claiming Standard.
- Escape in the speed list inside the chat options popover closes only the
  list, not the whole popover.
- Only Codex's Fast tier gets the on/off chip, bolt and pressed fill; Flex
  and other tiers are picked from the list. The Fast test is shared with
  the main process.
- The list trigger takes the chip's pressed fill from the shared variant,
  and the list has an accessible name.

* Show every agent's speed as the same Speed button in every picker

Claude's and Cursor's Fast mode now use the ⚡ Fast button under a Speed
label in the chat options popover and the select-mode pickers too, instead
of a Fast mode switch, matching Codex: one button for two modes, a list for
more.
2026-11-08 23:38:32 -08:00
Kelvin Amoaba 80a9ed69f0 fix(native-chat): move open Codex chats to the account you switch to (#40148)
A Codex chat launched codex app-server on the account home saved when the
chat was created, and nothing compared it with the selection, so after a
switch every message kept going to the old account. A chat that had hit
its usage limit kept failing with "Codex hit its usage limit" even though
the new account had quota.

Codex chats now follow the selection the way Claude chats do: the launch
prepares the selected account's home, the started process reports that
home, and the host replaces an idle chat whose account no longer matches
before its next message. Codex resumes a thread only from a rollout in its
own CODEX_HOME, so the launch links the thread's rollout into the new home
first. The chat's usage card reads the account its next turn runs on.
2026-11-09 05:15:37 +00:00
Neil e9f4df2c0f refactor: organize rate-limit providers and remove forwarding modules (#40116)
* refactor: group rate-limit providers under concrete owners

* test: preserve mixed Claude account-switch regression

* refactor: consolidate Antigravity service contract import
2026-11-08 20:29:13 -08:00
Kelvin Amoaba 04e866e12c perf(native-chat): give the old agent 1 s to exit on /clear (#40103)
A process in Claude's group that ignored SIGTERM held /clear for the full
3 s grace; on /clear the supervisor now reaps the group after 1 s.

Linear: STA-14361
2026-11-09 03:53:08 +00:00
Kelvin Amoaba a086693d78 fix(native-chat): show newly installed skills in the Codex $ menu before the first message (#40012)
* fix(native-chat): show newly installed skills in the Codex $ menu before the first message

Resting Codex chats served the background probe's skills/list from a
5-minute cache, so a skill installed in that window showed "No matching
skills", even in a new chat. Each menu open now compares a cheap stamp
of Codex's skill folders and skill/plugin config with the one taken
before the last scan, and rescans only when it changed.

Probe requests always force a reload, and probe pools are keyed by the
catalog's launch generation instead of the whole env, whose 10 s refresh
started a second Codex on every rescan.

Fixes STA-14359

* fix(native-chat): keep the structured session hook within its line limit
2026-11-09 02:25:15 +00:00
Brennan Benson b27c910128 fix(codex): recognize the 16 app-server notifications added through Codex 0.167 (#39943)
* fix(codex): recognize the 16 app-server notifications added through Codex 0.167

Users run their own Codex, so 0.167 frames already reach Orca. Unlisted notifications fell back to visible raw rows in the chat timeline; classify each one from the 0.167.0 schema instead.

* test(codex): journal no row for app-server notifications that carry provider text
2026-11-08 17:44:59 -08:00
Neilandm4air dddc1260e5 chore(lint): oxlint 1.91, cheap perf/correctness rules, return-await fixes (#39730)
* chore(lint): bump oxlint to 1.91, add perf lint rules and perf audits

* fix(lint): await promises returned inside try/catch/finally for return-await

Prepare typescript/return-await with error-handling-correctness-only: await
returns whose catch or finally was meant to cover them, and suppress the eight
sites where the catch must not re-handle the returned promise.

* chore(lint): enable return-await (error-handling-correctness-only); exempt secondary-scan directives in the changed gate

* refactor(mobile): move file preview discard modal into its own module

Keeps MobileFilePreviewScreen under the 400-line limit after merging main.

---------

Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
2026-11-08 06:21:54 -08:00
Brennan Benson 7a8c16caa5 Preserve the chat's history when forking (#39168)
* Preserve the chat's history when forking

* Preserve fork receipts and finished conversation history

Save native-copy receipts on the real create path, retain standalone Codex copies and Claude compaction bridges, and omit unfinished helper output. Restore rewind read-error refusals and update the affected provider fixtures.

* Keep fork coverage tied to OpenCode's copied messages

* Preserve the actionable refusal when chat creation stops

* Keep completed helper answers when copying chat history

Follow spawning tools and active helpers to their descendants without making an omitted goal row invalidate a settled helper's independent output. Reuse the public copy-error distinction so private transcript exceptions stay behind the generic create refusal while authored fork errors remain actionable.

* Keep fork history stable with OpenCode 1.x

* Exclude later continuation notices from fork snapshots

* Keep fork continuation notices tied to retained work

* Keep fork catch-up recoverable and preserve copy cancellation

* Keep OpenCode coverage timeouts on the read refusal path
2026-11-08 01:48:11 -08:00
Neil 83f8e6340d refactor(shared): organize file operations and storage owners (#39746) 2026-11-07 22:58:35 -08:00
Brennan Benson 133bc99e5a Keep waiting chat input in one ordered queue (#39271)
* Prepare queue rows to preserve accepted delivery intent

* Keep waiting native chat input in one ordered queue

* Keep a typed view of admitted queue records

* Keep the removed queue caption in the runtime catalog

* Remove the unused queue barrier caption

* Keep queue writes local and preserve accepted send provenance

* Read the sender from the queued admission request

* Keep continuation fixture clock within its operation window

* Remove deleted queue-barrier test from ratchet baseline

* Keep ratchet baseline change scoped to the deleted test

* Filter historical acceptance reads before loading payloads

* Instrument cached acceptance cursor once per fixture

* Restore original personal provenance after legacy card cleanup

* Complete legacy sender fixture metadata

* Narrow admitted history record types

* Reconstruct accepted personal proof after restoring original admissions

* Use the fixed clock for historical queue fixtures

* Consolidate queue source and type imports

* Preserve admission refusals and failed startup ownership

* Keep manual queue holds independent of later turn endings

* Remove obsolete mobile queue barrier expectations

* Keep journal format initialization independent of its decoder

* Assert returned-row recovery for released send clients

* Preserve Stop assertion across handoff-only publication
2026-11-07 11:35:38 -08:00
OrcaWinandOrcaWin 8004bfd425 test: remove 364 low-value main, renderer and shared tests (#39365)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 00:13:23 -08:00
Brennan Benson ad4bb83fa1 Open the chat model picker without walking every worktree (#38660)
* fix(native-chat): list Claude and Codex models per account, not per folder

Opening the chat model picker rebuilt every worktree row to work out which
folder the read was for, because Claude and Codex model lists were keyed by
folder. Only the default model/effort depends on the project, so lists are now
keyed by account, WSL and the resolved CLI invocation and listed from the
account folder; the CLI is still resolved where the chat would launch. The
selected workspace is derived directly from its selector, and its own project
settings decide whether the account's default model and effort are shown.
The worktree projection and its cache are removed.

* test: merge duplicate node:os import

* fix(native-chat): list from Orca's probe folder, keep cwd-relative CLIs in their folder, one project-settings pass

- List Claude/Codex models from Orca's empty probe folder so a home folder's settings never read as another account's project settings.
- A command line naming files relative to the chat's folder lists there and is keyed to it.
- Read project settings once per binding for both the model and effort answers; per-model effort-only Claude settings keep the account model.
- A running chat's catalog withholds the account's configured choice where its project may pick its own.
- Bound the picker's workspace resolution so a stalled floating folder cannot hold it.

* fix(native-chat): catch quoted ./ arguments, list prewarm from Orca's probe folder, fake-timer the shared-listing test

* perf(native-chat): parse each project settings file once for both model and effort

* test: catalog e2e expectations list from Orca's probe folder; phone saturation keys per folder

* fix(native-chat): share a listing while any reader wants it; list custom command lines in the chat's folder; resolve a floating folder within the read's own wait

- A model listing shared by several folders keeps running while any reader still waits on it, queued or running, and stops (never starts) once the last one gives up.
- A Claude or Codex command line with user arguments or a relative command lists in the chat's folder; Claude reads only user settings there so project settings never narrow the account's list.
- A waiting read resolves a floating folder within its own deadline; a read that doesn't wait returns at once and starts the listing when the folder resolves.

* fix(native-chat): every reader of a shared model listing owns it until its own deadline; floating reads list their folder within their own budget

- Readers of the same request share one lookup that lives until the last reader's deadline, so later readers neither repeat CLI/settings setup nor lose the listing when an earlier one ends or is cancelled.
- A shared listing's requests carry no single reader's deadline: the provider timeout bounds them and the last reader leaving stops them.
- A floating picker read that doesn't wait starts its folder's listing under its own deadline and retirement, and says the listing is in progress so the picker follows with a waiting read.

* fix(native-chat): a shared model listing survives the chat that started it; unreadable workspaces list as the account

- Each reader of a shared lookup fences its own request, so one chat closing never ends another chat's listing; the lookup's budget is the latest deadline among readers still waiting, and its listeners are released when it ends.
- A picker for a workspace this host can't inspect (remote, WSL, ambiguous, stalled) lists as the account does from Orca's probe folder, never from wherever Orca itself runs.

* refactor(native-chat): readers of one model request share an ownerless setup and each own only their claim and the listing

- Same-request readers share one setup (folder, account, CLI scope and the folder's own default settings) that belongs to no reader: its budget is fixed when it starts, it ends with the service or the agent's retirement, and it is reused while it runs and while the listing it found runs.
- Each reader keeps its own claim, deadline and cancellation; a binding holds scope facts only and never cancels another reader's claim or a shared listing, so one chat closing never ends another chat's listing.
- A floating picker read that doesn't wait no longer asks to list the unresolved folder.

* fix(native-chat): shared catalog setups end on their budget or a workspace change, readers settle on cancel, and defaults and account seeding happen once

- A shared setup that runs out of its budget, or whose workspace or agent is retired, answers nothing at once and leaves the cache, so a reader with time left resolves afresh (a moved folder never reuses the old path).
- Cancelling a reader, or stopping the service, ends its wait at once.
- A folder's own default settings apply to its binding whenever they arrive; the account list is seeded once per shared setup, not per reader.
- A reader shares a setup only with readers whose own chat agrees on whether it may list.

* fix(native-chat): a settled catalog setup serves its whole listing, and a folder's default settings stay bounded and reach every reader

- A setup that has answered stays reusable while the listing it found runs, past its first reader's deadline, until it is ended or its agent retired, so later readers don't redo CLI and project-settings work.
- The setup's budget holds until the folder's default settings have answered too; settings that outlive it are read again while a reader still has time, and apply to the request's current binding whichever reader asked.

* refactor(native-chat): the catalog service owns each model refresh within one fixed budget; pickers only wait

A refresh (account, folder and CLI resolution, the folder's default settings,
admission and the listing) now belongs to the catalog service with one 30s
budget fixed before setup. Readers join it and wait only until their own
deadline or cancellation; none extends, shortens or ends it. Expiry withdraws
queued listings, stops the process and drops late answers. Defaults apply only
to the refresh's own binding, so a moved folder's late settings never describe
the new folder. A waiting read that used its whole budget is final.

Replaces per-reader claims, shared setups and reader-counted listing demand.

* fix(native-chat): retiring an agent or a chat's folder ends its catalog refresh at once, and a shared setup never rechecks the chat that started it

- Retiring an agent ends a refresh still stalled in setup, so a waiting picker
  answers at once instead of after the refresh's budget.
- A listing that runs in a chat's own folder stops, and its answer is dropped,
  when that folder's command context retires; listings shared across folders
  stay independent.
- Scope resolution uses only the passivity its readers had when they asked,
  so another chat's record going away mid-setup no longer turns it saved-only.
- A reader that stops waiting unsubscribes from the listing at once.

* fix(native-chat): one workspace's retirement no longer stops a catalog listing another workspace shares

A listing is keyed by the folder it lists in and the CLI invocation, so moving
one workspace never makes it describe the wrong folder; stopping it there
cancelled a listing another workspace on the same folder still needed. Agent
retirement and shutdown still stop listings at once.

* test(native-chat): a folder change keeps another workspace's shared catalog listing, and never answers the new folder with the old one's

* test(native-chat): a folder agent's listing survives another workspace on its folder moving

* test(native-chat): type the shared-setup harness's held stages without casts

* fix(native-chat): Claude and Codex pickers show the account's default in every folder

The picker no longer reads a repo's own model or effort settings for Claude and
Codex: they show the account's list and default everywhere, and the CLI still
applies the repo's settings at launch. OpenCode, OMP and Pi keep their project
checks. The model/effort split and the peek withholding go back to main's shapes.

* fix(native-chat): a Codex listing in the chat's folder never loads that folder's project config

A Codex command line that may name files in the chat's folder still lists there,
but now marks that folder and its parents untrusted for the listing, so a repo's
own model catalog can't replace the account's. The exported project-settings
check also answers no for Claude and Codex.

* fix(native-chat): Codex lists models only from Orca's probe folder

A Codex listing no longer starts in the chat's folder for custom or relative
command lines, so a repo's own config can never change the picker's list, as
other Codex hosts do. Chats still launch with the user's command line and folder.
Drops the untrusted-folder override.

* fix(native-chat): Codex listings never read project config above Orca's folder

With no project-root markers, Codex reads project config only from the listing's
own folder, so a trusted repo that contains Orca's profile can't supply the
account's model list.

* docs(native-chat): say what Codex listing isolation covers, and what managed config can still restore
2026-11-06 16:59:49 -08:00
Brennan Benson 969c5ddd3a Support native Plan mode in chat (#38286)
* Add session Build and Plan choices to native chat

* Refresh planning choices across connected composers

* Give composer catalog tests a complete transport fixture

* Preserve planning choices through fresh turns and older hosts

* Type planning delivery fixture choices explicitly

* Honor mode capability for retained queued command picks

* Update existing native mode contract expectations

* Keep proposed plans visible in completed chat turns

* Group chat mode with permissions and goal controls

* Keep chat composer controls accessible in narrow panes

* Preserve composer overflow ownership and editor focus

* Complete composer localization catalog and subscription checks

* Keep chat composer controls contained in narrow panes

* Use the button spacing for compact Save

* Place chat mode immediately before Goal

* Restore Plan status test dependencies after main sync

* Show an exit pill only while chat Plan mode is active

* Remove obsolete composer tooltip translations

* Remove unused Build toggle catalog entries

* Apply Plan commands immediately from composer picks

* Preserve picked skill origin in composer admission

* Supply phone platform to composer regression fixture

* Preserve mode picks until their writer admits them

* Narrow the phone mode command before its draft transform

* Document the option fixture mutation shape

* Match phone Plan controls to the composer mode pills

* Assert optimistic mode feedback in the phone fixture

* Retain the phone mode pick recovery regression proof

* Use the relocated observation imports after the main merge

* Restore the composer IME module import after merging

* Read the queue assertion helper from its relocated owner

* Point the mode fixture at the relocated selection controller

* Register the phone Plan pill localization keys
2026-11-06 12:42:48 -08:00
Brennan Benson d0a3190b86 Import Codex command history the way the live chat shows it (#39066)
* Import canonical Codex execution history

* Fix Codex history import lint warnings

* Preserve Codex imported prompt content and item lifecycle

* Preserve Codex root order after history fact eviction

* Order imported Codex turns by recorded chronology

* Preserve retained Codex lifecycle and history row placement
2026-11-06 11:44:32 -08:00
Neil 1c950baf33 refactor(main): group session lifecycle and journal modules by owner (#38638)
* refactor: group structured session modules by owner

* test: retire status history work-count oracle suite

* refactor(main): organize journal storage and projection owners

* Consolidate restart recovery fixture imports

* Consolidate concrete session option model imports
2026-11-06 06:00:08 -08:00
Brennan BensonandClaude Opus 5.5 2648941358 Fork a Chat UI chat from any finished response (#38326)
* feat(chat): shared contract for forking a chat from a response

Adds the create-time fork source, the host fork capability, the agent fork
level, the forked-from record relationship and the forked-from divider row.

* feat(chat): advertise each agent's fork level and a chat's fork support

* feat(chat): carry a fork source through chat launch, reload and retry

A launch with forkFrom {sessionId, throughItemId} keeps it on the create call,
the saved launch record, reload, retry and its holders, sends no new-chat
options, and is refused before create on a host that does not advertise forks.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* feat(chat): fork a native chat from a finished response on desktop

Finished root responses offer "Fork from this response" where the host and
agent can fork: disabled while support is unknown or a fork is opening, opened
in a new tab right after the source, with one toast naming the agent on
failure. The forked-from row draws as a divider linking to its source.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* feat(mobile): fork a chat from a response in the message actions sheet

The sheet offers "Fork from this response" with the desktop's eligibility and
host capability, creates the fork through the phone's chat create, and draws
the forked-from divider with a link to the source chat.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* feat(chat): a fork create replays only as the same fork

* Add native conversation copy adapters

* Create native chat forks with derived source markers

* fix(chat): offer a fork only on rows that show the agent's own message

A displayed row can be a tool call or a status projected as a plan while
reading as a response; both clients now check the journal row's own kind.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(chat): open phone and paired-desktop forks right after their source

The phone names its source tab as the create's placement and the host takes
that tab's group; a paired desktop sends the address captured at the click
when the fork has no tab of its own yet.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(chat): float a mid-turn response's fork action instead of adding a line

The action on a response the turn continues past hangs from a line of no
height, as the reply controls hang into the gap, so tool-heavy turns keep
their spacing.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(chat): follow the chat's own fork verdict on both clients

The options read already says whether the installed agent forks; an observed
no hides the action, an unanswered read keeps it disabled, and yes enables it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Preserve native copy boundaries and rewind behavior

* Preserve imported fork tips and serialize create replays

* fix(mobile): open a fork's source through the session's own chat opener

The forked-from link now asks the controller's existing opener for the source
by history id, so it follows that opener's host, selection and reveal rules
instead of navigating on its own.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Project fork markers from touched journal groups

* Retain fork group restoration for delayed readers

* fix(chat): keep a mid-turn response's fork in its own right gutter

The floated action covered the start of the next row. It now sits beside the
response's last line, in a gutter as tall as the prose, so it adds no line and
never reaches the following row.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Preserve native fork chain boundaries and durable streamed copies

* Place phone forks beside their source in window publications

* fix(tabs): adopt a host's new tab where the host placed it

First adoption put every unseen tab at the end of its group, so a fork the host
published after its source landed last. A new tab now follows its nearest host
predecessor when that tab is here; tabs already adopted keep the user's order.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(chat): reserve the fork gutter on every root response from the first frame

The gutter came and went with the fork offer, so prose reflowed when a turn
finished or support resolved. A pane that draws forks now keeps it on all root
responses, and the fork sits only there, not also beside Copy.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Return Codex copies without automatic provider renaming

* Resolve chat placement once at the current layout owner

* Preserve chat publication when saved opens are skipped

* Retry chat opens when queued placement changes

* Bound stale chat placement retries

* test: expect the OpenCode reader's imported fork tip

* perf(chat): keep the fork offer stable while a chat streams

Every stream commit made a new forkable-id set, so the fork context changed and
every offered response re-rendered. The set is reused while its members hold,
and rows get an action object that changes only with support or pending.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix: keep the fork params and Claude fork worker inside main's new lint limits

* Test fork copy and source refresh scaling

* fix: merge duplicate imports and stringify the OpenCode fork tip id for main's lint rules

* Keep fork placement behind session tab projection boundaries

* test: annotate the Claude copy test's hoisted account homes instead of asserting

* fix: add the fork action and forked-from strings to the English catalogs

* test: give fixtures the fork copy their agents declare; add the forked-from string to the boot catalog

* test: keep registry fixtures consistent with the fork copy their agents declare

* fix(orcad): ship the Claude fork worker with the server; update tests for fork fields

* Test saved fork selections through import and first send

* Preserve ordinary chat publication while saving placement

* Show fork beside the copy button on phone chat responses

Long-press opens text selection on every current phone, so the actions sheet that held fork never opened. The fork button now sits next to each response's copy button.

* Keep the phone fork slot fixed and offer it on every forkable response

The fork slot is now held by the row's own kind, as desktop's gutter is, so finishing a turn or learning the host's support never moves the timestamp. Responses with no copyable text (a visual only) still get fork, and each button re-renders only when its own offer changes.

* Follow main's moved runtime modules in fork code and tests

* test: build the phone response-actions fixture without type casts

* Let the phone read the host's agents so its fork action can turn on

Phone QA found the fork button always disabled: the phone asks the host which agents can fork, and the host refused that read from paired phones.

* Retry the phone's agent-list read, and read again after a reconnect

A read lost to a dropped connection or a timeout left Fork disabled until the chat was reopened.

* Own the phone's agent-list retry timer in its own effect

CI's effect-cleanup check could not see a timer set inside the read's callback; each retry is now a state change with an effect that sets and clears one timer.

* Give each phone connection its own agent-list retries

A count left over from an earlier connection could leave a new one with no retries, so one failed read kept Fork disabled after the transport moved.

* Scope the phone's agent-list retries to each spell of discovery

When the host's fork support dropped and came back on the same connection, the earlier failures carried over, so one more failure got no retry. Each stretch of discovery now owns its reads, failures and retry timer.

* Keep the forked-from source link reachable by screen readers

The divider's separator role and row label hid the source chat button inside it; the rules are now decorative and the text and button read normally.

* Keep fork names owned by adopted chat records

* Use the fork icon for Fork from this response

* Show the phone meta actions only when a row has one

An empty actions group still shifted the time by the icons' edge margin on rows with no copy, fork or rewind.

* fix(chat): put Fork beside Copy in the response's hover row

The fork button sat alone in a right gutter far from the other row actions.
It now joins the response's existing hover controls next to Copy, where those
controls show, and the gutter is gone.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(chat): keep a finished turn's actions on its last words and hold the Fork slot

A turn whose last prose was followed by tool or thought rows showed no Copy
and no Fork anywhere until it was collapsed. The actions now belong to the
turn's last prose row, decided when the transcript's rows are built, and keep
the gap below it whole so they never cover the next row. Root responses also
keep an empty Fork slot when not offered, so resolving support never moves
the row's other actions.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(chat): give a turn's actions only to a reply with words

An image-only reply after the turn's text took the response actions but could
not draw them, so the text lost Copy and Fork. Slot construction now picks the
turn's last reply by the same words the row draws and copies.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(chat): let an image-only response hold a turn's actions when its text is folded

A collapsed turn that ends in an image hides its earlier text, so no drawn row
could show the response actions and Fork vanished. Each turn's actions now go
to its last drawn response with words, else its last with images. Copy and its
context-menu target appear only where there are words to copy.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Fix Claude fork cuts after local commands

* Extract the conversation copy input contract

* Preserve caller results at Claude fork boundaries

* test: check the copied fork for the wake answer without a type assertion

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-06 02:08:24 -08:00
OrcaWinandOrcaWin a4cad3766b test: remove 1296 low-value mock and projection tests (#38837)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-05 21:39:35 -08:00
Brennan Benson 45a468894d Show proposed files and collapsible details in Codex approvals (#37960)
Show Codex file-change proposals in approval cards and keep verbose operation details collapsed by default on desktop and phone, with reason, access and answer choices visible.

Preserve approval identity and answer behavior, keyboard focus, and scroll position when details expand or collapse.
2026-11-05 20:32:50 -08:00
OrcaWinandOrcaWin 4c49ddca3e test: remove 477 low-value agent and platform tests (#38778)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-05 18:21:27 -08:00
OrcaWinandOrcaWin db63e7f092 test: remove 594 low-value Codex tests (#38775)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-05 18:04:11 -08:00
Brennan Benson f5b6f76f99 feat(native-chat): show the chat's Codex usage card for /usage (#38352)
* feat(native-chat): show the chat account usage for /usage

* fix(native-chat): derive usage card lifetime from its owning turn

* test(native-chat): keep runtime manifest coverage additive

* fix(native-chat): advertise usage from the host options reader

* fix(native-chat): read cold chat usage through the chat's own Codex launch

- Cold /usage starts a short-lived app-server the way the chat launches
  (configured command, args, environment, pinned home), as Codex rename does;
  the status-bar probe returns to its original path.
- Report each reset outcome inline after the card refreshes.
- Send the chat's account as a typed kind plus email; the client owns copy.
- API-key accounts are recognised by a typed error, not message text.
- Keep the caret after kept text; drop unreachable WSL matching.

* refactor(native-chat): share the at-rest Codex app-server launch between rename and usage

* fix(native-chat): keep a reset's outcome when the usage refresh fails; label accounts by kind

* fix(native-chat): drop stale usage replies by request id instead of a render-time ref

* test(native-chat): keep the usage card test inside the web project

* fix(native-chat): clear the usage card when a waiting prompt changes; retire its callbacks on unmount

* chore: drop accidental pnpm lockfile churn from the main merge

* fix(native-chat): put the caret after kept text on /usage; offer the reset once the host's first Codex read lands

* fix(native-chat): type the usage snapshot wait and its test state

* fix(native-chat): re-read the usage offer when the chat host's Codex state changes, instead of forcing a host read

* fix(native-chat): watch the usage host from the card's opening and keep one background re-read at a time

* fix(native-chat): bind the usage card's background re-read to its opening

* feat(native-chat): open /usage as a modal like /resume

The chat's Codex usage card now opens in a root-hosted dialog with the
same surface, width and dismissal as /resume's Session History, instead of
a full-width card docked above the composer. Closing the modal retires its
reads; docked-only clearing on turn, prompt and session changes is gone.

* fix(native-chat): give the /usage modal /resume's fixed height and drop a replayed mount's first read

* fix(native-chat): size the /usage modal to its card and keep the card's layout while loading

* fix(native-chat): pin the /usage modal's top where /resume's sits so loading never moves its title

* chore(native-chat): describe the /usage loading placeholder accurately
2026-11-05 12:42:27 -08:00
Brennan Benson 85a68bfa4f Codex subagent rows show their task names instead of all saying "worker" (#38491)
* fix(agents): tell Codex subagent rows apart by task name instead of role

A Codex subagent's task name only reached the sidebar when one early read of its rollout succeeded; otherwise every child fell back to its role, so two workers both read "worker". The child poll now re-reads an unnamed child's own rollout, the first-line read allows the existing 256 KiB line cap, and a child with no task name or nickname carries the tail of its id, as Codex's own agent list does. Labels keep the path below the root so nested children with the same leaf stay distinct.

* fix(agents): retry an unnamed Codex child's own rollout without a parent transcript

A relay restart can leave a child hook as the only evidence, sent before the child's rollout was readable. Keep that path as pending identity work and retry it through the existing transcript poll, which now stays scheduled while a child still owes its name.

* fix(agents): carry the id tail to every child-row surface and bound identity retries

- Full-mode sidebar rows and dashboard subagent cards use the same suffixed label as compact rows.
- A role a host publishes as the name (Claude's subagent_type) no longer counts as a name.
- A final identity miss no longer re-arms polling; retries take turns, eight children per poll.
- Replace an error cast with a type guard.

* fix(agents): keep every identity read inside the per-poll budget

The parent-rollout poll now queues an unnamed child for the bounded, rotating identity retries instead of reading it directly, and full-mode rows keep the id tail for a child with no name or role.

* fix(agents): keep plain names on task-only rosters and guard the queued rollout path

A host that publishes only a task roster carries no role, so its names can't be told from roles and get no id tail. Update the sidebar lineage test for a role-only child's id tail.

* fix(agents): tell role-named tasks apart on task-only rosters

A host that publishes only a task roster sends Claude's subagent_type as the task name, so two such tasks read identically. A named agent task with no description now carries its id tail; an unnamed one keeps its kind label.

* fix(agents): a task path found meanwhile wins over a queued header read

Placeholder labels (e.g. unknown) count as unnamed when queueing, and a child the parent rollout named before its turn drops its pending read instead of being overwritten by the header's nickname.
2026-11-05 10:26:01 -08:00
Neil 8417fa890a refactor(main): group agent runtime code by defining owner (#38565) 2026-11-05 06:45:18 -08:00
Brennan Benson cb456bfc2b fix(native-chat): run /goal pause, resume and clear in Codex chats (#38250)
* fix(native-chat): run Codex /goal pause|resume|clear and /usage from chat

Codex app-server has no slash parser, so a chat's /goal pause set the goal's text to "pause" and /usage reached the model as prose. /goal pause|resume|clear now change the current goal through the host, and /usage opens the Codex usage section in Settings for the chat's host.

* fix(codex): say a chat has no goal when /goal pause or resume finds none

Codex rejects a status change without a goal in words naming the thread id; read the goal after that rejection and show Orca's copy instead.

* fix(native-chat): address review on Codex /goal controls and /usage

Look goal words up without inherited properties, keep text after a picked /usage, let Send run what Enter runs on a held host, name Codex when there is no goal (clear included), and drop the shared /goal hint that phones and goal-less hosts would show for words they send as text.

* fix(native-chat): keep the draft after a picked /usage and hold goal-mode Send

Picking /usage opens Settings and leaves the text typed after the command; Enter on the row no longer sends /usage to the agent. Goal mode submits its draft as an objective, so a held host keeps Send held there, and an enabled Send is not labelled with the hold.

* test(native-chat): build the picker state instead of casting it

* fix(native-chat): honor Stop before naming a missing goal, and own any Codex /usage row

A canceled pause or resume no longer reads the goal to word a refusal, and an agent-reported /usage row gives way to Orca's, as /resume already does.

* revert(native-chat): leave /usage for its own change

Brennan wants /usage to show the status bar's Codex usage panel for the chat's account, in a separate PR; this PR keeps the /goal controls and the held-chat Send fix.
2026-11-04 18:49:32 -08:00
Brennan Benson e5a960cbf9 Show changed files directly in chat turns (#38256)
* Show changed files directly in chat turns

* Use the fixture frame for the diff interaction

* Keep changed filenames readable and preserve file actions

* Keep unconfirmed file changes in tool activity

* Capture changed files in completed transcript fixtures

* Preserve patch data with authoritative history status

* Keep mobile diff interaction coverage beside its card

* Assert the decoded patch line contract

* Exercise full returned history in catch-up coverage

* test(chat): target file summary when reopening patches
2026-11-04 17:53:16 -08:00
Kelvin Amoaba 5f367e14bd fix(chat): show Codex image generation as generating while it runs (#38269)
* fix(chat): show running Codex image generation as generating

* fix(chat): settle an abandoned Codex image generation as not running

* refactor(chat): inline the running image status check
2026-11-05 00:28:22 +00:00
Kelvin Amoaba 7247685c74 feat(native-chat): let users pick when idle chat agents stop, or never (#38202)
* feat(native-chat): let users change or turn off the idle stop for chat agents

The idle sweep stopped every chat's agent after a hard-coded 30 minutes,
which broke peer messaging, Claude Remote Control and background
subagents. Settings > Chat > Behavior now picks the window, including
Never, and the sweep reads it every tick so a change applies without a
restart. Never only keeps agents running: a chat handle with no agent
still retires on the default window.

* test(native-chat): type the childless sweep fixture's journal parameter
2026-11-04 19:30:58 +00:00
OrcaWinandCodex a19de98085 Remove 249 low-value test cases and 10 whole suites (#38198)
Co-authored-by: Codex <codex@openai.com>
2026-11-04 10:36:55 -08:00
OrcaWinandOrcaWin 2270f75780 test: remove 189 low-value test declarations (#38169)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-04 08:50:29 -08:00
OrcaWinandOrcaWin d2c77f0277 test: remove 280 low-value test declarations (#38157)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-04 07:22:20 -08:00
OrcaWinandOrcaWin 2724b03166 test: remove 482 low-value test declarations (#38145)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-04 06:32:36 -08:00
OrcaWinandOrcaWin 25cd81665e test: remove 675 low-value test declarations (#38129)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-04 04:51:57 -08:00
Brennan Benson 974bb4a7ca Preserve chat inputs through uncertain delivery and Stop (#32267)
* Give unconfirmed chat messages explicit recovery actions

* Resolve receipt settlement code quality findings

* Complete recovery copy localization and callback types

* Align send lifecycle contracts with explicit recovery actions

* Include the unconfirmed opener in the restart fixture type

* fix(chat): preserve recovery ownership across lifecycle boundaries

* Preserve send ownership across context replacement and recovery

* Separate history ingestion from live send settlement

* Preserve original send truth and reconcile acquired history

* Use summary-shaped history responses in acquisition coverage

* Preserve queued image recovery for released readers

* Prove independent late receipt recovery across reopen

* Preserve queued image sources in bounded catch-up projection

* Keep queued input and explicit chat retries in their original domains

* Preserve reader lifetime across main session interfaces

* Fix static checks after main integration

* Migrate retained recovery Stop contracts to current lifecycle

* test: use typed access for journal population counters

* fix: consolidate history page bounds type imports

* test: exercise legacy snapshot reuse through selected handoff

* Fix attachment draft typing and document test boundary casts

* Repair current journal integration types and contract fixtures

* Keep uncertain send recovery in queue reorder reopen contract

* Repair mobile contract boundaries and exact queue lookup

* Align input finalization contracts with current Stop ordering

* Keep recovery copies independent of queued message barriers

* Reconcile Stop and replay contracts with current lifecycle

* Update recovery tests for current module and draft APIs

* Align Stop recovery contracts with independent queue policy

* Expose independent recoveries to current queue controls

* Cover sending-only queue Resume visibility

* Adapt recovery contracts to shared queue projection

* Use current history and failure-word contracts in recovery tests

* test: retain released reader source contracts through queue settlement

* Keep uncertain sends in ordinary history and preserve saved queue choices

* test: prove mobile draft leaf subscription isolation

* Use typed operation instrumentation in mobile recovery test

* Align lifecycle test boundary typing with static rules

* Repair test module typing and retained runtime copy catalog

* Remove unused chat delivery notice translations

* test(chat): retain legacy handback without uncertainty notice

* fix(chat): omit saved uncertainty card captions

* test: bind released readers to exact queue wire and proof

* Replace archived reader evaluator with exact recorded contracts

* Mark queued edit test hook import as type-only

* Isolate queued card tests from native inline composer imports

* Complete structured mobile resolution in queued edit test

* Align mobile attachment cleanup lifetime test with send outcomes

* fix: restore journal prototype delegation methods

* Keep uncertain sends as ordinary messages in memory

* Release notes admission after uncertain opening completes

* fix: end opening selection operations at uncertain completion

* fix: derive selection admission from live requests and repair integration tests

* test: consolidate send imports and use a supported locale

* Fix CI test types and synchronize retired delivery catalogs

* Type exported test fixture mocks through the public Vitest API

* test: align selection and journal verification contracts

* Reconcile acquired history before journal projection

* Preserve saved invocation facts during history catch-up

* Repair journal recovery consumers and CI contracts

* Keep failed legacy import displays serializable and bounded

* Preserve journal owner boundaries in CI import cleanup

* Fix typed test fixtures for session recovery contracts

* fix: align history and recovery contract types

* test: verify logical rewind across released chats

* Bound retained queue and status reads

* Bound Stop and delivery reads to relevant journal inputs

* Bound subscriber catch-up and stopped-history reads

* test: align journal read fixtures and operation counts

* Bound automatic chat reads to current input evidence

* fix: align journal reader contracts and test fixtures

* test: type historical dispatch rejection fixtures

* fix: restore merged session projection and fixture types

* fix: preserve resumed queues across logical fork rewind

* Preserve queue pause chronology across logical rewinds

Keep original Stop and Resume coordinates while retaining matching warm failure evidence in the journal owner. Keep historical fixture authoring separate from current production writes.

* End historical fixture authoring before current queue actions

* Keep answer operations separate from retained messages

* Fix resting chat attention context

* Fix attention regression fixture provenance

* Validate retained RPC test frame reads

* Fix retained attention and RPC contract fixtures

* Keep send observations on canonical delivery evidence
2026-11-04 02:40:10 -08:00
OrcaWinandOrcaWin e98c6a439a test: remove 2816 low-value test declarations (#38030)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-03 21:45:29 -08:00
Neil f33197523d refactor: group Codex transport trust and journal owners (#38023) 2026-11-03 20:45:04 -08:00