perf: optimize app startup and background lifecycles

This commit is contained in:
inman
2026-08-19 00:56:15 +08:00
parent 31332f6d76
commit 927e13349b
121 changed files with 4359 additions and 1400 deletions

View File

@@ -12,12 +12,13 @@ type NativeWindowMaterialOptions = Pick<
export function getNativeWindowMaterialOptions(
platform: NodeJS.Platform,
): NativeWindowMaterialOptions {
if (platform !== 'darwin') return {};
// Keep every platform on the same opaque surface. Native vibrancy forces
// transparent compositing and makes every backdrop-filter pay the cost of
// sampling the window behind it. Makelore's light palette already provides
// the visual hierarchy without a native material layer.
return {
backgroundColor: '#00000000',
transparent: true,
vibrancy: 'under-window',
visualEffectState: 'active',
backgroundColor: '#FFFFFF',
transparent: false,
...(platform === 'darwin' ? { visualEffectState: 'inactive' as const } : {}),
};
}