* feat(workspace-cleanup): show how much space Codex chats take
The Chat history setting can delete Codex chats from deleted workspaces,
but nothing showed how large that history had grown (#16776 saw 11 GB).
The row now says how much the host's Codex chats use, measured read-only
on a worker thread across every Codex home, counting each hard-linked
rollout once (set-aside copies included) and never reading through links.
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* perf(workspace-cleanup): reuse the Codex history size walk and skip it while hidden
* fix(workspace-cleanup): never answer a read after a deletion with the earlier walk
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* fix(workspace-cleanup): stream the Codex history walk, count merge folders, flag unreadable history
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* perf(workspace-cleanup): async worker walk, ship it in the server bundle, skip hidden refreshes
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* fix(workspace-cleanup): start the walk's time budget in the worker; walk with sync calls inside the worker entry
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* fix(workspace-cleanup): budget the home listing and skip folders whose real path changed
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* fix(workspace-cleanup): every walk step checks the deadline; count a folder only if it still resolves to itself
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* perf(workspace-cleanup): stop a Codex history walk that a deletion made obsolete
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* style: wrap reader types
* test(fixtures): show the Codex history size in the Workspace Cleanup fixture
* chore: format the walk test and list the new size keys as protected copy
* fix(settings): read the Codex history size only while settings search shows the row
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* perf(settings): check Codex account ownership in the history worker, not on main
The main-blocking helper ratchet flagged the account ownership reads; main now
lists account folders asynchronously and the worker verifies them.
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* perf(settings): size Codex history without session discovery's sync account check
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* fix(settings): count relocated account homes and list each home once in the size walk
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* fix(settings): keep the ownership loop where the blocking-helper ratchet allows it; fix types
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* fix(settings): keep a folder's counted rollouts when the size budget runs out; flag skipped folders
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* perf(settings): stop the Codex history walk when the last settings view stops waiting
Each read names its view; a view that closes, hides or switches host before the size
arrives releases it, and the host stops the walk once no view waits.
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* fix(settings): use the non-secure-context UUID and wait for a stopped walk's worker to exit
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* fix(settings): release a size read when its window's connection closes; bound the wait for a stopped walk
A window that reloads, crashes or disconnects never sends its release, so each read
now registers against its connection and is released when that connection retires.
Waiting for a stopped walk's worker is capped and ends when the read is abandoned, so
a worker stuck on a hung mount can't hang every later read.
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* test(settings): drop the typed-array cast in the connection-release test
* fix(settings): share one capped wait per stopping worker; skip it once the read is abandoned
Each retry no longer attaches a waiter to a worker stuck on a hung mount, and a read
released before its wait began returns at once.
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* fix(settings): share one capped listing of Codex homes across size reads
Listing the account folders can't be cancelled, so reads abandoned while it stalls
each left one pending. Reads now share one listing and one wait for a stopped worker,
each capped at 10 s, and fail fast past the cap without attaching more waiters.
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* feat(settings): show Codex history size as a badge beside Recommended
Brennan's review: the size belongs to Codex, and a sentence was wordy. The row now shows
'Codex history: <size>' (with '+' when the walk stopped early) as a muted badge; its
tooltip says the space is Codex's own history and that the setting frees only chats
from workspaces that no longer exist, so the number isn't read as what turning it on saves.
Co-authored-by: Max Hsu <maxmilian@gmail.com>
* test(settings): open the Codex history tooltip in its fixture with keyboard focus
* fix(settings): keep the Codex history badge on one line
---------
Co-authored-by: Max Hsu <maxmilian@gmail.com>
Main sits under 1 KB below the fence after the bot and group screens took
216 KiB, so phone parity fixes that reuse desktop code fail build:mobile-web.
Round the fence up to 10.5 MiB (about 40 KB more room).
The file explorer row menu used the noun "Doublon" for the Duplicate
action. Use the verb "Dupliquer" and pin it in the locale key overrides
so the next catalog refresh does not revert it.
Fixes#44128
* fix(terminal): stop xterm scroll sync from looping on an unmeasured cell height (WIP: shipped patch pending regeneration)
* fix(terminal): run refresh callbacks queued mid-frame on the next frame
* fix(terminal): regenerate shipped xterm patch for the scroll-sync loop fix
* fix(terminal): keep scrolling working and refresh callbacks intact while cells are unmeasured
* fix(terminal): regenerate shipped xterm patch for the unmeasured-cell scroll repair
* Name terminal agent hosts separately from Orca
* Account for one startup process naming write
* Use the Node runtime for the Linux naming contract
* Run supported local agents under the independent host
* Preserve retirement type narrowing and valid test plans
* Align restart warnings and satisfy changed-file lint rules
* Declare the current daemon protocol in build compatibility metadata
* Keep hosted agent output complete through process exit
* Keep the output regression focused on catalog failure and cleanup
* Keep output regression fixtures compatible with quality checks
* Publish Claude exits after hosted process absence is proven
* Pass session fences in the hosted Claude regression
* Fall back to direct chat launch when the host image is unavailable
* Keep the hosted Claude recovery fixture independent of OS signing
* Settle refused agent launches and preserve exit observation wakes
* Keep provider population fixture defaults independent of array indexes
* Document direct launch when agent host connection checks fail
* Retain native provider no-start outcomes before refusal
* Keep chats working when the agent host cannot read their folder
* Preserve native missing-folder coverage after the access preflight
* Keep desktop permission notices at the desktop launch boundary
* Bound hosted launch setup and keep hosted chats out of host process growth
A host still starting no longer holds a chat past its bootstrap deadline, the host's
code signature is read once per host process, and the native owners the host starts
for the app do not count as its terminal work. The hosted launch test runs under Node,
whose destroy closes only the host's own socket copy.
* Keep hosted owner pipes blocking, recheck the host before dispatch, and keep launch-folder errors
The native owner clears O_NONBLOCK that a host's sockets carry, so its gate read and the
CLI's stdio behave as on a direct launch. A reconnect to another host before dispatch
launches here instead of on an unprobed host, and a host spawn error keeps its code and
path so a deleted folder is still reported as missing.
* Skip hosted owner subtrees in the growth walk and expire the host image read
The growth sample now stops at hosted owners instead of walking their subtrees again,
so it never does more work than before. A host's code-signature read is reused only
for 10 s, so a bundle removed while the host runs is noticed on a later launch.
* Satisfy changed-code quality for the hosted launch wait and its test
* List provider requests in the daemon router's exhaustive switch
* Launch a chat here when the host's start fails before attach
The native owner runs its CLI only after this app opens its gate, which
attaching does. A host spawn error, a lost reply or pipes that never arrive
therefore leave no CLI running and no input sent, so the chat now launches
here instead of failing. Once attached, a failure still ends the launch.
Tests cover a host that can't read or can't start in the chat's folder, a
host that never answers the folder probe, a lost spawn reply, and the
folder-access notice verdicts.
* Keep fallback time inside the owner's startup deadline
A hosted start could spend 10 s on the spawn reply and 10 s on its pipes,
past the owner's 15 s bootstrap deadline, so a late failure ended the
chat instead of launching it here. The hosted attempt now has one 8 s
budget from the start of the launch.
A folder denial whose app-side recheck finished after a newer readable
verdict restored a cleared notice; the newest verdict for the same helper
and folder class now wins.
* Fit the hosted start inside the owner's bootstrap and proof budget
The hosted attempt's budget is now the bootstrap deadline minus the
ownership proof window, so a hosted owner or a direct fallback still has
time to prove ownership. A timer bounds the spawn request too, so a
stalled event loop can't let the bootstrap deadline fire first.
Only a newer readable verdict from the same helper supersedes a pending
folder denial, so a later denial in another folder no longer hides a real
notice, and the record holds one entry per folder class.
* Track folder re-allows per helper so a replaced helper can't erase a notice
Keying the re-allow marker by folder class alone forgot an old helper's
re-allow once a new helper read that class, so the old helper's late
denial overwrote the new helper's notice. Marks are per helper and class
again, capped to the most recent pairs.
* Supersede pending folder denials directly instead of keeping re-allow marks
Capped marks could evict a re-allow while its denial was still being
read, reviving the stale denial. A readable verdict now flags the same
helper's pending denials for that folder class, and only denials still
being read are kept.
* Keep folder verdicts off blocking reads and bound the whole hosted start
Native-chat folder verdicts now reach the shared verdict telemetry, so its
spawner-path check and pid-file read are now asynchronous instead of
blocking the main process. The extracted backlog code only builds the
sampler, so the server keeps calling the existing probe directly. Lowered
the blocking-helper baseline rows that shrank.
Connecting to the host and checking its signature and the folder now share
the hosted start budget, so a slow host still leaves a direct launch time
to prove ownership.
* Lower the sync-fs baseline row the async telemetry checks emptied
* Drop folder verdicts from host checks that outlived the start budget
A host check still running when the direct fallback took over could report
a late denial and bring back a notice a newer readable verdict had
cleared. Checks past the budget now count as abandoned and report nothing.
The integration test now ends the CLI's input only after it starts, since
its owner allows only a short grace once input closes.
SSH hosts and orca serve servers now run the same usage service as the desktop backend and answer a usage.call runtime RPC (capability usage.analytics.v1). The orca serve web client reads its server's usage through it, and orcad automations record run usage.
Co-authored-by: dommer1 <17235665+dommer1@users.noreply.github.com>
Main sits about 2 KB under the 10 MiB fence, so phone parity fixes that reuse
desktop code fail build:mobile-web. Routes are split and the entry is capped at
3 MiB, so no single asset nears the 10 MiB per-asset contract.
* refactor(usage): share usage status copy with the phone and show it muted there
Move usage-error-copy, owner-not-set-up-copy and the rate-limit error catalog into
src/shared with an injected translator. The phone's Accounts rows now show desktop's
status label and message in muted text instead of the host's raw error in red.
* test(localization): give catalog fixtures the shared usage copy source root
* fix(native-chat): run chat readers in their own utility process; record main's allocation sites before the V8 cage fills
Electron main and its worker threads share one ~3.25 GB V8 pointer cage, so a chat reader's heap
could push main into a fatal OOM. The journal SQL reader threads now run inside one Electron
utility process ("Orca chat reader"), falling back to in-process threads if it cannot start.
Hosted readers post v8-serialized bytes that the host forwards without decoding.
V8's near-heap-limit hooks never fire when the cage fills first, and a heap snapshot needs the
heap's size again, so main runs V8's sampling heap profiler from 1 GB committed heap and records
its top allocation sites as a durable breadcrumb and crash annotations from 2.5 GB.
* fix(utility-worker-host): a failed in-process fallback fails only its worker; sample main's heap after the worker reads
* fix(utility-worker-host): retry the host after a slow or failed start with a backoff; only a reader that can't load there stays in-process for the session
* ci(ratchets): guard callers of sync helpers on main and skip worker-only modules
The main-thread ratchets counted blocking call syntax per file, so a new
caller of an existing sync helper in another file (env store reads, Codex
transcript cursor, durable secure writes) passed CI. A new ratchet counts
references to functions that make a synchronous fs, child_process or
SQLite call. Modules imported only by worker/utility entries are no longer
charged as main-thread work, and SQLite pragma()/transaction() now count.
* ci(ratchets): follow sync helpers two levels so timer and handler callers count
* ci(ratchets): guard event-loop entries, follow default exports and barrels, carry rows across renames
* test(ratchets): keep the shared import when checking a guarded entry
* ci(ratchets): shadow helpers only by parameters in scope, fail on unreadable entry lists, keep transaction results out of SQLite receivers
* ci(ratchets): match helper names file-wide (council ruling), harden entry discovery, count transaction modes
* Merge origin/main; baseline main's new WSL helper callers
* fix(ratchets): preserve helper exports and fail closed on missing roots
* Keep main's note on the worker large-send log baseline row
Machine translation read "Open source file" as "open-source file" in French,
Japanese and Korean. Translate it as the verb "open" + "source file" and pin
the key in the cross-locale overrides so a catalog refresh keeps it.
Fixes#43615
Co-authored-by: Neil <neil@stably.ai>
* refactor: organize renderer store and agent status modules
* test: remove global timer counting from coordinator cleanup
* test: retire queued quit timing case and preserve main graph coverage
* Drop the Jira e2e route whose only spec was deleted
Main removed tests/e2e/jira-panel-layout.spec.ts but kept its route, so every PR touching Jira sources failed the changed e2e specs job looking for the missing file.
* Drop the other e2e routes whose specs were deleted and refuse routes to untracked specs
Test cleanups deleted the onboarding, diff-note-layout, issue-12656-terminal-link-tooltip, plugin-components-gallery and ssh-orcad-paired-phone-projects specs but kept their routes, so later PRs touching those sources fail the changed e2e job. Route selection now exits with the offending routes when any route names a spec git does not track, so the PR that deletes a spec fails instead of every later PR.
* Drop the GitHub project board e2e route whose spec was deleted
#43070 deleted tests/e2e/github-project-board.spec.ts; the new route guard caught the route left behind.
* refactor(renderer): group browser and terminal modules by owner
* refactor: consolidate floating workspace type imports
* test: mark worktree card introduction seen in completed profiles
* refactor(renderer): place upstream terminal sleep owners with tab lifecycle
* ci(windows): require a trusted signature on every shipped Windows binary
The release gate checked only the binaries it had sent for signing plus a
fixed list. A Windows binary that skipped signing or arrived after staging
could ship unsigned, and Smart App Control machines refuse to load it; that
is how unsigned dev-channel builds lost their terminals on a test machine.
Release cuts now also check every .exe/.dll/.node in the shipped installer
payload (minus the non-Windows server-template binaries) for a valid
SignPath or Microsoft signature and fail with the offender list. Dev-channel
builds run the same check in advisory mode and never fail.
* ci(windows): match signers by CN and harden the payload signature gate
- Match our signer on its exact CN and Microsoft vendors on CN+O instead of
the full subject, so a certificate renewal that moves address fields
cannot block a cut; quoted, escaped and repeated attributes cannot spoof it.
- Say how to allow a vendor when the gate fails: release staging skips any
validly signed file, so a new vendor must be added to VENDOR_IDENTITIES.
- Reset LASTEXITCODE after the check so the fail-open path really warns,
and put the script's stderr into the evidence verdict when it cannot run.
- Force UTF-8 PowerShell output and time the signature read out after
10 minutes (reported as could-not-run).
- The pass message counts only the checked binaries and no longer claims
they are all SignPath-signed.