Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/main/window/createMainWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import { rectHasVisibleAreaOnAnyDisplay } from './presentation/window-bounds-val
import { installWindowsPathRegistryChangeListener } from '../pty/environment/windows-path-registry-change'
import { recordAgentSessionRuntimeEnd } from '../runtime/agent-session/records/agent-session-runtime-end-record'
import { installNativeUnloadCoordinator } from './renderer-relays/native-unload-coordinator'
import { MAIN_THREAD_ANIMATION_ARGUMENTS } from './presentation/main-thread-animation-arguments'

// Node warns past this many listeners per event name. Headroom above normal subsystem fan-out,
// still low enough that a real leak warns. Per-request listeners belong on addFanoutListener,
Expand Down Expand Up @@ -169,6 +170,7 @@ export function createMainWindow(
webviewTag: true,
// Pass host identity at birth so the renderer has it before first snapshot, without waiting for IPC registration.
additionalArguments: [
...MAIN_THREAD_ANIMATION_ARGUMENTS,
formatBrowserClientHostIdArgument(getBrowserClientHostId()),
...(windowMaterial === 'off' ? [] : [formatWindowMaterialArgument(windowMaterial)]),
...(pumpHiddenFrames ? [formatHiddenWindowFramePumpArgument()] : []),
Expand Down
3 changes: 2 additions & 1 deletion src/main/window/dashboard-popout-window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import type {
KeybindingOverrides
} from '../../shared/keybindings/types'
import { wslHostsWindowArguments } from '../wsl/host-lifecycle/wsl-host-gate'
import { MAIN_THREAD_ANIMATION_ARGUMENTS } from './presentation/main-thread-animation-arguments'
import { isMacAppPasteInput } from './editing/mac-app-paste-input'

const MIN_WIDTH = 480
Expand Down Expand Up @@ -168,7 +169,7 @@ export function createOrFocusDashboardPopout(
partition: DASHBOARD_POPOUT_PARTITION,
// No webviews run here; disable embedding and omit host identity so client-placed pages stay mirrors.
webviewTag: false,
...(wslArguments.length > 0 ? { additionalArguments: wslArguments } : {})
additionalArguments: [...MAIN_THREAD_ANIMATION_ARGUMENTS, ...wslArguments]
}
})
installPrivilegedWindowNavigationPolicy(window.webContents)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// A compositor animation ticking through a multi-second main-thread task wedges Chromium's frame sorter,
// pinning a compositor core until the window hides (#14882); main-thread animations pause with the task.
export const MAIN_THREAD_ANIMATION_ARGUMENTS: readonly string[] = ['--disable-threaded-animation']
3 changes: 2 additions & 1 deletion src/main/window/workspace-space-window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
type UIZoomDirection
} from '../../shared/app-lifecycle/windows/ui-zoom-level'
import { wslHostsWindowArguments } from '../wsl/host-lifecycle/wsl-host-gate'
import { MAIN_THREAD_ANIMATION_ARGUMENTS } from './presentation/main-thread-animation-arguments'

let spaceWindow: BrowserWindow | null = null

Expand Down Expand Up @@ -67,7 +68,7 @@ export function createOrFocusWorkspaceSpaceWindow(store: Store): BrowserWindow {
sandbox: true,
partition: 'orca-workspace-space-window',
webviewTag: false,
...(wslArguments.length > 0 ? { additionalArguments: wslArguments } : {})
additionalArguments: [...MAIN_THREAD_ANIMATION_ARGUMENTS, ...wslArguments]
}
})
spaceWindow = window
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/assets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -2094,7 +2094,7 @@ html.native-shell .app-layout {
grid-template-rows: 1fr;
}

/* Keep rotation on the compositor: JS style writes caused typing stalls (#12359). */
/* Keep rotation in CSS: JS style writes caused typing stalls (#12359). */
/* One day per iteration avoids per-second React animation events; still 12 steps/second. */
@keyframes agent-spinner-rotate {
to {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/components/AgentWorkingSpinner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function observeSpinner(el: HTMLSpanElement): () => void {
return observeOffscreenAnimation(el)
}

// CSS compositor rotation avoids JS input-thread work; callers provide size.
// CSS rotation avoids JS style writes; callers provide size.
export function AgentWorkingSpinner({ className }: { className?: string }): React.JSX.Element {
return (
<span
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Running CSS animations make the compositor tick every refresh even when scrolled out of view or clipped.
// Running CSS animations make the renderer produce a frame every refresh even when scrolled out of view or clipped.
export const OFFSCREEN_ANIMATION_ATTRIBUTE = 'data-animation-offscreen'

let observer: IntersectionObserver | null = null
Expand Down