refactor: remove legacy Tauri desktop support

Electron updater now uses Electron release metadata only
Removed legacy Tauri package and migration workflow
Replaced Tauri shim usage with the desktop bridge
This commit is contained in:
Bohdan Triapitsyn
2026-06-03 02:42:00 +03:00
parent e80bd15dd9
commit c7bc026b4b
81 changed files with 269 additions and 16914 deletions
+13 -19
View File
@@ -1,17 +1,12 @@
import { isTauriShell } from '@/lib/desktop';
import { hasDesktopInvoke, invokeDesktop } from '@/lib/desktop';
type TauriInvoke = (cmd: string, args?: Record<string, unknown>) => Promise<unknown>;
type DesktopInvoke = (cmd: string, args?: Record<string, unknown>) => Promise<unknown>;
type TauriGlobal = {
core?: {
invoke?: TauriInvoke;
};
event?: {
listen?: (
event: string,
handler: (evt: { payload?: unknown }) => void,
) => Promise<() => void>;
};
type DesktopBridgeGlobal = {
listen?: (
event: string,
handler: (evt: { payload?: unknown }) => void,
) => Promise<() => void>;
};
export type DesktopSshRemoteMode = 'managed' | 'external';
@@ -126,10 +121,9 @@ const asStringArray = (value: unknown): string[] => {
return value.filter((item): item is string => typeof item === 'string');
};
const getInvoke = (): TauriInvoke | null => {
if (!isTauriShell()) return null;
const tauri = (window as unknown as { __TAURI__?: TauriGlobal }).__TAURI__;
return typeof tauri?.core?.invoke === 'function' ? tauri.core.invoke : null;
const getInvoke = (): DesktopInvoke | null => {
if (!hasDesktopInvoke()) return null;
return (command, args) => invokeDesktop(command, args) as Promise<unknown>;
};
const parseStoredSecret = (value: unknown): DesktopSshStoredSecret | undefined => {
@@ -432,12 +426,12 @@ export const desktopSshLogsClear = async (id: string): Promise<void> => {
export const listenDesktopSshStatus = async (
listener: (status: DesktopSshInstanceStatus) => void,
): Promise<() => Promise<void>> => {
if (!isTauriShell()) {
if (!hasDesktopInvoke()) {
return async () => {};
}
const tauri = (window as unknown as { __TAURI__?: TauriGlobal }).__TAURI__;
const listen = tauri?.event?.listen;
const desktop = (window as unknown as { __OPENCHAMBER_DESKTOP__?: DesktopBridgeGlobal }).__OPENCHAMBER_DESKTOP__;
const listen = desktop?.listen;
if (typeof listen !== 'function') {
return async () => {};
}