Commit Graph
11 Commits
Author SHA1 Message Date
OrcaWinandOrcaWin c7ff101424 Remove 40 low-value test suites and redundant cases (#40126)
* Remove low-value ACP, hook and renderer test suites

* Remove low-value shared automation and agent test cases

* Remove low-value packaging and mobile probe test cases

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-08 20:33:33 -08:00
OrcaWin a2d490700b build: enable React Compiler for the renderer and web build (#39811) 2026-11-08 19:41:47 -08:00
Brennan Benson 1d28b8882c chore(ratchets): fail PRs that add sync fs calls on Electron main or new setInterval polls (#39930)
* chore(ratchets): count sync fs calls on Electron main and setInterval calls

Sync fs on main and fixed-cadence intervals that never settle were two of the
most common perf fix classes since September, and no gate counted them. Both
ratchets grandfather today's uses per file and fail when a file's count grows.

* chore(ratchets): count every sync fs export, src/shared and node:timers intervals

Review: the allow-list missed descriptor/copy APIs, src/shared helpers run on
main too, and setInterval imported from node:timers escaped the timer count.

* chore(ratchets): keep hosted setInterval calls beside a named timer import

Review: a named node:timers import zeroed window/globalThis calls too, a
destructured require was counted twice, and collector edits didn't select
the timer ratchet in check:changed.

* chore(ratchets): charge calls through an alias, not the alias binding

Decider ruling B on review finding C6: binding a plain alias of a gated call
counted as a use, so an alias refactor failed every collector-based ratchet.
Conditional/fallback aliases and exported bindings stay charged.

* chore(ratchets): count bare setInterval only when nothing local shadows it

Review: the timer ratchet kept its own narrower binding resolver, so alias
and namespace-destructure forms of an imported setInterval counted twice.
Module bindings are the shared collector's; a bare call is the global only
when the file declares no setInterval binding.

* chore(ratchets): resolve bare setInterval calls per scope

Decider ruling A: the file-wide shadow rule let an unrelated parameter or type
declaration named setInterval hide every global poll in the file. Each bare
call now resolves through a single-file TypeScript checker (noLib, noResolve)
and counts when it binds to nothing declared in the file.

* chore(ratchets): write the timer baseline exactly as --prune does

* chore(ratchets): charge global timer aliases and bracket access

CodeRabbit: `const schedule = setInterval; schedule(poll)` and
`window['setInterval'](poll)` counted zero. Count value references to the
global timer (per scope) instead of only direct calls.

* chore(ratchets): charge shorthand timer escapes; skip writes, typeof and JSX tags

Review: `{ setInterval }` of the global counted 0, while assignments to it,
parenthesized typeof probes and a <setInterval/> tag counted 1.

* chore(ratchets): charge compound assignments to the global timer

Review: `||=` and `??=` read setInterval before writing it, so only a
plain `=` target is write-only.

* chore(ratchets): regenerate baselines for files main moved

main's SSH reorganisation moved counted files under src/main/ssh and
src/main/managed-server; counts are unchanged except one sync fs call main
removed.
2026-11-08 13:34:07 -08:00
Neilandm4air dddc1260e5 chore(lint): oxlint 1.91, cheap perf/correctness rules, return-await fixes (#39730)
* chore(lint): bump oxlint to 1.91, add perf lint rules and perf audits

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

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

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

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

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

---------

Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
2026-11-08 06:21:54 -08:00
346dcae485 perf(test): default check:changed unit tests to two Vitest workers (#39849)
Plain local pnpm test keeps automatic sizing; explicit --maxWorkers still wins.

Co-authored-by: m4air <m4air@m4airs-MacBook-Air.local>
Co-authored-by: nwparker <4138956+nwparker@users.noreply.github.com>
2026-11-08 04:53:17 -08:00
OrcaWinandOrcaWin 60003df154 feat(i18n): make render-path translation reactive to the UI language (#39353)
Add useTranslate()/useIntlLocale() backed by a TranslationScopeProvider whose key
changes only with the active language or its own resources, an AST codemod that
rewrites render-path translate()/getIntlLocale() calls and threads the hook values
into render-called helpers, a helper analysis report, and a ratchet that keeps
render-path module translate() calls from growing. Apply the codemod to
components/native-chat.

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 13:44:33 -08:00
OrcaWinandOrcaWin 75910ba631 build(renderer): gate React Compiler compatibility with a ratchet (#39324)
Adds oxc-transform-react as a devDependency and a ratchet that runs React
Compiler in analysis mode over the shipped renderer sources. Files can't gain
bailouts (new files must compile fully), and new code the compiler would run
differently is banned: hooks it memoizes into a cached block, bare `void x;`
reads, member postfix updates used as values, and "use no memo" opt-outs.
Both baselines are generated by --update / --prune.

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 00:42:01 -08:00
OrcaWinandOrcaWin eecd4dc6d5 perf(renderer): derive state instead of syncing it in effects (surfaces) (#38797)
Replace setState-only effects with render-time adjustment (prev-value or
self-limiting guard) so prop changes no longer commit a stale render and
then re-render. Drop the now-obsolete no-derived-state-effect suppression
for use-combined-diff-view-preferences.ts.

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-05 19:33:45 -08:00
OrcaWinandOrcaWin 384b445585 test: remove 143 low-value tests and 13 entire suites (#38614)
* test: remove report inventories and dependency policy replays

* test: remove lint rule inventories and release mock replays

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-05 10:27:41 -08:00
Neil 6bb2e13c35 refactor(tooling): organize remaining scripts by domain owners (#38407)
* refactor(tooling): group remaining scripts by concrete domain owners

* fix(tooling): preserve relocated launcher resource roots
2026-11-05 00:29:16 -08:00
Neil 9bd6272fdf refactor(tooling): organize build, CI, and test owners (#38130)
* refactor(tooling): organize test runtime and maintenance owners

* test(tooling): preserve relocated runtime fixture dependency edges

* refactor(tooling): preserve xterm routing owner checks

* ci(tooling): include routing owner in sparse checkout

* test(tooling): preserve copied workflow dependency closures

* fix(tooling): normalize hashed JSON assets in release parity

* fix(tooling): distinguish asset aliases from literal references

* fix(tooling): frame normalized asset reference payloads

* fix(tooling): normalize decoded JSON asset references

* refactor(tooling): organize build, CI and release owners

* fix(tooling): align moved generator and workflow path contracts

* fix(tooling): update generated plugin bundle owner banners

* test(tooling): create relocated mobile verifier fixture directories

* test(tooling): copy headless detector dependency closure

* test(tooling): align native batch policy fixtures with owner path

* fix(tooling): link moved reliability command to historical evidence

* fix(tooling): preserve nested sandbox owners and canonical guide source

* fix(tooling): target release version owners in checkout fixture
2026-11-04 21:08:19 -08:00