Commit Graph
3729 Commits
Author SHA1 Message Date
Brennan Benson 175f10e32b Run local usage services in a supervised backend process (#40792)
* Move local usage services into a supervised backend process

* Own usage recovery and worker retirement lifetimes

* Preserve answered usage data during background refresh

* Run independent usage scans concurrently in the backend

* Limit backend startup paths to the delegated usage service

* Show usage failures through backend recovery

* Include usage failure strings in the English catalog

* Keep usage update details beside refresh failures

* Resolve usage freshness failure from the final producer snapshot

* Retain the forced refresh completion requirement

* Keep managed backend failures out of application crash reports

* Preserve usage recovery boundaries across backend reconnects

* Match the backend RPC cancellation signal in the usage seam proof

* Avoid serializing backend requests before port delivery

* Keep receiving request validation in the boundary schemas

* test: align usage transport coverage with renderer project

* fix: preserve unknown usage state and renderer retirement

* fix(usage): revalidate tracking before scan admission

* fix(usage): retry failed backend startup on demand

* test(usage): isolate stale backend ownership checks
2026-11-11 16:39:52 -08:00
Brennan Benson 890ad4d8aa Prevent new blocking work on Electron main in CI (#41263)
* WIP: guard blocking main-process APIs with file ratchets

* Cover declared SQLite receivers and preserve daemon guards

* Cover SQL iteration and shared synchronous IPC in ratchets
2026-11-11 16:24:55 -08:00
Brennan Benson 7a44471331 fix(native-chat): hold an automatic continue until the chat's account has usage again (#40412)
* fix(native-chat): hold an automatic continue until the chat's account has usage again

The automatic continue after a usage limit sent at the cut's reported reset
without looking at the account, so it could send into a still-spent weekly
window. Each sweep pass now attributes the chat's launch account (the host's
launchAccountHome) to Orca's polled reading taken in that same home, and holds
the send until the latest spent window's reset (+15 s). The hold is derived
each pass, never saved, only grows for one cut and account, and waits up to two
minutes for a reading taken since that reset before falling back to the reset
it has. A spent window with no known reset stops the automatic continue for that
cut; on System Default, where Orca can't tell which login a reading saw, a fresh
reading with room releases both. Rows on desktop and phone show the held time
through an optional continueAt; older clients keep the cut's time.

* fix(native-chat): attribute usage holds once per account and retire them with their scope

- C1/X7: launch home resolved once per provider and reading once per (provider, home) per pass; narrow usageReading accessor replaces getState().
- X8: forget() drops the hold; hidden-chat caches are pruned while the setting is off; readState stores nothing for an unattributed chat.
- X3/C3: launch and reading homes compared in canonical form (~, dot segments, async realpath, bounded cache).
- X4/C2: a hold belongs to its scope (canonical home + billing kind) and retires when it changes.
- X2: a launch whose provider has no reading yet asks once and waits within the two-minute window.
- X5: attribution runs before the overdue check, so a restart keeps the account's later reset.
- X6: the launch account is re-attributed right before each send; beforeRun refuses a changed attribution.
- C5: cold chats publish when their continue time moves.
- X1/C4: WSL launches keep the cut's own reset (no hold).

* fix(native-chat): gate held continues on an account scope token and stop reviving stale cuts

- C6: a hold extends only with a spent window that had begun by the cut's reset.
- X6-R2, X10, P1-1: a synchronous account scope token (selection, launch env, reading home and
  provenance) is captured at attribution; send() re-resolves only when it moved, memoized per
  token, and beforeRun compares live and captured tokens. Opening a chat drops only cold-cut caches.
- X11: production tick() test at N=300 and 10N=3000 counts resolver and reader calls.
- X2-R2: the bootstrap wait starts when a pass first sees the due send without a reading.
- X9: canonical homes are resolved once per account per pass; the unbounded-lifetime cache is gone.
- C5-R2: unloaded chats have no status push path, so the cold continueAt publication is removed.

* fix(native-chat): separate continue eligibility from current spending and bind sends to their attribution's sources

- X12: a cut's eligible anchor (its reset, an established hold, or a covering window) takes the
  24 h overdue test; once eligible, every currently spent window holds the send.
- X13/P1-2, X6-R3: the account owner returns attributions with a synchronous source witness
  (settings snapshot identity, cached login-shell capture revision, reading-source identity);
  Claude billing comes from the launch's own env composition. A result whose sources moved while
  it resolved is discarded; send() and beforeRun bind to the attribution's own witness and
  supersede without spending an attempt.
- CI-1: the scope-token type assertion is gone with the token.

* fix(native-chat): keep a covering hold beside spent windows of unknown reset

- X12-R4 / C7: rebuilding the covering anchor skips spent windows whose reset, and so start, is
  unknown; the eligible branch still refuses on them.
- E1-R4: the preparation-change and suspended-attribution race tests run on a Claude chat
  through the real host send, mutation and accepted settlement.

* refactor(native-chat): move the usage-limit continue status into its own wire module

The merge with main put agent-session-wire.ts one line over the 300-line limit.

* fix(native-chat): read the shell capture revision lazily so module mocks without it still load

Tests that main added mock login-shell-environment without the revision accessor, so binding it at module load failed.

* fix(native-chat): release a usage hold on fresh room for any account without stranding the cut

- QA-1: room in a fresh attributed reading newer than the last spent evidence (spentSeenAt)
  releases the hold and clears an unknown reset for every account; the System Default-only
  branch and identityKnown are gone.
- QA-1b: the release pulls heldUntil down to that reading instead of clearing it, and an
  unknown-reset hold anchors on its last evidence, so a release over a day after the cut sends.

* fix(native-chat): release an expired usage hold from its room reading and ask for readings while a reset is unknown

- R6-1 / QA-1b-R6: a release sets heldUntil to the room reading itself, so an expired finite
  hold followed by an unknown reset no longer strands the cut.
- R6-2: the usage poller idles while Orca is unfocused with no viewer, so an unknown reset asks
  for a non-forced reading at most every 10 minutes through the existing refresh.

* fix(native-chat): bound unknown-reset readings per account and honor the failure backoff

- R7-1 / X-R7-1: the rate-limit service owns the automatic-read cadence: a read waits while the
  provider's last reading or admitted automatic read is within the asked interval, so held chats
  on one account cause at most one unknown-reset read per 10 minutes.
- R7-2: automatic reads wait out the poller's failure backoff (shared failureRetryDue) and start
  its clock; forced refreshes are unchanged.

* fix(rate-limits): scope automatic usage-read admission to the selected account

- R8-1 / X-R8-1: an admitted automatic read counts toward the cadence only for the account whose
  reading source the service held then, so a switch never lets one account's read delay another's.
- Prunes the flaky-test-pattern baseline: service-refresh-orchestration no longer reads the wall clock.

* fix(native-chat): keep a usage-reading request retryable until the service starts it, and show the last known reset while one is unknown

* fix(native-chat): show no automatic continue while a chat waits on an unknown reset, since fresh room still releases it

* fix(native-chat): publish no continue time for a cancelled or stopped cut while its account's reset is unknown
2026-11-11 16:18:47 -08:00
OrcaWinandOrcaWin 4509730131 test: remove repeated wiring and suspended orchestration suites (#41302)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-11 16:16:48 -08:00
Kelvin Amoaba d9d3dfdd08 fix(emulator): make iPhone Duo fold work in release builds and show serve-sim's real error (#41051)
* fix(emulator): let iPhone Duo fold in release builds

Release signing gave serve-sim's in-simulator helpers the hardened runtime,
which drops the DYLD_ROOT_PATH that simctl spawn hands them, so the Duo HID
and accessibility helpers aborted at launch. Sign just those two with only
allow-dyld-environment-variables.

serve-sim's uncaught errors print its minified source, which contains the
"No serve-sim server running" text, so every crash was reported as no active
emulator. Report the thrown error line instead.

Fixes #40509

* fix(emulator): keep multi-line serve-sim error messages

* refactor(emulator): simplify serve-sim failure message parsing
2026-11-12 00:10:11 +00:00
Neil 22c7097240 refactor(mobile): organize browser stream, input and pane modules (#41300)
* refactor(mobile): group browser streams, interactions and pane owners

* refactor(mobile): use named browser module type imports
2026-11-11 16:06:30 -08:00
OrcaWinandOrcaWin c2e716dbbb test: remove 17 low-value wrapper and private-state suites (#41292)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-11 15:51:03 -08:00
NeilandKelvin Amoaba 5d61e00c6d build(mobile): upgrade to Expo SDK 58 and React Native 0.88 (#37935)
* build(mobile): upgrade to Expo SDK 58 and React Native 0.88

Expo 58 drops Zod from @expo/cli, which clears the last Zod 3 advisory
(GHSA-mrhx-c7xc-m3w5) in mobile along with its local patch and override.

- Expo 55 -> 58, React Native 0.83 -> 0.88, React 19.3, gesture-handler 3,
  webview 14, reanimated 4.7, worklets 0.13 (SDK 58 bundled versions,
  pinned below today's batch to respect minimumReleaseAge).
- Port the react-native and react-native-webview patches unchanged; drop
  expo-constants, expo-notifications, @expo/cli, expo-router, zod and
  query-string patches plus the zod/query-string/xcode>uuid overrides,
  which upstream fixed or no longer need.
- iOS minimum rises to 16.4 (Expo 58 / RN 0.88 requirement).
- Migrate to RN 0.88 strict types: instance ref types, NamedStyles,
  AppState.currentState, list header/footer nulls.
- Replace removed runtime APIs: InteractionManager -> idle callback with a
  macrotask fallback; StyleSheet.absoluteFillObject -> absoluteFill;
  FileHandle.readBytes -> readBytesSync (it became async).
- Resolve react-native/asset-registry for shared assets in Metro and alias
  the old registry path for react-native-svg in the desktop mobile-web bundle.
- Reduce the iOS scene plugin to the reconnect override; Expo 58's template
  now ships the scene delegate itself.

* fix(mobile): bridge react-native-svg web imports and libsodium runtime for RN 0.88

- Share react-native-svg web shims between the mobile-web build and its render
  checks: map the old asset-registry path to react-native-web's registry and stub
  the Android-only touch-sound TurboModule.
- Patch react-native-libsodium 1.7.0 to read the JSI runtime from the bridge proxy;
  RN 0.88 removed RCTCxxBridge.runtime.

* fix(mobile): use Expo 58's legacy promise resolver for audio permissions

* fix(mobile): skip null handles in the RPC recording timer shims for RN 0.88 types

* style(mobile): format MobilePRSidebar after rebase

* fix(mobile): name RN 0.88 text input refs for declarations; allow queued back in stack render check

- Type text input refs with an exported interface so declaration emit can name hook results
  (RN 0.88 aliases TextInputInstance to an unexported class).
- Expo Router 58 drains back() after a commit; check the interrupted push's exit from the
  frame it starts, bounded to three frames of lag.

* chore(mobile): justify the text input handle interface for React Doctor

* chore(mobile): use a nameable intersection alias for text input refs

* fix(mobile): use sync expo-file-system writes, copies and moves on Expo 58

Expo 58 made File.write/copy/move and FileHandle.writeBytes return promises.
Our callers never awaited them, so failures escaped their try/catch and the
store's tmp-then-move and PDF writes could race their close or rename.

* build(mobile): raise the page bundle budget to 10 MiB for Expo 58

Expo 58 adds about 310 KB to the page: expo-router (+258 KB, now carrying
React Navigation, net about +110 KB) and Reanimated 4.7 (+152 KB). Main had
85 KB of headroom left. 10 MiB still stays within the 10 MiB per-asset contract.

* fix(mobile): drop the window-metrics seed RN 0.88 removed from Android

RN 0.88 no longer holds window metrics: DeviceInfoModule reads the activity's
WindowMetrics on demand and setWindowDisplayMetrics is gone, so MainActivity
no longer compiled. Layout scale still comes from the screen metrics we reseed.

---------

Co-authored-by: Kelvin Amoaba <97001695+AmoabaKelvin@users.noreply.github.com>
2026-11-11 23:30:02 +00:00
Kelvin Amoaba cab41b4075 fix(browser): tell agents when a page waits on a passkey, and let them cancel it (#41048) 2026-11-11 23:27:38 +00:00
Neil 16552ad983 refactor(plugins): organize panel and worker modules by concrete owners (#41277)
* refactor(plugins): group panel and worker modules by owner

* chore(tests): prune retired plugin supervision timeout allowance

* refactor(plugins): consolidate duplicate owner imports
2026-11-11 15:23:33 -08:00
OrcaWinandOrcaWin ce08e6b25e test: remove low-value CLI, mobile, and clipboard cases (#41273)
* test: remove low-value CLI, mobile, and clipboard cases

* test: trim unused keyboard synthesis fakes

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-11 15:16:34 -08:00
Neilandoutof-place 7c38e53284 test: keep real git and shell test fixtures off developer config (#41278)
Disable commit/tag GPG signing via a cached wrapper GIT_CONFIG_GLOBAL when
the developer's global gitconfig enables signing, clear inherited GIT_CONFIG_GLOBAL
in GitBinaryTestFixture, strip inherited TERM_PROGRAM* in Vitest setup, and
run ssh-posix-command-wrapper shell checks against an empty HOME/ZDOTDIR/XDG_CONFIG_HOME.

Fixes #27210

Co-authored-by: outof-place <contact@outofplace.space>
2026-11-11 15:03:49 -08:00
OrcaWinandOrcaWin a9a0e8cd21 test: remove shallow catalog, browser and launch checks (#41258)
* test: remove routine native and catalog suites

* test: remove shallow browser, bridge and CLI checks

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-11 14:44:15 -08:00
Neil 057f5772e9 refactor(mobile): group terminal document modules by domain (#41267) 2026-11-11 14:39:46 -08:00
Neil a44b496f28 refactor(watchers): group filesystem process modules by owner (#41265)
* refactor(watchers): group process modules by concrete owners

* refactor(watchers): consolidate direct limit imports
2026-11-11 14:27:28 -08:00
OrcaWinandOrcaWin b1106ba883 test: remove low-value suites, recorder snapshots, and repeated inputs (#41244)
* test: remove weak recorder scenarios and arithmetic suites

* test: remove low-value boundary suites and recorder cases

* test: remove mock suites and trim repetitive boundary inputs

* test: remove shallow provider and browser checks

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-11 14:14:48 -08:00
Neil 1708f1caee refactor(claude-accounts): organize sign-in and profile owners (#41222) 2026-11-11 13:47:58 -08:00
Brennan BensonandRenato Pires ed31974c2d fix: warn before closing a window with a busy native chat (#40953)
* fix: warn before closing a window with a busy chat

Co-authored-by: Renato Pires <contact@raydev.ca>

* test: cover missing chat status and child-only observations

* fix: synchronize the shared close-warning translation keys

---------

Co-authored-by: Renato Pires <contact@raydev.ca>
2026-11-11 13:30:07 -08:00
Brennan BensonandChristopher Ryu 21f6ec6527 Fix Codex account status for Bedrock providers (#40905)
* Fix Codex account status for Bedrock and other built-in providers

Derive system-default authentication from the configured provider and honor the declared credential mode before reading ChatGPT identity.

Co-authored-by: Christopher Ryu <cryu17@gmail.com>

* Reuse provider classification until canonical config changes

* Bound provider config work and refresh after file removal

* Use portable module counters for provider config regression checks

* Complete the host target in the account warning fixture

* Include the account warning module in Node test typechecking

---------

Co-authored-by: Christopher Ryu <cryu17@gmail.com>
2026-11-11 13:28:16 -08:00
OrcaWinandOrcaWin ee6b0858cf test: remove automatic reply matrices and weak suites (#41238)
* test: remove automatic reply matrices and low-value suites

* test: remove retired matrix timer exceptions

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-11 13:18:44 -08:00
OrcaWinandOrcaWin 6dd068e672 test: remove weak suites and duplicate recorder replays (#41234)
* test: remove weak suites and duplicate recorder replays

* test: satisfy recorder branch lint gate

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-11 12:00:24 -08:00
Kelvin Amoaba 2a3bfb9f01 fix(terminal): keep a launching Codex task's session out of Orca terminals (#41220) 2026-11-11 19:15:18 +00:00
Kelvin Amoaba d46cf4b295 fix(usage): keep deleted worktrees' sessions in the Orca usage totals (#41218)
Usage attribution only knew live worktrees, so deleting one moved its
sessions out of the Orca scope on the next scan and Stats & Usage totals
went down. Remember every worktree Orca has had in a small usage-owned
history and attribute against live plus remembered worktrees, with live
rows claiming reused paths first. The history loads off the main thread,
scans wait for it, and an unreadable or newer file is never overwritten.
2026-11-11 19:07:05 +00:00
OrcaWinandOrcaWin d5f6fe17bf test: remove 129 low-value cases and 21 whole suites (#41210)
* test: remove 83 low-value cases and ten whole suites

* test: remove 46 more low-value cases and eleven suites

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-11 11:03:08 -08:00
Brennan Benson 9a10464bec Make chat wait check the chat's work state instead of reading its history every second (#41129)
* fix(cli): chat wait checks the chat's work state instead of reading its history every second

`orca chat wait` and `orca chat send --wait` polled `agentSession.history` once a second only to
learn whether the chat was still working. Each poll made the host build a transcript page, scan
every retained item twice for the running turn, and send the newest reply's full text, all
ignored by the waiter.

The host now answers `agentSession.workState` with just the facts a wait decides from (working,
a waiting question or approval, queued ids, the next queued send, the fence), and the journal's
running turn comes from its existing per-row turn index instead of a scan. The CLI polls that
read and falls back to history pages on hosts without it. The final transcript read is unchanged.

* test(cli): type the chat wait host test without assertions

* docs(cli): say what a work-state check skips, not that it does no history work

* test(cli): pin the chat wait's exact final reply and its single history read

* docs(cli): name the scan a work-state check skips

* ci: typecheck the chat wait host test with the cross-process test project
2026-11-11 10:53:57 -08:00
Brennan Benson dc13df6962 Keep Git Graph work bounded during scrolling and paging (#40944)
* Keep Git Graph rendering work scoped to visible and appended rows

* Skip graph primitives outside the visible column

* Keep graph viewport callbacks compatible with renderer compilation

* Keep graph scroll restoration tied to the pane owner

* Use typed DOM lookups in the graph viewport test

* Record Git Graph compiler compatibility improvement

* Correct graph retention fixture cleanup and commit boundaries
2026-11-11 10:42:43 -08:00
Brennan Benson 1aadc32e02 Stop polling contextual-copy hints in idle editors (#40886)
* Refresh the editor copy hint from owner events

* Document the bundled editor event type refinement

* Prune the removed editor hint interval allowance
2026-11-11 10:39:27 -08:00
Neil 791aa668dc refactor(opencode): organize provider integration owners (#41192)
* refactor(opencode): organize provider integration owners

* test(opencode): retain unmanaged account environment coverage
2026-11-11 09:42:12 -08:00
OrcaWinandOrcaWin 9576e55773 test: remove 1,144 low-value declarations (#41177)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-11 09:11:06 -08:00
c9ef81809f test: remove 198 low-value test registrations (#41175)
* test: remove 198 low-value test registrations

* ci: fail over unavailable Ubuntu package mirrors (#41174)

* ci: fail over unavailable Ubuntu package mirrors

* fix(ci): recover package retries across headless jobs

* fix(ci): allow complete fallback package index downloads

* fix(ci): recover dpkg locks and bound WebKit setup retries

* fix(ci): run apt deadlines inside sudo sessions

* fix(ci): invoke installed Playwright without root pnpm

* fix(ci): allow large fallback dependency downloads to finish

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
2026-11-11 16:59:03 +00:00
Neil 4b241c1d03 refactor: group Pi provider modules by owner (#41162)
* refactor: group Pi provider modules by owner

* test(pty): retain public provider early-exit coverage
2026-11-11 08:51:39 -08:00
OrcaWinandOrcaWin 0184d8187d test: remove 98 low-value cases and 17 suites (#41124)
* test: remove 60 low-value cases and orphaned conversion fixtures

* docs(ci): list supported Windows SSH host cells

* test: recognize direct Windows orcad server entry

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-11 06:08:53 -08:00
Neil 8ae482379b refactor: use concrete RPC and orchestration owners (#41158) 2026-11-11 05:35:36 -08:00
OrcaWinandOrcaWin 5796c30c97 test: remove 161 low-value cases and 12 suites (#41151)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-11 05:16:06 -08:00
Neil faced26704 refactor: group computer provider owners (#41154) 2026-11-11 05:08:03 -08:00
Neil f6b86ecf62 refactor: group WSL and Orcad migration owners (#41148) 2026-11-11 04:44:42 -08:00
OrcaWinandOrcaWin 3c7d1e1675 test: remove 263 low-value cases across 20 suites (#41144)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-11 04:05:46 -08:00
Neil bfd2bd7486 refactor: group CLI installation and crash lifecycle owners (#41142) 2026-11-11 04:02:20 -08:00
Neil e9e77a5962 refactor: organize GitLab and Linear implementation owners (#41130)
* refactor: organize GitLab and Linear implementation owners

* fix: package moved GitLab parser and consolidate owner import
2026-11-11 03:30:03 -08:00
02e8b0c2a8 fix(skills): sort complete manifest paths before computing package identity (#40812)
Package identity hashed files in a segment-wise depth-first walk order, so a
file like references/refs.md sorted after references/refs/image.webp. The
manifest validators require complete paths in code-unit order, so such
skills failed with skill-bundle-manifest-path-order. Sort the complete
paths by code unit in both the runtime identity and the build-time manifest
generator, and cover the sibling file/directory layout with a round trip.

Co-authored-by: yukurust <76849725+yshi112358@users.noreply.github.com>
Co-authored-by: Neil <neil@stably.ai>
2026-11-11 02:56:01 -08:00
Neil 386afed0ca refactor(persistence): organize profile state and Store domains (#41106)
* refactor(persistence): organize profile state and Store domains

* fix(test): locate relocated profile state worker fixtures
2026-11-11 02:44:06 -08:00
OrcaWinandOrcaWin e5a98cf8a4 test: remove 127 low-value cases and unused observer harness (#41118)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-11 02:20:10 -08:00
OrcaWinandOrcaWin 7d92d106f4 test: remove 168 low-value tests across eleven suites (#41108)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-11 01:59:49 -08:00
OrcaWinandOrcaWin aca88b05cc test: remove 83 low-value test definitions and seven suites (#41098)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-11 01:38:28 -08:00
Neil 2195eae589 refactor(main): group search and profile implementation owners (#41082)
* refactor(main): group search and profile implementation owners

* test(browser): isolate retained preview grant callbacks
2026-11-11 01:02:18 -08:00
OrcaWinandOrcaWin 2d2056b2d0 test: remove 117 low-value test definitions and orphaned fixtures (#41085)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-11 00:49:08 -08:00
OrcaWinandOrcaWin 0db6fe6c44 test: remove 337 low-value test definitions across 13 suites (#41071)
* test: remove 337 low-value test definitions across 13 suites

* test: brace relay assignment fixture conditionals

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-11 00:15:57 -08:00
Kelvin AmoabaandKien Le d8ef014a0c perf(emulator): stream the iOS Simulator pane as H.264 video (#41073)
* perf(emulator): stream iOS Simulator video as H.264

The iOS Simulator pane decoded serve-sim's MJPEG stream (~24 updates/s,
p95 latency 77 ms). serve-sim 0.1.47 already serves /stream.avcc, so iOS
sessions now decode it with WebCodecs (~59 updates/s, 26 ms).

- Main derives the AVCC URL from the session registry by device id; the
  renderer never supplies a stream URL.
- A decode-queue backlog restarts the stream from a fresh keyframe; repeated
  backlog falls back to JPEG.
- Any H.264 failure falls back to JPEG for that session, including a socket
  silent longer than serve-sim's 5 fps idle floor allows. A late idle timer
  after sleep gets a fresh window instead of failing.

* test(emulator): drop the wall-clock simulator video stall tests

They froze the event loop and raced real socket timers, which the repo's test
rules forbid; the JPEG fallback they guard is covered in the renderer test.

* fix(emulator): start the simulator video stall timer at the first byte

serve-sim writes nothing on /stream.avcc until capture starts, so a slow cold
start could trip the 3 s stall and pin the session to JPEG. The renderer's
first-frame timeout already covers the wait before the first byte.

* fix(emulator): re-arm the first-frame timeout when H.264 resyncs

A resync opens a new helper connection, and main's stall watch only starts at
its first byte, so a silent reconnect would freeze the canvas with no JPEG
fallback.

---------

Co-authored-by: Kien Le <122910950+kien-ship-it@users.noreply.github.com>
2026-11-11 08:06:02 +00:00
Neil 280bcbc48a refactor: organize usage and CSV modules by concrete owners (#41059) 2026-11-10 23:26:07 -08:00
OrcaWinandOrcaWin fce98d7d21 test: remove 167 low-value cases and 93 suites (#41057)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-10 23:17:08 -08:00