You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Restored browser tabs load after a restart when an extension is installed - #47262
If you had any browser extension installed in Orca's browser (an ad blocker, a password manager), the browser tab you had open came back blank after restarting Orca and stayed blank until you reloaded it. Now the tab stays blank for a moment (at most 5 seconds) while your extensions start, then opens its page as before.
Files
Added
Deleted
Net
Test
1
$\color{#1a7f37}{\Huge{\mathbf{+}}}$77
0
$\color{#1a7f37}{\Huge{\mathbf{+}}}$77
Prod
22
$\color{#1a7f37}{\Huge{\mathbf{+}}}$433
$\color{#cf222e}{\Huge{\mathbf{−}}}$76
$\color{#1a7f37}{\Huge{\mathbf{+}}}$357
What Changed
A page is now created only once its profile's extensions have started, the way a browser loads a profile's extensions before it restores any tab. Until then the tab stays blank, with no page behind it and no loading indicator, so there is no request that an extension loading could drop.
Desktop tabs (restored at launch, new tabs, tabs woken after Memory Saver freed them, SSH tabs): browser:preparePageAttach (browser-guest-discard-ipc.ts) starts the page's profile extensions and answers only once they are ready (whenBrowserPartitionReadyForPage, new browser-extension-page-readiness.ts). The renderer sets the webview's attach marker only then, so Electron creates the guest after that. While it waits (at most 5 s) the tab stays blank and Reload does nothing, since there is no page yet; and an address entered meanwhile is the one the page opens with (a page woken by Memory Saver gets its saved back list first, then that address). A tab remounted during the wait (switching workspaces) attaches when the wait ends.
This-device pages keep main's wait at their first navigation, now with the readiness below but still bounded at main's 3 s there, because that wait holds one of the host's shared command slots. Their blank first page is still held as on main (at most 3 s), so a Memory Saver wake or profile switch into a cold profile waits for its extensions too.
The wait (whileExtensionsStart, browser-extension-page-start.ts) lasts until each of the profile's startup extensions is in the session (whenBrowserExtensionsInSession, new browser-extension-session-presence.ts, fed the ids at attach by the session services hook), because loading one is what resets the loader factories. Each startup load that ends without its extension (failed, skipped as uninstalled, cancelled) stops counting, also for later waits. The existing 3 s bound now only cuts off slower restore work; the whole wait is at most 5 s, shared per profile startup, so it fits inside the deadlines around a page's creation (8 s for agents waiting on a new tab, 15 s for recovery). If the extensions are still loading at 5 s the page opens anyway; if its first request then stalls, the tab shows the existing "Waiting for …" notice and loads on a manual reload. A browser blocks its whole window on extension startup instead; Orca's per-tab deadlines (tab registration, recovery, agent commands) can't wait without a bound, and an unbounded wait would turn a hung extension load into a tab that stays blank. In QA the bound was never reached. An address entered while the tab waits opens as soon as that one wait ends, without a second wait.
Unchanged from main: pages created with a src while extensions start (extension pages, server/offscreen pages) keep main's existing hold of their first load, now with this wait.
Mechanism of the bug: restored tabs attach through the page-attach marker, which removes the webview's src before the existing first-load wait runs, so the wait never applied to them. The restored tab's load therefore started while the profile's extensions (started by that same attach) were loading. Orca's request listener holds requests until extension startup finishes, and while it held this one, the first extension with webRequest or declarativeNetRequest permission loaded. Loading such an extension resets the session's URL loader factories. Electron's request proxy then finds its target factory unbound when the held request is let through, and drops the request without an error. The main-frame request never reached the network, so the tab stayed on about:blank.
Why
Creating the page after the profile's extensions are registered removes the race at its source: by the time the page makes a request, the loader factories are no longer reset under it, and Electron owns navigation, Stop, Reload and history as usual. An earlier version of this PR held the first navigation of an already-created page instead; every way a page can navigate (Stop, Reload, Back, scripts, debugger commands, route navigations) then had to be caught one by one, so it was replaced. Only a page that opens at the wait's bound can still stall.
Linked Issue
Internal report (restored tab blank after restart with an extension installed); no public issue.
Visual Proof
The only visible change is that a tab stays blank, with no loading indicator, while it waits; packaged before/after screenshots are in the review status comment.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Packaged builds of main vs this branch, same rig for both (fresh profiles and a ~1,900-workspace seed; uBlock Origin Lite and 1Password installed from the Web Store, never signed in): results, including how long the wait lasts, are in the review status comment.
browser-extension-session-presence.test.ts: the wait needs every startup extension (one listener), stops waiting for one whose load ended without it (and later waits skip it), and ends when the startup load ends.
Performance
Only a page whose profile still has extensions starting waits (at most 5 s; one shared wait per profile startup); with no extensions, or once they have started, nothing changes. No polling or idle wakeups: per starting profile, two one-shot timers (3 s and 5 s), cleared when the wait ends, and one listener that lasts until every startup extension is in the session or the startup load ends. With extension support off nothing runs, and pages after a profile's first skip the lookup over saved profiles. Nothing scales with workspace count.
Risk
Level: Medium
What could break: a page in a profile whose extensions are starting appears up to 5 s later, and agent commands on it wait that long too; on a slow machine a tab opened at the 5 s bound can still stall and need a manual reload, as on main. If the wait misbehaved, a tab would stay blank longer before opening. Pages with no extensions are unaffected. Back out with a plain revert.
AI Disclosure
Review
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Platform-neutral. Desktop SSH tabs run their local profile's extensions in their own session and get the same wait before their page exists; This-device pages keep main's wait at their first navigation (3 s). Pages of server profiles, whose extensions run on the server, are unaffected. Folder workspaces take the same path. Known limit: a This-device page whose extensions take longer than 3 s opens without them; if its first load stalls, its creation reports a timeout, as on main. Follow-up: server/offscreen pages still hold their first load as on main (a profile switch needs their page to exist at once).
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
I stated the risk: what could break, for whom, and how to back it out
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
No actionable comments were generated in the recent review.
Walkthrough
Profile startup now uses bounded waits for profile loading and enabled extensions in the profile session. A new helper queues first-page loads, retains the newest requested URL, and starts it with saved navigation history when applicable. Offscreen browser, webview, and guest page load paths use extension readiness and held-load handling. Guest load timeouts can begin after readiness settles. Tests cover queued loads, page closure, and session extension readiness.
Merge Risk: Moderate · previous review 822c5
The change delays a page's first load until the profile's extensions start, which should fix restored tabs staying blank. Some paths can still report a page as attached before the requested URL loads, or fail attachment during a history restore. In rarer cases an older queued URL replaces a newer navigation, or Stop does not cancel a script-started navigation. These should be fixed or explicitly accepted before merge.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the user-visible fix: restored browser tabs load after a restart when an extension is installed. The changeset holds a page's first load until the profile's extensions have started, wh…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description follows the repository template: ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Performance, Risk, AI Disclosure, Review, Agent skill boundary, Notes, and Checklist are …
Full details: Title check
Explanation
The title names the user-visible fix: restored browser tabs load after a restart when an extension is installed. The changeset holds a page's first load until the profile's extensions have started, which addresses that case. The title omits the mechanism, but it matches the main change.
Full details: Description check
Explanation
The description follows the repository template: ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Performance, Risk, AI Disclosure, Review, Agent skill boundary, Notes, and Checklist are all present. The author explains the bug mechanism, the chosen fix, and the reason for the 5 s bound. Test results and a risk level are given. Gaps: the Linked Issue section names an internal report with no issue link, and the Visual Proof section points to a status comment instead of attached before/after media. The AI Disclosure section is empty. The Review section is empty. Also, the unchecked pnpm lint/typecheck/test/build item is left open, and the objectives note that these results are not reported.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
225-225: Minor · Stability & Availability · Poor tradeoff
Start the restore deadline when the held load starts, not before the extension wait.
waitForBrowserGuestLoad starts its 30-second timer (browser-guest-load.ts:32-41) before it calls start() (browser-guest-load.ts:45-46). That call runs the extension wait in loadPageWhenReady. If extension readiness takes more than 30 seconds, the timer rejects the attach with "did not finish loading". The finally then clears page.restoring and guestLoads. The held navigation still starts later when readiness arrives. The 3-second bound in browser-extension-page-start.ts applies only to the profile-loaded branch, so readiness can exceed 30 seconds.
Start the 30-second deadline only when loadPageWhenReady releases the held load. Keep the extension wait outside the deadline. Queueing and close handling already run during the wait and need no change. The fix requires a signal from loadPageWhenReady to waitForBrowserGuestLoad. The choice of that interface is left to the implementer.
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 907852de-2a28-4914-9ea2-0fc616becc5c
Commits
Reviewing files that changed from the base of the PR and between 2736974 and 7c13c05.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
No introduced P0/P1 performance finding. Verdict: clean for the inspected work counts, ownership, and dependency bounds. This is a performance review of head 10a8736c0605a9b9d9848607c18c067e0d871d95, not a readiness/merge approval or a claim that Electron startup latency was measured.
The extra dependency is intentional: do not start a page's first request while its profile's extensions can invalidate that request. The wait is shared by profile attach, does not restart for subsequent pages, and gives up after 5 seconds. The prior implementation gave up after 3 seconds and could leave the first request hung. The resulting up-to-2-second increase in the readiness ceiling is verified with simulated time, not a measured rendering stall. No wait was found that newly serializes every worktree, terminal, agent, transcript, or remote. No introduced recurring idle timer, poll, subprocess, or publication was found.
Scope and evidence
Requested range: origin/main...HEAD. Pinned origin/main: 0e47f3a5ea598d8a37e9d8a4268f1e54ab5a5ad7; its merge base with the target: 4ca2caef8e5242ad26f04ab678d82f757cc854e1. The three-dot diff therefore compares that merge base to the target, not the tip of main. Inspected all 26 changed files, including the two added tests and the supporting production callers. Included the profile-index and route-lookup performance changes in the span.
Read .agents/skills/perf-scan/SKILL.md and ../perf/SKILL.md relative to that skill. No fixes, repository edits, builds, app launches, or external posts.
Executed the target production implementations of presence, page-start readiness, late retry, profile index, and deferred attachment through an external Node harness. It strips TypeScript types and substitutes Electron event sources, loader promises, browser IPC, and a deterministic clock. Base/target readiness comparison uses the same inputs. This proves operation counts and promise/listener behavior at those seams; it does not reproduce Chromium, transport, disk latency, CPU, GPU, or heap behavior.
Reproduction: a local Node harness (Node v26.5.0); it passed. The two checked-in test files were read but were not run as a Vitest suite; no dependencies were installed.
Relevant callers examined: main-window guest security; page prepare/admit/associate/start/forget; extension loader and hooks; extension tab announcements; agent goto and per-page queue; route initialization and client-page initialization/cancellation; host dispatcher limits; tab registration and runtime browser command targets; renderer mount admission and parked webviews; web/mobile browser bridge; local SSH and routed-session identity.
Population and pricing model
Use the skill's reference fleet: 750 worktrees / about 12 repositories, hundreds of terminals, 100+ agents, a dozen CLI callers every few seconds, and large history/ref populations; grow each dimension to 10× independently. These counts do not imply 750 visible webviews or 750 extension profiles. For explicit adverse browser stress, use:
P: pages concurrently attaching or awaiting a possible retry, tested at 750 and 7,500.
S: distinct starting profile/session attaches. Shared-profile test uses S=1; independent-profile checks create 750 and 7,500 sessions sequentially to count per-owner cost and cleanup, rather than claiming a simultaneous Electron fleet run.
E: enabled installed extensions per profile, tested separately at 10 and 100 for presence checks. I: installed extensions in the shared install store; M: saved browser profiles; W: pages in the one workspace whose new guest is being attached; K: manifest permissions examined.
A: concurrent calls waiting on an already existing WebContents; Q: extension-load event rate for one session. The dozen CLI callers at one call per 3 seconds give about 4 calls/s across the fleet as an illustrative load. Once a profile is ready, these calls create zero readiness listeners/timers; during attach, they share its remaining deadline.
Unrelated worktree/status/PTY/history/ref activity triggers zero of the new work. An idle, fully initialized fleet adds 0 wakeups/s on Electron main, renderer, and daemon, at both N and 10N. Startup timers are one-shot work for an active attach, not steady-idle activity. No application CPU milliseconds or heap-byte estimate is inferred from these counts.
Added/changed work ledger
All runtime extension/session work below runs on desktop Electron main unless the row says renderer. Work is charged to the session that actually hosts the extensions, not multiplied by every remote replica or requesting mobile client.
First prepare IPC for an admitted desktop page; P prepares, S profiles
Flag check; attached-partition map lookup; if cold, one indexed local-profile lookup or constant route identity lookups, then existing idempotent attach
Extensions off returns before profile lookup; attached profiles avoid saved-profile traversal. Shared profile wait, at most 5 s from its first waiter. No network, subprocess, or full fleet scan added.
One initial page prepare; further URL replacements only when the requested URL changes
Existing marker/page reservation is created first; async response now awaits readiness
One outstanding prepare per deferred webview; waited: true skips another readiness wait. No renderer/main synchronous blocking during the await. Page teardown uses existing page/marker ownership.
First waiter in an attach/unload phase, once per S; subsequent P calls share
O(1) map/phase checks; two one-shot timers (3 s and 5 s), one presence computation of O(E), a constant number of promise continuations
At most one current map entry per profile. Wait ends by 5 s; timers cleared on settlement. Entry retained until attach loading settles to avoid restarting a timed-out wait. A hung existing load can keep one entry and its O(E) pending state; this does not grow with subsequent calls to the same phase. Phase identity prevents reuse across reattach.
Caller close/short bound — same file :31–55
Existing-page navigation, route initialize, or extension tab announcement; A live wait calls
One destroyed listener and one promise continuation per call; route command additionally has a 3 s timer
Listener removed on readiness, bound, or close. Close answers caller early; shared wait continues for surviving pages. Continuation can retain that caller until the shared deadline, at most 5 s, rather than until an indefinitely hung extension finishes.
E cached install-store gets, one filtered list, one Set of eligible IDs
No new persistent file/field. Store's cold read/migration was already required later in the same attach via store.list(); this moves its first access earlier, not onto every page/command. IDs without installs are excluded. Set replaced at next attach.
First profile presence check after unload; only when at least one startup ID is missing
E getExtension probes once; one missing-ID Set, one Electron listener plus one internal ended callback per waiting session
Per load event: constant Set deletion, not E listeners or a scan of all pages. All IDs present, failed/skipped/cancelled load completion, or aggregate load completion removes both callbacks. WeakMap keyed by Session. Detector subscribe covered.
Every enabled extension's tracked startup load settles, success or failure, E times per attach
One Set deletion and dispatch to active presence callbacks; normally 0 or 1
Finally path also covers skipped/cancelled loads. At N=750/E=10 this means 7,500 completion notifications over those attaches; at S=7,500/E=100, 750,000. Necessary per-extension completion accounting, not repeated inventory work.
Late-retry eligibility and dispatch — browser-first-load-retry.ts:46, browser-page-attach.ts:245, main-window-webview-security.ts:251
Only local desktop restores/history reopens created after give-up, with no newer requested address; R ≤ P eligible pages
O(1) lookup per page; one shared readiness reaction and extension listener; four page listeners. Per extension load, inspect loaded permissions; only proxy-capable loads call getAllExtensions() and inspect existing permissions, O(E × K) worst case
A session's first request-proxying extension marks each pending page once: O(R) required to record affected first requests. Other proxy loads do not fan out over pages. At readiness: at most one reload per disrupted, still-pending restored page; no new-address replay. Commit, Stop, newer main-frame navigation, and close delete the page; last deletion removes shared listener. No polling/retry loop.
Generic guest hold — browser-extension-page-start.ts:151
Existing raw-src guest/extension guest creation during startup; marker-owned pages have their src removed before this hook
Uses same profile wait; existing one-shot claim and attach handling. Blank bootstrap additionally races a 3 s timer
src absent exits before creating wait work. Marker path therefore does not pay a second full hold after the prepare response. A raw blank bootstrap preserves the 3 s cap. Claim removed after creation or a microtask; guest navigation hold removed on release.
This-device host command initializing its claimed page
Existing wait now uses explicit 3 s caller cap and close cleanup
Does not extend the prior command cap to 5 s. Authority and abort are checked before starting navigation after the wait. Same shared attach deadline avoids an independent 5 s wait per page.
Same readiness dependency, now potentially up to 5 s from shared attach start; new constant destroyed check
Closed guest releases wait immediately. Already-ready profile: null wait, no extra listener/timer. Holds only that page's existing command turn; no new process is started by readiness.
Linking a routed profile at cold prepare/security setup
WeakMap/Map lookups by actual route; O(1) source-profile get
Removes the previous saved-profile listProfiles().find(...) and repeated session.fromPartition scan for routed sessions. Normal local-session lookup behavior remains available to existing callers.
Partition index — browser-session-profile-map.ts:4, browser-session-registry.ts:222
First partition lookup after saved-profile mutation
One traversal of M profiles builds M-key index; every further lookup O(1)
set/delete/clear invalidate; hydration batches changes before first lookup. Source update/cookie clear may invalidate although partition is unchanged, but those are explicit profile operations, not status/CLI/page events. M=750/7,500 lookups visit 750/7,500 profiles total, rather than M per lookup. Memory O(M), released/replaced on invalidation.
First navigation of an admitted newly created webview; not every bind or store write
One .find over W pages in that workspace to read creation time, one time-origin comparison
At one page per fleet workspace: 750/7,500 comparisons over first creation of all those pages, with no cross-workspace scan. A single wide workspace costs up to W comparisons per newly created guest; retained/rebound guests skip this branch. Necessary restore metadata lookup, not a new store subscription or per-status projection. Restored hidden pages retain existing lazy mount admission.
Initial admitted webview and URL changes entered while its IPC waits
One in-flight IPC; constant dataset state; latest URL slot overwrites earlier submissions; further prepare only for a changed URL
Stops re-preparing when disconnected. Connected completion writes src once; disconnected completion parks marker for remount. URL replacements are serial and each consumes the latest distinct request, with waited set. No timed wakeups, polling, or per-keystroke IPC added. Closure survives at most its outstanding bounded prepare absent IPC/renderer failure.
Existing subscriptions unchanged; avoids validation/recovery of a guest that intentionally does not yet exist. Parked settlement makes at most one isLoading() call.
User navigation/Stop/Reload, extension/browser action using the helper
O(1) dataset gate; address submission retains only latest unredacted URL during wait; optional promise catch
No guest command issued before a guest exists; no additional loading publication. Shared guard reduces premature guest work; no timer, new Effect, store subscription, or persistence.
API shape — src/shared/browser/guest-lifecycle/browser-guest-discard-protection.ts:39
Existing prepare IPC
Two optional booleans
Constant payload addition; no history/blob serialization.
Added tests — presence and first-load-retry .test.ts files
Developer test invocation only
EventEmitter/deferred-promise examples
No shipped listeners or runtime imports from tests. Inspected assertions support load-failure/end and commit/Stop/new-navigation/close controls; execution evidence below comes from the separate harness.
Listener census and idle/load rates
Census covers new and cadence/lifetime-affected listeners, with existing listeners on the touched owners as controls. It is not a claim to have inventoried every Electron listener elsewhere in the application. Event-driven handlers do not themselves generate events.
New: 1 per starting session with missing IDs; 0 after presence or aggregate completion. Not per tab or extension.
0/s, including a hung startup with no events
Q callbacks/s per session, one Set deletion each; summed over sessions, ΣQ. Initial E probes once. N=750 and 10N=7,500 pages sharing one session both measured exactly 1 listener and 2 probes for E=2. Independent-session checks measured one listener per create and zero after every completion.
New: same 1 per pending session; Set removes it at done
0/s
One dispatch per startup extension settlement while presence remains pending; E settlements per attach, no page multiplier. Failure-only completion check removed the Electron listener without needing a loaded event.
New: 1 per readiness promise with ≥1 pending eligible page, else 0
0/s
Q permission predicates/s; inventory fetch only for proxy-capable loaded extension, O(E) returned entries; O(R) marking only for the first proxy extension in that session. Listener removed when last page commits/stops/navigates/closes or readiness drains the set.
Late-retry per-page listeners (:121–124)
New: 4 per eligible pending page: did-start-navigation, did-navigate, did-stop-loading, destroyed
0/s; no frames/timers caused by subscriptions
Main-frame navigation handles its own page; later navigation cancels. Commit/Stop/close each remove all four. At R=750/7,500: 3,000/30,000 transient listeners, required per-page cancellation tracking. Measured all added listeners zero after settlement; closed pages produced zero retries.
New: 1 per live waiting call A, not per extension; removed by readiness, short bound, or close
0/s
At most one close callback per call; normal completion removes without event. Route adds one 3 s one-shot timer. Measured immediate caller settlement on close and zero remaining destroyed listeners. Settled shared waits may briefly add/remove this listener in a promise microtask; no continuing work.
Generic hold claim: app web-contents-created; embedder did-attach-webview; guest destroyed and did-start-navigation (page-start.ts:142,173,191,200)
Existing: one app claim per held attach until synchronous creation/microtask; one attach handler per embedder lifetime; one guest destroy waiter until attach/close; one navigation observer until release/navigation
0/s
App event calls a live claim once; embedder event performs one WeakMap lookup per attachment; guest paths settle once. Same owners as base, with changed bounded wait, not P×E registrations. Marker-owned guest src bypasses this hold.
Existing: one each per main-window WebContents; Δ0 listeners
0/s
One readiness/late-eligibility consultation per relevant attach. Normal policy work unchanged.
Existing history restore observers, page association and guest load (browser-page-attach.ts, browser-guest-load.ts)
Existing: six history observers per restoring snapshot; one association destroy callback per guest; three guest-load observers during started load (finish/fail/destroy), optional stop in other mode; Δ0 registrations
0/s
Navigation/load events affect their own page; snapshot observers leave on successful finish/replacement/close, guest-load observers on finish/failure/close/30 s timeout. New retry adds the four separately counted observers.
Existing: 13 DOM event registrations per bind (did-fail-load has two), one metadata subscription, one system-resume subscription, two container handlers; Δ0. Webview creation's three lifetime handlers also unchanged.
No added events/s; existing content console/metadata traffic is workload-dependent
Unbind removes bound registrations/subscriptions; creation handlers belong to retained webview. New first-attach branch creates no extra subscription and publishes no extra metadata/loading frame. Existing metadata callback's workspace .find remains W visits worst case per notice; not increased by this diff.
Session service extension-loaded/extension-unloaded; route WebRTC app observer
Existing: one of each per served session via WeakSet; singleton route observer via installed flag; Δ0
0/s absent real extension/WebContents events
New readiness starts the same attach that guest creation previously started; no additional served-session copies or observer for every page.
Steady-idle delta by process: main 0 → 0/s, renderer 0 → 0/s, daemon 0 → 0/s for this diff's work, whether pages are visible, hidden, or unobserved. During active startup, at most two shared profile timer firings (3/5 s) plus explicitly counted short-call/bootstrap timers can occur; early completion clears remaining timers. Subscriptions never schedule a poll/frame/IPC.
Dependency waits and first usable progress
Desktop page creation and restore. Prepare reserves the page and starts the profile if needed; renderer waits before assigning a src. Source bound is max(min(inSession, loaded, 5 s), min(loaded, 3 s)), measured from the first waiter in the attach phase. If extensions/restore finish sooner, release sooner. If every extension is already present but hooks hang, release at 3 s; if extension presence hangs, release at 5 s. Later pages share the same absolute phase deadline, including its already-settled promise. The raw-src guest hook does not double-wait marker-owned pages because params.src is already absent. The wait is before browser content, not before Orca's window/shell. Actual time to paint after release is unmeasured.
Late restore repair. After give-up, presence readiness is deliberately longer-lived than the page-creation cap so a live, disrupted restore can recover when the actual extensions arrive. It adds no second blocking await before creation. A pending page can retain its retry listeners until presence finishes or its own commit/Stop/new navigation/close. Failure/skipped-load and aggregate-load completion also settle presence. Hung loading retains one current profile entry and the live pending pages, not a growing entry per command/retry; no timer is restarted. A new URL is never replayed by this repair.
Agent/CLI existing-page goto. The action waits on the profile before loadURL, outside its navigation timer, holding that page's serialized command turn and guest lease. New maximum remaining dependency is 5 s, versus base's 3 s first wait, necessary while extensions are not safely in the session. Closed page answers immediately. An initialized profile adds no dependency. A dozen callers repeatedly hitting one hung attach do not each start a new extension scan, another extension-load attempt, or another 5 s phase deadline. Subsequent commands behind it advance when the shared wait ends.
This-device host slots. Host dispatcher defaults to eight concurrent handlers, 256 active commands and 32 queued per page. Initialize explicitly caps its own wait at 3 s, so eight cold initializations can occupy eight slots for up to that bound; it was already a 3 s dependency before this change. Abort/authority invalidation is rechecked before any load after readiness; while waiting, abort without destruction still awaits the remaining ≤3 s. This delayed abort response predates the span; the diff does not raise it to 5 s. Shared bootstrap/initialize waits in the same attach phase are not two independent 5 s waits. Blank bootstrap also retains a 3 s cap inside the existing 5 s renderer attach timeout. Route/profile changes and subsequent phases remain distinct owners.
Registration/recovery callers. Runtime browser commands can first wake/activate a cold page and await its guest registration (existing default 8 s), then await first load as appropriate; page readiness is inside that cold-page operation. A 5 s dependency leaves 3 s of the registration budget for the remaining work, not a guarantee of success on a slow machine. Existing renderer recovery IPC uses 15 s; guest load itself has its existing 30 s timer. No extension wait is inserted into the whole CLI startup/help path or every routine ready-page command. A newer URL submitted during the initial wait uses a prepare with waited: true; verified one src assignment and no second wait. Disconnection suppresses the re-prepare.
Mobile and remote hosts. Mobile/web does not create Electron guests (createBrowserApi().preparePageAttach rejects desktop-only); there is no mobile-local extension listener/timer introduced. A phone accessing a cold desktop-hosted page inherits that page's desktop wake/registration wait through RuntimeBrowserCommandTargets.ensureBrowserPageActive; the extension dependency is shared at its actual desktop session, not one per phone. Server-profile extensions remain on their owning host; local default/SSH/This-device identities resolve by their existing routing maps. No new SSH RPC, per-item transport call, process spawn, or OS probe is introduced by these checks. Live phone/SSH/Windows transport latency was not measured.
Deterministic results and correctness controls
Executed workload
Result
750 and 7,500 simultaneous page-readiness requests to one profile, E=2
All return the identical shared wait; exactly 2 initial extension probes, 1 presence listener, 2 shared timers. One loaded ID plus one failed/ended ID removes listener; readiness releases at 3 s for still-pending restore hooks; remaining timer cleared.
Same hung dependency on base vs target
Base resolved at simulated 3,000 ms; target remained pending then resolved by 5,000 ms. No timer remained at the bound; eventual aggregate completion removed presence listener.
Existing-page close while waiting; separate route short-bound case
Caller resolves on close and removes its destroy listener; route caller resolves at simulated 3,000 ms with listener removed. Completing startup clears remaining profile timers.
750 and 7,500 pending late restores, one shared session
Exactly 1 extension-load listener. Toolbar-only extension does not inventory session; first proxy extension performs 1 inventory call. Close half before readiness: exactly 375/3,750 retries for survivors, none for closed pages, zero added listeners after drain. Separate last-page-close case removes extension listener before readiness.
Independent profile presence with S=750/7,500 crossed separately with E=10/100
Exactly S×E initial probes: 7,500 / 75,000 / 75,000 / 750,000. One listener per session create, zero after every failed/ended completion. Sequential owner count check; not simultaneous native resource measurement.
M=750 and 7,500 profiles, M lookups, then a partition-changing mutation
Initial lookups visit M profiles total. Mutation invalidates; two subsequent lookups visit exactly M more and return the changed mapping correctly.
Address replaced during deferred prepare; connected vs disconnected completion
Connected: two prepares, second skips readiness, one final src write. Disconnected: one prepare, zero src writes, parks initial marker; pending flag cleared.
Meaningful update/recovery controls were exercised, rather than checking only that work disappears: present IDs still settle, failed IDs release, late disrupted live restores do reload, changed partition lookup returns the new owner, and a newer address is the one attached. Checked-in retry tests additionally assert commit/Stop/new navigation cancellation; those assertions were inspected, not claimed as an executed Electron test.
Six scan questions
Question
Disposition / evidence
1. Unused work before skip gates?
Reviewed. Extensions-off and attached-profile fast paths precede cold registry lookup; src-less marker guests skip hold setup; reload/validation/navigation stop before guest calls while attaching. Added install filtering is per attach, not per page; no new unchanged publication or snapshot serialization.
2. Ownership multiplies work?
Reviewed with N/10N checks. Readiness, presence and retry extension listener shared by profile/promise; four cancellation listeners per actually pending page; existing renderer event/subscription counts unchanged. Mount admission preserves lazy hidden restores.
3. Thread/storage costs?
Reviewed. New O(E) sets/filter/lookups, promise dispatch and index rebuilding pay on Electron main; renderer performs one local W lookup per new admitted guest and O(1) attach/intent gates. No new SQLite or subprocess work. Existing cold install-store sync read/possible legacy migration remains once per store load in the same attach; no additional file read per ID. No measured main-loop/CPU/heap claim.
4. Growth/progress?
Reviewed. O(S×E) startup membership, O(M) index storage/rebuild per invalidation, O(P) live retry records; no scans across worktrees/refs/history. URL replacement loop advances to a different latest request and has one in flight; phase deadline does not extend. New retry admits only affected restores and loads at most once per record.
5. Execution host?
Reviewed in source. Route identity avoids profile enumeration/materialization; no new platform subprocess/filesystem/network primitive. Local/SSH/This-device/mobile ownership traced. Native Electron and transport latency on macOS/Windows/Linux/SSH/phone was not executed; source count/cleanup conclusions do not claim those measurements.
6. Obsolete work stop/release?
Reviewed with close/last-page/drain checks. Pending retry leaves on page cancellation events and unsubscribes last shared listener; presence unsubscribes when IDs/end settle; caller destroy listener leaves on close/bound. Shared profile work survives a single caller as required. Hung underlying extension load is not cancelled by readiness timeout; its existing loader/unloader remains its owner. No growing per-call wait registry.
Regression-class dispositions
Only classes touched by the span are listed.
Class
Disposition
New steady-idle wakeups / fixed-cadence loop
Matched candidate: new one-shot timers. Disproved as recurring idle work: two timers per attach, cleared/settled at ≤5 s; no reschedule. 0/s steady-idle delta across processes.
Resource-owning instance duplication / per-instance mounted work
Matched and disproved by sharing counts, src gate and existing lazy mount admission. Necessary per-page cancellation records remain O(P); no per-page extension enumeration.
Matched and checked: listener and pending-set cleanup on close/settle; index follows profile map lifetime; WeakMaps follow session/promise ownership. Current loading-phase state may persist as long as the underlying live loader, with no repeated per-command insertion.
Unbounded fanout / queues under load
Matched candidate: late readiness drain can issue R reloads concurrently. Necessary one repair for each independently disrupted live page; closed/committed/stopped/superseded pages are removed before drain, fresh addresses excluded, at most one reload per record. Measured R/2 after closing half at N and 10N. No new retry loop or unbounded pending command queue introduced. Native reload burst latency not measured.
Hot-path collection scans / derived indexes
Matched: saved-profile partition index and route source identity remove repeated whole-profile scans. Restore classification adds one W-local lookup per new admitted guest, no new broad subscription. No new every-status/write scan over the fleet.
Sync filesystem/storage on main / unused work before gates
Matched candidate via existing install store. E new gets hit the shared loaded cache; at cold attach the first get can move the already-required store load before existing store.list, with no extra load/persist. Feature-off and already-attached paths stay gated.
Expensive existing work newly reachable past a gate
Reviewed: prepare now initiates the same extensions for an admitted page earlier than native guest creation. Extension support and valid local/allowed route identity still gate it; no automatic attach for all saved/hidden profiles and no extra attach per page once state exists. Existing loader work does not become a repeated CLI read/status cost.
Eager startup imports
Reviewed: new modules are small collections/promise logic; retry module has no value imports, keeping the shared page-attach path independent of the extension runtime. No SDK, subprocess, startup discovery, or app-wide readiness await added.
Pre-existing costs and residual evidence limits
browser-session-registry.ts:214 still identifies a local session by allocating the M-profile list and trying session.fromPartition until a match: up to M entries and M calls per invocation, 750/7,500 at those populations. The changed routed link no longer calls it. Other local-session callers retain that pre-existing cost; this span does not add such a caller.
The existing renderer metadata callback in bind-browser-page-webview-listeners.ts uses one workspace-local W-page search per notice. At notice rate r for that page this is at most r×W comparisons/s, with the same subscription and publication rate before/after. The new restore classification is one extra search at first guest creation, not an increase to that ongoing cadence.
Route initialize abort without destroying the guest can continue to hold its old shared command slot until the existing 3 s readiness cap, as described above. The changed explicit cap prevents amplification to 5 s; instant abort release was not added.
No packaged Electron run, CDP first-paint trace, process-tree CPU sample, native-memory measurement, actual large install-store migration, or cross-platform/mobile transport benchmark was performed. Native extension-event ordering and Chromium request cancellation behavior were source/test assumptions, not reproduced by EventEmitter. These are validation limits, not measured clean native timings. The deterministic evidence establishes sharing, count bounds and cleanup; there is no unresolved source-proven excessive-work finding to waive.
Repository status was clean before and after inspection. No GitHub content was posted.
No blocking performance regression found in the reviewed diff. Verdict: clean for the source paths and deterministic workloads below. This is a separate performance review, not approval of correctness or a claim about measured native startup speed.
The new presence subscription is shared by a profile loading phase, not multiplied by its pages or extensions. It performs one membership deletion per event and is removed on presence completion, startup completion/failure, or the 5-second deadline. The longer dependency hold is confined to missing native extension presence; already-present extensions with slow restore hooks keep the existing 3-second escape. The routed command path explicitly retains a 3-second cap.
Scope and evidence
Target: 18cab8a4f4079e138e8feb26ed3feb816f7a1b97; verified before and after review.
Requested range: origin/main...HEAD. Pinned origin/main: d4562c4474e638d27be4e48b6b219524b02d9a12; merge base / actual diff base: 4ca2caef8e5242ad26f04ab678d82f757cc854e1. The A/B harness uses that merge base, matching triple-dot semantics.
All 23 changed files graded. Production consumers also traced through window webview security, offscreen creation, extension tab announcement, page readiness/registration, route-session indices, route initializations, and the per-page/host command queues.
Detector surface subscribe covered: src/main/browser/extensions/profile-sessions/browser-extension-session-presence.ts, supplied detector line 54; actual .on('extension-loaded', loaded) is line 55 at the target.
Executed on this Mac with Node v26.5.0, without Electron, a visible window, a build, dependency installation, or repository edits. The pre-existing pnpm-lock.yaml working change was excluded and left untouched. No GitHub access/posts.
Executed a local dependency-free Node harness through tc-gate. Exit 0.
Harness executes target TypeScript bodies after Node type stripping and import/export adaptation, with EventEmitter sessions, controlled promises and virtual timers. It also executes the base wait implementation against the same schedules. Counts and virtual release times below are reproduced evidence; native Electron behavior, CPU, wall-clock first paint and heap bytes are not measured. The added Vitest file was inspected, not executed separately. No author-reported performance results are used.
Population and fleet price
Let B be admitted browser pages, P saved local profiles, S simultaneously starting extension-profile phases (routed sessions count separately), E enabled installed extensions per session, C concurrent existing-page readiness calls, U distinct latest URL changes observed between prepare replies, and H saved navigation entries. These are independent dimensions; the fleet specification does not prescribe browser-tab or extension counts.
Reference fleet screened: 750 worktrees / ~12 repos; hundreds of terminals; 100+ agents and status events >1/s; 12 agents making CLI calls every few seconds; tens of thousands of chats/refs and tens of GB of history; ~50 remotes. Growth target: each dimension ×10. None of the additions subscribes to worktree, terminal, agent-status, transcript, branch or remote changes: added operations per such event = 0, with fleet N and 10N alike. No new child processes, SSH round trips, SQL queries, journal writes or full-history serialization.
Browser stress populations are explicit assumptions, not observed fleet counts: B=750/7,500, S=12/120, E=20/200 and P=750/7,500. Shared-profile startup stays E checks + one observer + two timers at either B. Separate sessions necessarily pay S×E checks and at most S ordinary presence observers, plus O(B) continuation delivery for B required pages. A single loading profile with 7,500 pages does not create 7,500 extension observers or extension inventories.
At 12 CLI callers / 3 seconds, total offered CLI rate is ~4/s (40/s at 10×); only browser operations encountering a cold/loading profile enter this gate. Warm, unrelated CLI operations acquire zero new readiness timers/listeners. Twelve simultaneous cold-profile starts at E=20 produce 240 presence checks, 12 observers and at most 24 shared timer firings for the whole startup episode; 120 starts produce 2,400, 120 and 240. This is event-driven startup work, not that quantity per second forever.
Work added or changed: trigger → population → bound
All main entries below execute on the Electron main JS thread on the owning desktop/server. Renderer entries run in the pane's renderer. Asynchronous waits release JS execution but retain their promise/caller resources.
First prepare for each admitted new/restored local webview, B calls; URL re-prepares explicitly bypass the wait
Validate and mint the existing attach token, then one feature gate, attached-partition map lookup and shared readiness join. Cold miss consults partition index and route maps, attaches the profile once through the existing loader guard. One request/reply per prepare; warm/no-extension case returns without a deadline wait. No timer/poll per saved unmounted tab.
Necessary pre-creation admission; no repeated inventory.
Each actual session attach, S sessions, E enabled IDs
E cached install-store lookups, filter array, starting-ID Set. At most E IDs per session; replaced on next attach and deleted per completed startup load. The store may synchronously load/migrate its installed list on the first cold get; base already calls its list() unconditionally during the same attach, so this moves that first read earlier rather than adding a per-page read/write.
Necessary exact candidate set; no added disk-read cadence.
browser-extension-session-presence.ts:24
First readiness observer for a loading phase after an idle unload completes
Copy/filter up to E candidates with E getExtension calls; retain up to E missing IDs. One native event listener + one internal load-end callback, each O(1) per delivered extension event. Completion removes both. No installed/enabled entries => no observer.
Shared O(E) setup, O(E) total startup-event membership work, no E² or B×E.
browser-extension-session-loader.ts:136
Each existing startup load settles, success/skip/failure, S×E completions
One starting-Set deletion and fanout to the session's current presence callback set. No file access or new extension load. Normal observer multiplicity 1, not B or E.
Required failure/skip progress; no new retry.
browser-extension-page-start.ts:62
First wait in a loading phase; subsequent callers join it
Phase identity lookup and one shared promise; two one-shot timers (3s and 5s), cancelled on settlement. Cache is retained after timeout until that phase's loader settles, so later tabs cannot renew a stalled wait. The phase token handles idle-unload/reattach. Normally one observer per profile; an old unload-phase wait can briefly overlap a new attach-phase wait, giving two, not one per page. Serialized unload/attach ownership prevents arbitrary phase fanout.
Bounded startup dependency, not recurring idle work.
Each readiness call against an existing guest, C active calls
One destroyed listener per waiting call; optional one caller deadline timer for a routed command. Shared wait is not cancelled when another page closes. Destruction releases that caller immediately; explicit closed check prevents subsequent goto work. Listener/timer removed on wait, close or caller cap. Promise callback can remain until the shared wait ends, at most 5s.
Necessary caller liveness; no permanent guest listener.
browser-extension-page-start.ts:136,162
Fallback webview first attach while phase is loading
Existing transient global guest-claim listener and first-navigation/attach guards; changed about:blank bootstrap adds one one-shot 3s cap timer. Reuses the profile wait, so normal attach after prepare does not wait a second full deadline.
Preserves routed mount progress; no persistent timer.
browser-session-profile-map.ts:4; registry :222
First partition lookup after set/delete/clear, over P saved profiles
One O(P) lazy index rebuild; thereafter O(1) hits and misses. O(P) retained index; all registry mutations use overridden set/delete/clear. Replacing a non-partition property also invalidates, but only on explicit profile mutation, not status/typing/CLI cadence. Hydration performs many sets before one rebuild.
Removes repeated whole-profile arrays/scans on partition lookup.
browser-extension-route-sessions.ts:17; local profile :23; attached lookup in loader :265
Existing partition/session WeakMap/Map indices and direct profile get; skips the previous saved-profile/session scan when the route already identifies ownership. Route profile setup and its one global WebRTC guard already existed. No network discovery or per-profile remote command added.
O(1) route ownership lookup.
browser-page-deferred-attach.ts:23 and bind :230
Newly created, admitted renderer webview, B owners
Set waiting flag; hold one prepare promise and latest URL string. Coalesce URL changes while first reply is outstanding. At most 1+U sequential prepares, one in flight per webview; later prepares use waited:true. U requires a distinct changed requested URL, not automatic polling. Replace prior main token rather than append. One final src assignment; disconnected webviews never re-prepare.
Bounded by required pages/actual URL changes.
Deferred attach :51,72,84
Prepare settles while connected/parked; pane remount
One src assignment or one saved marker; resume consumes/deletes it without another prepare. Settle checks isLoading() once on a remount. Closed detached element receives no src/navigation. Closure releases after prepare/loop completes; parking intentionally retains its webview.
No abandoned native page creation in the disconnected callback.
browser-page-attach.ts:69,220
Re-prepare latest URL, then first guest load
O(1) previous-token lookup/delete and requested flag. Plain load: one loadURL. Ordinary history restore: one restore over H entries. Restore with a new requested address: one restore to keep back history plus one immediate loadURL, rather than serially awaiting the old page's network load. Existing restore listeners and load bookkeeping remain. No extra history capture/serialization introduced.
Necessary history output, no history-wide repeated loop. Native restore cost not timed.
Validate, Stop, Reload, navigate or submit during deferred creation
One dataset condition before native guest operations; navigation saves just the latest requested URL. Suppresses validation/recovery and metadata refresh for a nonexistent guest. Optional catch handles skipped navigation's undefined result. No effect, selector, interval or subscription added.
Admission before work; lower false-recovery work.
Shared guest-discard API :39
Type checking / IPC shape
Optional waited field; no runtime allocation on its own.
No independent runtime cost.
browser-extension-session-presence.test.ts
Explicit test invocation only
Three finite tests exercising complete, failed and stopped observation; no app-runtime import from this file. Inspected assertions; external harness exercised equivalent completion/stop controls and scaled populations.
Test-only cost.
Listener and subscription census
These counts describe the relevant owner seams, including existing listeners whose lifetime can now span a longer wait. They are not a claim that an Electron Session has no other subsystem listeners. Let L be extension-loaded events/s/session, F startup-load completions/s/session, D guest destructions/s, N navigation events/s, R system resumes/s, M metadata events/s/guest. Rates are event-parametric, since extensions and page content choose their own cadence; no fabricated fixed load rate is assumed.
Added delta 0 → 1 per observed loading phase; 0 with no missing IDs; normal fleet peak S. At most 2 for one session across overlapping unload/reattach phase waits. Existing session-service extension-loaded/extension-unloaded callbacks remain one each per served session.
New callback idle 0/s; load S×L callbacks/s normally, at most 2L for one overlapping session. Each callback one Set deletion/size check, no scan. Removed when missing set empty or stop (loader ends/5s). Harness: 750 and 7,500 same-phase callers both gave exactly 1 new listener and cleanup to 0.
Internal loadEndedListeners Set (presence.ts:49)
Added 1 callback paired with each presence observer; no callback after done
Idle 0/s, startup S×F/s normally (2× for overlap). Missing ID removed on failure too. Removed together with native listener; weak session key. An empty callback Set may remain with the live session, size 0.
Added C pending-call listeners in aggregate, one per call, including separate announcement/command consumers on the same guest
Idle 0/s, at most C callbacks when those calls' guests close, or one promise-completion cleanup per caller. No new callbacks per page frame/status. Removed early on close/cap/shared completion. Routed callers also own at most one 3s timer each.
loadPageWhenReady guest first did-start-navigation (:127)
Existing 1 per held first load, unchanged; can now remain until 5s readiness vs 3s
Idle 0/s; at most one navigation callback per held load, followed by removal. Completion removes it even without navigation. Superseded/destroyed guests are checked before load; did-start-navigation observer's longer lifetime is finite.
Existing 1 per embedder ever using this path (WeakSet guard), plus 1 per unresolved guest attach, unchanged
Idle 0/s; one O(1) WeakMap lookup per embedder attach, one guest completion on attach/destruction. Guest map entry and destroyed listener removed on either outcome. Embedder listener lives with embedder.
Idle 0/s; O(1) handler per respective guest event. Removed on committed finish, stale generation/event, or destroy. A new-address restore adds one restore+navigation pair but no second listener set.
bindBrowserPageWebviewListeners.ts:149–176,255+
Existing 13 webview DOM bindings + 2 container drag/drop bindings per mounted pane; 1 metadata subscription; 1 resume callback; all unchanged
Idle new dispatch 0/s. Native events only invoke their event's handlers (did-fail-load has 2). Rates follow that guest's navigation/failure/console/focus/drag events, not the whole fleet. Explicit unbind removes all 15 bindings and both subscriptions and disposes recovery timers.
Existing 1 onState per pane subscriber plus 2 DOM bind triggers and at most 1 guest-death observer per cached guest, unchanged
Idle new dispatch 0/s; per-guest M×that guest's subscribers/s. Bind triggers are did-attach/dom-ready, not a timer. Native metadata binding is deferred until a guest ID exists; new navigation gate prevents speculative metadata reads. Disposer removes bind triggers and subscriber; retirement removes death observer.
Existing one goto handler while navigating; routed initializer 5 guest event handlers + 1 AbortSignal handler, unchanged
Idle new dispatch 0/s; only corresponding guest/abort events. They are installed after readiness and removed on completion. Closing during the wait now avoids installing the goto handler.
Existing one global web-contents-created listener, guarded by webRtcGuardInstalled, unchanged
Idle 0/s; one constant check per created WebContents. The new earlier link cannot multiply this guard.
Steady-idle wakeups caused by this change: Electron main 0/s → 0/s; renderer 0/s → 0/s; daemon 0/s → 0/s, source-proven for these additions. The harness verifies no deadline timers remain after readiness/fallback. These are incremental counts, not an idle-CPU measurement of the whole app. During stalled startup the profile adds at most one extra one-shot deadline firing (base 1 vs target 2 per phase); it stops after 5s, with no refresh on later reads. Optional per-route/bootstrap cap timers also fire at most once per invocation and are cleared if no longer needed.
Dependency waits and first usable progress
The target wait joins two independent conditions: (a) native extension presence OR startup-load completion OR 5s; and (b) startup-load completion OR 3s. It does not serially spend 5s plus 3s. Source: page-start.ts:74–105.
Controlled schedule, relative to first phase wait
Base release
Target release
Disposition
Presence and hooks complete at 100ms
100ms
100ms
No minimum artificial delay.
Presence at 100ms; hook/load promise never completes
3,000ms
3,000ms
No added hold for unrelated slow restore hooks after native presence.
Native presence at 4,000ms; hook promise still pending
3,000ms
4,000ms
Added 1,000ms is the necessary ordering barrier for the reported dropped-request race, not repeated work.
Native presence and load never complete
3,000ms
5,000ms
Target makes one additional bounded 2,000ms recovery attempt; later pages share the expired promise. No automatic retry debt.
Routed existing-page wait with shared phase stalled
≤3,000ms
3,000ms
Explicit cap preserves a host command's previous extension-wait bound.
Guest closes at 200ms during stalled wait
Base shared deadline unless caller separately detects close
200ms for the wrapped caller
New close listener returns immediately and caller checks closed state.
These are virtual-clock contract results, not real time-to-visible-page measurements.
Desktop restored/new tab: the renderer now defers creating the guest until readiness, not just its first load. Thus its empty surface/registration can last up to the remaining 5s profile budget; the base already held first navigation up to 3s. This additional ≤2s specifically waits for missing native loads. Guest registration's existing 8s bound leaves nominal 3s for attach/registration after a full hold, not a measured guarantee. Page paint also requires normal navigation/network completion. Feature disabled, no enabled loads, warm session and already-complete phase do not pay these deadlines.
Changed address / Stop / Reload: URL input stays a single latest value; final preparation skips readiness, avoiding another 3–5s wait. Stop/Reload do no guest work during the bounded pre-creation phase. Harness: 100 URL changes during the first outstanding prepare produced two prepare calls and exactly one final src assignment. If detached before reply: one prepare, zero navigation; parked remount used the existing marker with no extra prepare.
Agent/CLI: target resolution can wait for registration via RuntimeBrowserCommandTargets and existing browser-tab-registration-wait.ts; it therefore includes the pre-creation hold. The direct goto readiness call and extension tab announcement also consume the same phase wait and cannot restart it. AgentBrowserBridgeQueue serializes per page; cold-phase commands can hold that page's lane until readiness, while other pages have separate lanes. The extra hold prevents issuing their request into the extension-load race; this is required work ordering. Once the phase fallback has resolved, subsequent browser calls in that phase add no deadline delay. A native page load can take longer than this budget; this PR does not add or expand its navigation timeout.
Routed client page / shared command slots:initializeClaimedBrowserRouteGuest supplies FIRST_LOAD_WAIT_MS to the wrapper. The host's default 8 handler slots, 256 active commands and 32 queued/page are unchanged (browser-client-host-command-state.ts:12–16). Eight cold initializations can occupy up to 8×3=24 handler-seconds for this stage, the same worst-case extension hold as base; the new global 5s limit is not substituted here. A single init's aborted signal is checked at continuation; guest destruction releases readiness early. Abort without destruction can still wait up to the 3s cap, as before, and is not amplified to 5s.
Bootstrap / mobile: an about:blank routed webview uses a 3s wrapper to remain within its 5s mount budget. Server/offscreen pages still create/register an operable BrowserWindow immediately and defer load asynchronously via loadPageWhenReady; their first capturable document can now wait up to the remaining 5s phase budget. Phones and agents reaching a freed page through ensureBrowserPageActive share this path. No phone-only extension startup, new mobile poll, new stream capture, or synchronous mobile hydration is added. Subsequent stage waits reuse the same cached phase promise rather than adding another whole deadline.
The ≤2s extension-presence hold is a deliberate correctness dependency with the reported failure mechanism. Its magnitude alone is not evidence of wasted work or a new P0 interaction stall: releasing earlier while the extension is absent is precisely the unsafe ordering this PR addresses. Real native startup/paint/transport durations remain unmeasured, as listed below.
Deterministic checks
Executed workload
Result
750 then 7,500 same-profile readiness callers, E=20
Same promise identity across callers; 20 native membership lookups, 1 presence listener, 2 shared timers in both populations; real completion removed listener/timers to 0.
12 then 120 stalled independent profiles, E=20
240/2,400 checks; 12/120 listeners; 24/240 finite timer firings; 0 listeners/timers after 5s. Later calls created 0 retry timers.
E=20 then 200, one session
20/200 checks and 1 listener in both; simulated load failure for one ID plus real loaded events for the rest completed and removed listener.
Fast completion, slow hook, late native presence, never-loading, route cap, close
A/B and target release contracts match the table; all explicit timers/listeners removed by the deadline.
P=750 then 7,500; P partition hits plus repeat miss
Exactly P profile visits for initial rebuild, zero additional visits for hits/miss; one set caused exactly one more P rebuild; delete/clear produced correct misses. No P² repeated scan.
2/1/1 prepare calls; 1/0/1 src assignments; waiting flags cleared in all cases.
Six scan questions
Question
Disposition
Unused work before gate?
Reviewed: feature/attached-session gate precedes profile discovery; waiting guest gate precedes navigation/metadata/native calls; install-set construction once per actual attach, not every page. Cold store read is already present in base attach.
Ownership multiplication?
Reviewed: phase-shared wait/observer, per-session ID Set, per-call close guard, explicit renderer teardown. Same-profile N/10N checks prove no page×extension observer multiplication. Transient phase overlap bounded to old unload/new attach.
Thread and storage?
Reviewed: Set/Map work on main, URL coordination on renderer. No new subprocess/SQLite or periodic sync I/O. Lazy P index and per-attach E memberships quantified. Native load/restore CPU duration not profiled.
Growth / forward progress?
Reviewed: missing IDs only shrink; failures advance them; deadline and cache prevent repeated stalled waits; one token per page; latest-only URL input; profile index invalidation tested. Required O(B), O(S×E), O(P), O(H) output dimensions explicit.
Execution host?
Reviewed statically: Electron Session APIs on macOS/Linux/Windows; route lookups use local maps, not SSH calls. Server/offscreen and phone consumers traced. Native platform and live transport latency not executed. No host-specific process/fs mechanism is added.
Stop / release obsolete work?
Reviewed and partially executed: close releases existing-page waiter; presence ends/cleans on completion/failure/deadline; disconnected renderer avoids successor prepares/native navigation; parked marker is consumed on resume; unbind disposes listeners/recovery. Native extension loading itself remains the existing shared profile operation and is not cancelled by one consumer.
Regression classes touched
Class
Disposition and evidence
Fixed-cadence polling / new idle wakeups
Matched deadline timers, disproved as steady-idle regression: two finite shared one-shots, no self-rescheduling loop; 0 after deadline and after repeated same-phase reads. No interval/rAF.
Per-instance work / listener multiplication
Matched new presence listener and close guard; phase sharing verified at 750/7,500 callers. Required O(B) page continuations and C close guards, no repeated B×E inventories.
Per-entity state outlives owner / resource leaks
Matched WeakMaps and phase cache: membership IDs removed on load-end, observer removed by ≤5s, phase cache removed when underlying load settles. A deliberately stalled load leaves one resolved cache entry per unfinished profile phase, preventing renewed waits; it does not append per-page/per-read entries. Underlying loader/unload lifetime is pre-existing. No native heap-leak claim.
Hot-path rescans / re-reading unchanged input
Matched profile index and new partition lookup; N/10N rebuild count is P once per mutation batch, then 0 visits. Routed profile lookup avoids old session inventory. No new steady disk read.
Unbounded fanout / queues
Matched B pending prepares and latest-URL loop. Required one request per admitted page, one in flight/page, re-prepares require a changed latest URL, stale detached pages stop. Shared host queues retain existing 8/256/32 bounds. No new extension load fanout beyond existing per-session enabled loads.
Hidden owners keep working
Matched parked callback. It stores one marker instead of attaching a disconnected guest; resume consumes it. Existing admitted connected pages may finish their required first attach; no new hidden-page polling/validation loop.
Expensive work past a gate / sync main work
Earlier readiness can start extensions before guest creation; same admitted profile session is already attached by base's webview security path, with the same loader idempotence guard. It does not bypass visibility/mount admission or start extensions for every saved tab. Same cold install-store read moves earlier in attach. No newly multiplied disk/spawn work.
Eager startup imports
New imports reach small readiness/presence/index modules; loader, route-session registry, installation store and browser registry are already dependencies of these browser startup modules. No new SDK, worker or subprocess initialization module. No bundle/startup wall-time claim.
Unnecessary publication / store identity churn
Waiting guards skip native navigation and metadata projection; no new store write/version/snapshot publication loop. Existing pane metadata/resume subscriptions and their rates unchanged.
Untouched classes (transcript streaming, whole-file journal rewrites, per-status/key/PTY global derivations, SQL scans, etc.) have no matching added runtime work.
Residual evidence limits
No real Electron app, extensions, CDP first paint, macOS/Linux/Windows native extension loader, navigation-history restore timing, slow disk profile, SSH transport or mobile client was exercised. Therefore native first usable-page time, main-thread CPU occupancy, actual memory bytes and native cancellation behavior are not certified clean by this scan. The report's clean verdict is the independent structural/count review plus executed seam contracts; it does not replace platform/functional QA. No source-proven amplification is deferred into these gaps. Large history restore still needs native performance evidence if that existing mechanism is separately under investigation.
No P0/P1 finding, no requested change, and no repository/GitHub mutation.
Problem. If any browser extension was installed in Orca's browser (an ad blocker, a password manager), the browser tab you had open came back blank after a restart and stayed blank until you reloaded it. The same happened to the first tab opened while a profile's extensions were starting again after sitting idle. The tab's first request was in flight when the profile's first request-intercepting extension loaded, and Electron drops a request in flight at that moment.
What changes for users. A page is now created only after its profile's extensions have started, the way a browser loads a profile's extensions before it restores any tab. While it waits (at most 5 s; This-device pages keep main's 3 s) the tab stays blank, with no loading indicator, and Reload does nothing. An address typed during the wait is the one that opens. If the extensions are still not ready at 5 s, the page opens anyway; if its first request then stalls, the tab shows the existing "Waiting for …" notice and loads on a manual reload, as on main. Pages with no extensions are unaffected.
Fixed during review:
The first design held an existing page's first navigation. Every way a page can navigate then had to be caught one by one (Stop, Reload, Back, scripts, route navigations), so a design review chose to create the page after readiness instead.
A one-time reload past the 5 s bound was added and then removed: it never fired in QA and has no counterpart in the references.
An address typed during the wait opens without a second wait, so agent and CLI deadlines hold.
This-device pages woken by Memory Saver, or switched into a cold profile, wait for extensions again (3 s, as on main).
Cold SSH and This-device pages find their source profile directly, and partition lookups use an index, so opening a page no longer scans every saved profile.
The wait's extension listener ends with the startup load or the bound, whichever comes first, and no extra store update runs before a page exists.
Accepted limit (the coordinator's decision; not worse than main, where the same wait was bounded at 3 s): a page whose extensions take longer than 5 s (3 s on This-device) opens without them. The standards check agreed a bounded wait with an explicit fallback is the standard answer here: a browser blocks its whole window on extension startup, but Orca's per-tab deadlines (tab registration, recovery, agent commands) can't wait unbounded, and an unbounded wait would turn a hung extension load into a tab that stays blank.
Verified on 18cab8a4f4079e138e8feb26ed3feb816f7a1b97
CI green. Regression audit (merged onto main d4562c4): no regressions. Perf scan: clean (comment above). Code review: clean. Standards check: STANDARD (extensions load before any tab is restored; a bounded dependency wait with an explicit fallback).
macOS M4Air recheck on this head, main d4562c4 vs branch, 2 extensions: main's restored tab stayed blank past 45 s in 3 of 3 launches (2 graceful, 1 force-kill). The branch loaded it in 3 of 3 (3.8–5.4 s from launch), Back worked after one navigation, and the 5 s bound was never reached.
Windows high spec, 1,902 workspaces, on 10a8736 (the same design with the reload since removed, which never fired), run one copy at a time:
With 1 or 2 extensions, main's restored tab stalled blank in 6 of 6 launches. The branch loaded it in 6 of 6, with exactly 1 request per tab and no form re-sent.
Extra wait before the page exists, compared with no extensions: about 1.0–1.1 s at launch (one 3.5 s outlier), and 0.57–1.07 s for the first tab after the idle stop. The 5 s bound was never reached. Window ready is the same within noise (2 ext: 4294 vs 4396 ms).
While a tab waited, a typed address opened once, Reload and Back did nothing, and a closed tab loaded nothing.
macOS M4Air full run on 10a8736: main stalled in 14 of 14 restores and first tabs with extensions; the branch loaded 17 of 17. Extra wait p95 at most 1.3 s.
Restored tab after a restart with 2 extensions. Main, on the Windows fleet run (blank, "Waiting for github.com…"):
Branch, on the M4Air recheck of this head (page rendered):
Pre-existing findings, not from this PR (follow-ups):
After a restart at fleet scale on Windows, the GitHub tab's back list and scroll position were lost on both main and the branch, even with no extensions (history length 1, scroll 0). On the M4Air, Back survived.
orca tab create --url can load its page twice: tab creation opens the tab with the URL, then navigates to it again. Main does this whenever no extension is starting. The coordinator is opening a follow-up.
Other follow-ups: phase reporting in the stall trace; server/offscreen pages still hold their first load as on main.
Static analysis fails only on browser-session-registry.ts (301 lines), which already fails on main since #47262 and isn't touched by this PR. CI otherwise green; code review and UX-I passed on this head.
)
#47262 left browser-session-registry.ts one line over the 300-line lint cap, so static analysis fails on main and every PR. setupRoutePartitionPolicies now reuses requireRouteBrowserProfile's identical check.
…ation going after the picker closes (#46245)
* feat(bots): inset the avatar description field and keep picture generation going after the picker closes
* fix(bots): an outfit pick is a newer choice than a picture still being generated
Rebased onto main's avatar outfits. An outfit-only pick now notes a choice in the
picture ledger and holds it open until its save is acknowledged, and the host bumps
avatarRevision on an outfit write, so a running Generate can no longer overwrite a
picked outfit. The color and outfit saves share main's useBotLookSave queue.
Also: the Generating tooltip stays controlled, "Close anytime" wraps inside the
tile, a failed Create no longer reopens New bot's picture popover, and Create's
picture handoff is one helper shared by New bot and Import.
* fix(bots): a look picked during a generated upload keeps its mascot, and a lost profile save no longer strands fresh uploads
A color or outfit pick made while a generated picture is uploading now sends the
mascot shown again, so the look wins whichever write the host takes first.
Before its bots are first listed, the host raises any record whose avatar revision is
behind its home's bot.json (a profile that lost its last save). A fresh read then
anchors a new Generate at the real revision, while a request made before the crash
is still refused.
* fix(bots): keep newer picture choices across import and settings
* Remove chat filter from group items (#47851)
* Remove group item chat filter
* Remove retired runtime catalog entries
* Fix phone group item refresh and paging
* Fix phone test array style
* Keep group asks fresh during phone refresh
* Clear departed group member reads
* feat(app-rail): space rail buttons out to a 40px rhythm (#48049)
Rail buttons sat on a tight 32px pitch. A 12px gap puts each 28px button in a
40x40 cell, matching the right activity bar, and the overflow slot follows.
Co-authored-by: m4air <[email protected]>
* fix(agent-permissions): show permission descriptions as tooltips (#42557)
* fix(agent-permissions): show permission descriptions as tooltips
Permission menus rendered a description line under every choice, which made
them tall. Rows are now one line; the description is a hoverable side tooltip
and always the row's accessible description. It renders inline on touch-only
screens, in narrow or zoomed windows, and on rows tapped in a mouse-opened
menu (first tap reveals, second selects). Disabled choices stay focusable so
their description can be read, and one Escape closes the tooltip and menu.
* fix(agent-permissions): comply with primitive style and test gates
* fix(agent-permissions): fit composer picker within zoomed viewport
* fix(agent-permissions): retain inherited permission row primitive
* fix(agent-permissions): constrain settings choices to viewport
* fix(items): read answers and drafts written with the pre-#47963 question line (#48041)
* fix(items): read answers and drafts written with the pre-#47963 question line
* fix(items): prefer this build's question heads before older ones across all questions
* fix(items): a longer old question head keeps its line over a shorter current one
* perf(items): work out each ask's question heads once, and skip head matching for a reply whose label does not end the line
* fix(i18n): translate English terms left in 64 Simplified Chinese strings (#48040)
Replace English terms that were left inside Simplified Chinese values
(Chat UI, API key, API token, issue, merge request, Linear ticket, Agent,
SSH config and 17 one-off terms) with the Chinese term zh.json already
uses for the same thing elsewhere, so one feature no longer has two names
in the Chinese UI. Only catalog values in zh.json change.
Fixes#48042
Co-authored-by: Neil <[email protected]>
* fix(dock): re-check Stop and Retry against the live dock, cancel held presses across a feed drop (#47951)
Follow-up to #47774. Before Stop is sent, including from Retry, it is checked against the live dock: same party, same dispatch, not settled, and stoppable by the same rule the row renders with. Settled retries read "Already stopped". Held mouse, touch and key presses on Stop are cancelled by a feed loss during the press, and each click activates as the press that produced it. Stop and Clear draw an inset focus ring that stays visible at 360px. Focus on the failure line passes to the next line or the dock toggle.
* test: clarify the agent-home guard error and run the reclaim test on Node on macOS (#47538)
Co-authored-by: jiang3ye <[email protected]>
* perf(browser): stream Save to this computer as binary frames so memory stays flat (#48059)
* perf(browser): stream a server download's copy as binary frames with acks
Save to this computer read the file as base64 JSON replies, so desktop
main's heap swung by hundreds of MB of short-lived strings on a big copy.
The host now sends the file as binary frames on the stream's own socket,
from a fixed set of buffers, at most a 2 MiB window ahead of the desktop's
acks; the desktop writes each frame and acks it. Memory no longer depends
on file size, and the copy is about five times faster.
* fix(browser): mark copy frames, refuse odd-sized ones, stop with the server's transport
* fix(browser): give up on a copy whose file stops arriving for a minute
* fix(browser): stop a copy whose file changes in place; finish short reads
* fix(mobile): make item thread comments, description and questions selectable on iOS (#48068)
Item thread comment bodies, the item description and ask question text
rendered MobileMarkdown without rangeSelectable. Inside the OTA shell
(react-native-web), a paragraph Text with selectable=false gets
user-select:none, so a long press did nothing. These call sites now pass
rangeSelectable={INLINE_TEXT_SELECTION}, matching the native-chat
transcript. A native (non-shell) Android render gets false and keeps
main's block selection.
Fixes#48039
* fix(bots): to stay silent a bot writes only NO_REPLY; any other words are its reply (#47962)
* fix(bots): to stay silent a bot writes only NO_REPLY; any other words are its reply
* fix(bots): only a tool that answered whoever waits stands in for the reply; every quiet note names the marker
* fix(bots): a thread request already answered with bot reply needs only the marker; leave the signed-off wait prompt as it was
* fix(bots): item-only silence only when no thread waits, and silence drops a memory's status line
* fix(bots): an item comment's silence also waits for any chat or thread still owed an answer
* fix(bots): a silent turn whose answer stays in Orca may keep one owner note before NO_REPLY
Turns answering a Slack, GitHub, Linear or Discord thread stay exactly NO_REPLY.
* fix(bots): the Home Chat owner note holds only when the turn answers no outside message; mail silence also waits for chat
* feat(shell): app rail destinations fill the whole page (#48045)
* feat(app-rail): rail destinations fill the whole page
With the experimental app rail on, Tasks, Automations, Artifacts, Skills
and Orca Mobile now fill the page beside the rail. The workspace list
collapses to zero width (its rows unmount; the saved open state and
width are never written), while the sidebar root stays in one keyed slot
so its dialogs, an unsaved Workspace details draft and the Workspace
Board keep their state across view switches.
On a rail page the sidebar toggle, Cmd+B, Open Workspace Board and the
Agent Dashboard shortcut return to Workspaces with the list showing,
then act. Settings keeps its current behavior.
Keyboard focus never drops to the page body: a page opened while a list
row had focus, or an overlay that closes back to a removed element,
hands focus to the page once it has loaded, unless something newer took
it. The titlebar controls keep focus when they move between the column
header and the page titlebar.
With the rail off, nothing changes.
* fix(app-rail): keep the hidden workspace list mounted on rail pages
A rail page used to unmount the workspace list rows. That dropped
unsaved edits in the list (the detected setup command, the Rename
group dialog), closed a row's open context menu under keyboard focus,
and made returning to Workspaces revalidate the Smart Sort order and
write it again.
The rows now stay mounted while a rail page hides the list: the list
keeps zero width and is inert and hidden from assistive technology.
Only collapsing the list yourself unmounts the rows, as before. Focus
inside the list when it hides moves into the page once it loads.
* fix(app-rail): keep the hidden workspace list out of keyboard handling
On a rail page the workspace list stays mounted but hidden, and two
keyboard paths still reached it:
- Its global shortcuts (focus worktree list, next/previous workspace,
collapse all projects) acted on the hidden rows, for example unfolding
Projects while Tasks stayed on screen. They now do nothing while a
rail page hides the list, and still work on Workspaces.
- Escape from a nested context-menu item (Copy > Path) left focus on the
page body, because the submenu is portaled apart from its menu. A
close now also counts when the last focused element left the DOM, so
focus moves into the page as it does for top-level items.
* fix(app-rail): recover focus only from a menu or dialog that owned it
Focus recovery on a rail page treated any focused element that had left
the page as stranded by the next overlay close. Clicking a control
outside an open, nonmodal menu could focus that control and remove it
before the menu reported its close, and focus then jumped into the
page.
Recovery now records which menus and dialogs own focus whenever focus
moves, including the parent menu of a portaled submenu, and acts on a
close only when the closing one owned it.
* fix(connectors): a bot's words before a trailing NO_REPLY post in every Slack conversation (#47896)
* perf(ipc): build the desktop runtime RPC registry once instead of per call (#47917)
* Check agent CLI updates after launch settles, a few at a time (#47923)
* perf(agent-cli-update): defer the startup CLI check and run at most three --version probes at once
* fix(agent-cli-update): give the update check a budget that covers queued version probes
* fix(agent-cli-update): cover the worst-case probe queue and let a failed check retry
* fix(i18n): translate 48 missing Korean strings for team-managed updates, plugins, and settings (#48053)
Korean users saw English in the team-required update card and restart
dialog, the install-on-quit prompt, required-plugin warnings, the plugin
catalog's team labels, the Orca account console row, and the settings
that a team turns off (Relay, Computer Use, artifacts, development
folders, bots). These keys existed in en.json but not in ko.json.
Each value is inserted after its preceding en.json sibling so the diff
is additions only, and every value keeps the English placeholder set.
A theme port uses 포팅 버전 so it does not read as a network port (포트),
and botsOffByTeam uses 이 실행 to match its botsOff and botPaused siblings.
Fixes#48054
Co-authored-by: Neil <[email protected]>
* Move the Linux port scan's per-file process lookup off Orca's main process (#47943)
* perf(ports): skip the Linux /proc fd walk when listening sockets are unchanged
The 30 s workspace port scan read every fd link of every process on the
machine to map listening sockets to pids. Reuse the last map while the set
of listening inodes and each owner's start time are unchanged; ownership
checks that authorize a kill still walk fresh.
* fix(ports): bound the Linux socket-owner cache to 10 scans and require our own sockets mapped
A socket handed to a child while its parent lives, or a root socket later
inherited by a user process, kept its inode and the cached owner. Walk again at
least every 10th scan and whenever one of our own sockets has no owner.
* fix(ports): revalidate cached Linux socket owners instead of trusting a live pid
A supervisor that handed its socket to a child and closed its copy stayed the
cached owner, so the port showed as external and its advertised URL was
dropped. On reuse, check that each cached owner still holds its socket and walk
processes started since the last walk, keeping the full walk's last-holder rule;
walk everything again after 10 scans or 5 minutes.
* perf(ports): list Linux socket owners with one ls in the port-scan worker
Replace the reuse cache with exact full-walk semantics: one ls -ln /proc/*/fd
in the port-scan worker lists every socket holder, and the owner is the last
holder in /proc's listing order, as the node walk picked. Falls back to the node
walk if the command fails.
* fix(ports): fall back to the node walk when the socket listing has no holders
* fix(ports): print only wanted socket holders from the Linux listing
Printing every socket fd could pass the worker's 2 MiB output limit on a large
machine, failing every scan into the main-thread walk. awk now prints only the
listener inodes plus a count of well-formed socket lines, which tells an
unreadable ls layout apart from listeners Orca can't see; holder lines must end
in ' -> socket:[N]'.
* fix(ports): retry a failed Linux socket listing every 10th scan instead of every scan
* fix(ports): keep the exact readlink walk for Linux kill and allow-list ownership checks
* fix(ports): stream one ls process through a worker-side filter for Linux socket owners
The sh | ls | awk pipeline left ls and awk running when a timeout or quit killed
sh, and awk's list search grew with sockets x listeners. The worker now execs a
single ls (LC_ALL=C), tracks it with the other scan children, and filters rows
line by line with a Set: only exact 11-field 'fd -> socket:[N]' rows count.
* fix(ports): run the Linux socket listing with only PATH and drop just an over-long line
TIME_STYLE or QUOTING_STYLE in Orca's environment changed ls's layout and
disabled the listing; an over-long path line split across chunks cleared the
current pid and lost that process's later sockets.
* fix(ports): list Linux fds with ls -q so a path with newlines can't forge a holder row
* fix(ports): ignore Linux socket holders that the /proc listing never saw
* fix(i18n): translate 64 missing Korean strings for skills, settings, the status bar, and the activity bar (#48057)
Add Korean translations for keys that were missing from ko.json, covering
skill replace/backup notices, shared Codex servers settings, usage status
bar rows, the activity bar reorder controls, and other recently added UI
strings, so Korean users no longer see English fallbacks there. Also add
the missing _one plural forms for counts.
Co-authored-by: Neil <[email protected]>
* Keep workspace deletion review at a stable size (#48065)
* Keep workspace deletion review at a stable size
* Animate workspace deletion file details
* Preserve disclosure panel links while collapsed
* fix(i18n): translate 36 missing Korean strings for browser cookies, server downloads, and port forwarding (#48055)
Korean users saw English in Settings > Browser's "Clear cookies" row and
its confirmation dialog, the download and print notices of pages
streamed from a paired server, browser-tab open failures, the paired
server port-forward toasts, the SSH session-host detail, and the
terminal link popover's refusal message. These keys existed in en.json
but not in ko.json, so i18next fell back to English.
Each value is inserted after its preceding en.json sibling and keeps the
English placeholder set. The SSH port-forward toast names the Ports
panel ("포트 패널") so it points to where forwarding is done.
Fixes#48056
Co-authored-by: Neil <[email protected]>
* fix(codex): never write a WSL distro's Codex config; regenerate the managed copy from it (#45247)
* fix(codex): never write a WSL distro's Codex config; regenerate the managed copy from it
* fix(codex): treat mapped-drive and drvfs distro configs as the distro's, write the baseline atomically, and recover a held config before the history pass
* fix(codex): recognize the extended spelling of a mapped distro drive, and leave the baseline and history writers as on main
* chore: drop an unrelated lockfile change
* test(codex): an unchanged WSL regeneration leaves the managed config untouched
* fix(codex): drop a held-back conflict for a ~/.codex linked or mapped into a distro
* fix(codex): skip the promotion write when a linked ~/.codex folder can't be resolved
* fix(cli): save downloads beside an older file of the same name instead of refusing (#48067)
* fix(cli): save downloads without --out next to, not instead of, an older file of the same name
* fix(cli): name a nameless or path-like download by its id, without Windows-dropped trailing dots
* fix(codex): summarize every file of one multi-file apply_patch in native chat (#48038)
A completed Codex fileChange that touched several files was saved as one
headerless join under a "N files" path, and the client refused to name any
file from a count, so the turn showed no changed-files summary.
Each file of a multi-file change now gets its own diff --git section
(whole-file hunks for add/delete, rename destinations kept). The Diff call
carries body.paths, and a "N files" patch is summarized only when it arrives
whole with exactly N git-headed sections whose paths match. Larger patches,
header-unsafe names and older journals keep the raw "Edited N files" row.
Refs #48025
Co-authored-by: Neil <[email protected]>
Co-authored-by: bbingz <[email protected]>
* feat(checks): show skeletons while checks and comments load (#47812)
Show layout-matched placeholders on the first checks and comments reads. Keep loaded results visible during refresh, distinguish unread from empty, and respect reduced motion.
* feat(app-rail): tighten rail button gap to 10px (#48084)
Keep the overflow slot height in step (28px button + 10px gap).
Co-authored-by: m4air <[email protected]>
* perf(bots): keep settled linked workers' reads between item views (#47911)
* perf(bots): keep settled linked workers' reads between item views
Item views and the usage-limit pass re-walked every linked Dispatch's
lineage on the main thread each read. Settled workers' reads are now kept
and dropped by the orchestration database's own row notices for any
Dispatch the walk read, so a refresh reads only running workers and
lineages written since.
* perf(bots): index a lineage's kept reads once, not per linked ref
* fix(bots): never keep a linked worker read whose Task or follow-ups couldn't be read
* perf(bots): keep only short reports with kept linked-worker reads
* fix(bots): batch insert lookups, copy kept values, and re-read hits a write dropped mid-read
* fix(bots): one status snapshot per linked-worker read, a report budget, and drops on another connection's writes
* fix(bots): keep only linked workers off a live pane, cap kept reports, and catch mid-read follow-ups
* perf(bots): validate kept linked workers with one fingerprint read per pass instead of tracking row events
* perf(bots): budget kept linked-worker reports, not entries, and skip long worker reads
* perf(bots): skip the fingerprint read when no write has landed since the last check
* fix(bots): drop a kept linked worker on its own Dispatch's notice, and check for writes after the fingerprint read
* fix(bots): drop kept linked workers on a deletion, copy reports only within the budget, and show reports written during a read
* fix(bots): re-read kept linked workers dropped during a read, keep finished workers after the reply, and allow long worktree paths
* fix(bots): drop kept linked workers on another connection's commit, and never restore one a failed re-read dropped
* fix(bots): re-check kept linked workers after each recovery read, not once
* fix(bots): re-check kept linked workers after a read awaits, keep only after the reply, and bound pending reports
* fix(bots): keep only plain follow-up chains, re-read a whole batch a write changed, and queue kept workers once
* fix(bots): re-check kept linked workers by fingerprint before a read replies, and never throw while keeping
* perf(bots): skip long terminal histories unparsed, and take keep slices off the queue's iterator
* fix(bots): read the database version once per linked-worker check
* fix(bots): check a linked-worker reply against the stamp its kept workers were checked at
* Preserve avatar choices across generation and repair revisions per bot
* Restored browser tabs load after a restart when an extension is installed (#47262)
* fix(browser): restored tabs wait for the profile's extensions before their first load
* fix(browser): a navigation during the held first load keeps the restored back list
* fix(browser): hold navigations made during the first-load wait and replay the newest
* fix(browser): keep the held page loading after its stop; restore only onto an empty page
* fix(browser): queue loads asked for during the first-load wait instead of stopping them
* fix(browser): keep a queued load's request options; reject it when the page closes
* fix(browser): replay any queued load with options directly
* fix(browser): a held page always waits until its profile's extensions are in the session
* fix(browser): closing a held page ends its hold and settles queued loads
* fix(browser): a navigation started outside loadURL during the hold still supersedes it
* test(browser): a held first load starts nothing until ready; move it to its own module
* test(browser): settle before the negative check; cover the load-ended fallback
* fix(browser): record startup extension ids at attach, so page-start needs no session registry import
* test(browser): note why the fake page and session casts are sound
* fix(browser): bound the in-session wait; a held load's deadline counts from its release
* fix(browser): one presence listener per profile, ended by the give-up; Stop cancels a held load
* fix(browser): the desktop attach passes the extension wait in, so the orcad bundle doesn't pull in extension code
* fix(browser): Stop ends the hold and stops real loads; failed extension loads end the wait; keep only a wait that gave up
* fix(browser): Stop with nothing loading settles the page load; later waits skip failed extensions; a wait is shared per profile attach
* perf(browser): every startup load's end, skipped or cancelled too, ends the page wait; keyed startup set
* fix(browser): Stop on a held restore keeps its history; a cancelled route initialization stops waiting for extensions
* perf(browser): a page's extension wait ends when the page closes; goto reports the closed tab
* fix(browser): don't hold a route page's blank bootstrap, which must finish within its mount deadline
* fix(browser): route navigations wait for extensions too; the attach's load deadline counts from attach again
* fix(browser): a route navigation rechecks live authority after waiting for extensions
* perf(browser): a cancelled route navigation stops waiting for extensions and doesn't load
* fix(browser): loads after Stop still wait for extensions; an overtaken route navigation doesn't load
* fix(browser): after Stop the saved history goes back only once ready; a waiting route navigation yields to a newer one
* refactor(browser): defer a page's guest until its profile's extensions are ready, instead of holding its first load
As a browser restores tabs only after the profile's extensions load: desktop tabs get their attach
marker, and This-device pages mount, only once the page's session has started its extensions. The
first-load hold on an attached guest (loadURL/stop overrides, queued loads, Stop and history
handling, route navigation waits) is removed.
* fix(browser): a waiting tab attaches after a remount, shows loading, keeps an address entered meanwhile; registration waits extend only on timeout; a failed This-device creation releases its extensions
* fix(browser): registration waits cover a wait that ended in their window and keep listening; closing a waking page cancels its wake; the newest address wins; Stop is a no-op while waiting
* fix(browser): cap the extension wait at 5 s, inside the deadlines around page creation; a page opened at the cap loads again once if its first load stalled; a closed waiting tab doesn't re-prepare
* fix(browser): the late-start retry keeps only live pages, yields to Stop and newer navigations, and is desktop-only; Stop during the wait keeps the page closed until Reload
* fix(browser): the late retry ends once the extensions are in the session and reloads a restored entry; Stop's marker yields to Reload or a new address
* perf(browser): no partition lookup with extensions off or for attached profiles; a refused This-device mount releases its extensions; any Reload undoes a waiting Stop; Stop-then-type reuses the deferred attach
* fix(browser): trim to the desktop defer: no Stop state while waiting, This-device keeps main's 3 s wait at navigation, and only restoring tabs load again
* fix(browser): a restoring tab loads again only if an extension loaded while its first request was in flight; no validation or Stop while a tab waits
* fix(browser): This-device blank first pages wait for extensions again (at most 3 s, as on main); no extra loading update before a tab's page exists
* fix(browser): retry only after the load that resets a session's loaders; an address typed during the wait opens without a second wait; partition lookup by index
* perf(browser): the late-retry extension listener is on only while a page still waits on it
* perf(browser): a routed page's session finds its source profile by its route, without scanning saved profiles
* refactor(browser): drop the one-time retry past the extension wait's bound; a stalled page keeps the existing notice and manual reload
* perf(browser): the extension presence observer ends with the startup load or the wait's bound
* Regenerate the avatar RPC parameter catalog
* Give New bot picture arrows room and keep the Generate draft (#47173)
Static analysis fails only on browser-session-registry.ts (301 lines), which already fails on main since #47262 and isn't touched by this PR. CI otherwise green; code review and UX-I passed on this head.
* Recover damaged avatar histories without blocking other bots
* Use the reviewed bot picture recovery messages
* Keep pristine bot manifests compatible with earlier homes
* Reject repaired picture histories missing their revision
---------
Co-authored-by: orca-remote-automation[bot] <359726236+orca-remote-automation[bot]@users.noreply.github.com>
Co-authored-by: m4air <[email protected]>
Co-authored-by: Jinwoo Hong <[email protected]>
Co-authored-by: Yohan <[email protected]>
Co-authored-by: Neil <[email protected]>
Co-authored-by: jiang3ye <[email protected]>
Co-authored-by: Kelvin Amoaba <[email protected]>
Co-authored-by: Neil <[email protected]>
Co-authored-by: Brennan Benson <[email protected]>
Co-authored-by: 2SinceJuly <[email protected]>
Co-authored-by: bbingz <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
If you had any browser extension installed in Orca's browser (an ad blocker, a password manager), the browser tab you had open came back blank after restarting Orca and stayed blank until you reloaded it. Now the tab stays blank for a moment (at most 5 seconds) while your extensions start, then opens its page as before.
What Changed
A page is now created only once its profile's extensions have started, the way a browser loads a profile's extensions before it restores any tab. Until then the tab stays blank, with no page behind it and no loading indicator, so there is no request that an extension loading could drop.
browser:preparePageAttach(browser-guest-discard-ipc.ts) starts the page's profile extensions and answers only once they are ready (whenBrowserPartitionReadyForPage, newbrowser-extension-page-readiness.ts). The renderer sets the webview's attach marker only then, so Electron creates the guest after that. While it waits (at most 5 s) the tab stays blank and Reload does nothing, since there is no page yet; and an address entered meanwhile is the one the page opens with (a page woken by Memory Saver gets its saved back list first, then that address). A tab remounted during the wait (switching workspaces) attaches when the wait ends.whileExtensionsStart,browser-extension-page-start.ts) lasts until each of the profile's startup extensions is in the session (whenBrowserExtensionsInSession, newbrowser-extension-session-presence.ts, fed the ids at attach by the session services hook), because loading one is what resets the loader factories. Each startup load that ends without its extension (failed, skipped as uninstalled, cancelled) stops counting, also for later waits. The existing 3 s bound now only cuts off slower restore work; the whole wait is at most 5 s, shared per profile startup, so it fits inside the deadlines around a page's creation (8 s for agents waiting on a new tab, 15 s for recovery). If the extensions are still loading at 5 s the page opens anyway; if its first request then stalls, the tab shows the existing "Waiting for …" notice and loads on a manual reload. A browser blocks its whole window on extension startup instead; Orca's per-tab deadlines (tab registration, recovery, agent commands) can't wait without a bound, and an unbounded wait would turn a hung extension load into a tab that stays blank. In QA the bound was never reached. An address entered while the tab waits opens as soon as that one wait ends, without a second wait.srcwhile extensions start (extension pages, server/offscreen pages) keep main's existing hold of their first load, now with this wait.Mechanism of the bug: restored tabs attach through the page-attach marker, which removes the webview's
srcbefore the existing first-load wait runs, so the wait never applied to them. The restored tab's load therefore started while the profile's extensions (started by that same attach) were loading. Orca's request listener holds requests until extension startup finishes, and while it held this one, the first extension withwebRequestordeclarativeNetRequestpermission loaded. Loading such an extension resets the session's URL loader factories. Electron's request proxy then finds its target factory unbound when the held request is let through, and drops the request without an error. The main-frame request never reached the network, so the tab stayed onabout:blank.Why
Creating the page after the profile's extensions are registered removes the race at its source: by the time the page makes a request, the loader factories are no longer reset under it, and Electron owns navigation, Stop, Reload and history as usual. An earlier version of this PR held the first navigation of an already-created page instead; every way a page can navigate (Stop, Reload, Back, scripts, debugger commands, route navigations) then had to be caught one by one, so it was replaced. Only a page that opens at the wait's bound can still stall.
Linked Issue
Internal report (restored tab blank after restart with an extension installed); no public issue.
Visual Proof
The only visible change is that a tab stays blank, with no loading indicator, while it waits; packaged before/after screenshots are in the review status comment.
Testing
Packaged builds of main vs this branch, same rig for both (fresh profiles and a ~1,900-workspace seed; uBlock Origin Lite and 1Password installed from the Web Store, never signed in): results, including how long the wait lasts, are in the review status comment.
browser-extension-session-presence.test.ts: the wait needs every startup extension (one listener), stops waiting for one whose load ended without it (and later waits skip it), and ends when the startup load ends.Performance
Only a page whose profile still has extensions starting waits (at most 5 s; one shared wait per profile startup); with no extensions, or once they have started, nothing changes. No polling or idle wakeups: per starting profile, two one-shot timers (3 s and 5 s), cleared when the wait ends, and one listener that lasts until every startup extension is in the session or the startup load ends. With extension support off nothing runs, and pages after a profile's first skip the lookup over saved profiles. Nothing scales with workspace count.
Risk
Level: Medium
What could break: a page in a profile whose extensions are starting appears up to 5 s later, and agent commands on it wait that long too; on a slow machine a tab opened at the 5 s bound can still stall and need a manual reload, as on main. If the wait misbehaved, a tab would stay blank longer before opening. Pages with no extensions are unaffected. Back out with a plain revert.
AI Disclosure
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Platform-neutral. Desktop SSH tabs run their local profile's extensions in their own session and get the same wait before their page exists; This-device pages keep main's wait at their first navigation (3 s). Pages of server profiles, whose extensions run on the server, are unaffected. Folder workspaces take the same path. Known limit: a This-device page whose extensions take longer than 3 s opens without them; if its first load stalls, its creation reports a timeout, as on main. Follow-up: server/offscreen pages still hold their first load as on main (a profile switch needs their page to exist at once).
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)