refactor(ipc): complete tauri-specta typed-IPC cutover, contract guards, and layering cleanup (#1230)

This commit is contained in:
Psychotoxical
2026-07-04 16:00:31 +02:00
committed by GitHub
parent fdbb9deac6
commit 77ab95170d
199 changed files with 3691 additions and 1252 deletions
@@ -1,5 +1,5 @@
import { useEffect, useState } from 'react';
import { invoke } from '@tauri-apps/api/core';
import { themeAnimationRisk } from '@/lib/api/platformShell';
import { IS_LINUX } from '@/lib/util/platform';
/**
@@ -27,7 +27,7 @@ export function useThemeAnimationRisk(): boolean {
return;
}
let alive = true;
const p = invoke<boolean>('theme_animation_risk');
const p = themeAnimationRisk();
// Guard the mocked-in-tests case where invoke isn't a real promise.
if (p && typeof (p as Promise<boolean>).then === 'function') {
(p as Promise<boolean>)