π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
fix(ensu): resolve web lint and desktop clippy
Prateek Sunalc1c769a4d85f
diff --git a/rust/apps/ensu/src-tauri/src/commands.rs b/rust/apps/ensu/src-tauri/src/commands.rsindex fabad2f59e..27a915beca 100644--- a/rust/apps/ensu/src-tauri/src/commands.rs+++ b/rust/apps/ensu/src-tauri/src/commands.rs@@ -1,7 +1,7 @@use std::collections::HashMap;use std::fs;use std::io::{Read, Write};-use std::path::PathBuf;+use std::path::{Path, PathBuf};#[cfg(target_os = "macos")]use std::process::Command;use std::sync::{Arc, Mutex};@@ -1770,7 +1770,7 @@ fn verify_migrated_chat_db(source_message_ids_by_session: &HashMap<Uuid, Vec<Uuid>>,migrated_meta_keys: &[&str],target_sync_state: &SyncStateDb<SqliteBackend>,- target_attachments_dir: &PathBuf,+ target_attachments_dir: &Path,expected_attachment_ids: &[String],) -> Result<(), ApiError> {let target_session_ids = target_dbdiff --git a/web/apps/ensu/src/pages/chat.tsx b/web/apps/ensu/src/pages/chat.tsxindex ce10b54dbd..098c8daa2e 100644--- a/web/apps/ensu/src/pages/chat.tsx+++ b/web/apps/ensu/src/pages/chat.tsx@@ -1855,11 +1855,7 @@ const Page: React.FC = () => {delete attachmentPreviewInFlightRef.current[attachment.id];}},- [- chatKey,- firstPaintDone,- inferImageMime,- ],+ [chatKey, firstPaintDone, inferImageMime],);useEffect(() => {@@ -2795,11 +2791,7 @@ const Page: React.FC = () => {setPendingImages([]);}},- [- chatKey,- showMiniDialog,- inferImageMime,- ],+ [chatKey, showMiniDialog, inferImageMime],);const handleCancelEdit = useCallback(() => {@@ -2905,12 +2897,7 @@ const Page: React.FC = () => {});}},- [- chatKey,- inferImageMime,- isTauriRuntime,- showMiniDialog,- ],+ [chatKey, inferImageMime, isTauriRuntime, showMiniDialog],);const flushStreamingText = useCallback(() => {diff --git a/web/apps/ensu/src/services/chat/chatKey.ts b/web/apps/ensu/src/services/chat/chatKey.tsindex 7e8d81b0a9..6c8e7a4de2 100644--- a/web/apps/ensu/src/services/chat/chatKey.ts+++ b/web/apps/ensu/src/services/chat/chatKey.ts@@ -171,7 +171,8 @@ export const initChatKeyStore = async () => {_chatKeyStoreInitUserID = userID;_chatKeyStoreInitPromise = (async () => {const remoteStorageKey = scopedRemoteChatKeySecureStorageKey();- const legacyRemoteStorageKey = scopedLegacyRemoteChatKeySecureStorageKey();+ const legacyRemoteStorageKey =+ scopedLegacyRemoteChatKeySecureStorageKey();const remoteLocalStorageKey = scopedRemoteChatKeyLocalStorageKey();const [secureRemoteChatKey,@@ -179,24 +180,23 @@ export const initChatKeyStore = async () => {legacySecureRemoteChatKey,legacySecureLocalChatKey,nativeKeys,- ] =- await Promise.all([- remoteStorageKey- ? secureStorageGet(remoteStorageKey).catch(() => undefined)- : Promise.resolve(undefined),- secureStorageGet(LOCAL_CHAT_KEY_SECURE_STORAGE_KEY).catch(- () => undefined,- ),- legacyRemoteStorageKey- ? secureStorageGet(legacyRemoteStorageKey).catch(- () => undefined,- )- : Promise.resolve(undefined),- secureStorageGet(LEGACY_LOCAL_CHAT_KEY_SECURE_STORAGE_KEY).catch(- () => undefined,- ),- readNativeChatKeys(),- ]);+ ] = await Promise.all([+ remoteStorageKey+ ? secureStorageGet(remoteStorageKey).catch(() => undefined)+ : Promise.resolve(undefined),+ secureStorageGet(LOCAL_CHAT_KEY_SECURE_STORAGE_KEY).catch(+ () => undefined,+ ),+ legacyRemoteStorageKey+ ? secureStorageGet(legacyRemoteStorageKey).catch(+ () => undefined,+ )+ : Promise.resolve(undefined),+ secureStorageGet(LEGACY_LOCAL_CHAT_KEY_SECURE_STORAGE_KEY).catch(+ () => undefined,+ ),+ readNativeChatKeys(),+ ]);const legacyRemoteChatKey =legacySecureRemoteChatKey ??(remoteLocalStorageKeydiff --git a/web/apps/ensu/src/services/chat/store.ts b/web/apps/ensu/src/services/chat/store.tsindex d014cc0b02..71bb91853f 100644--- a/web/apps/ensu/src/services/chat/store.ts+++ b/web/apps/ensu/src/services/chat/store.ts@@ -849,12 +849,7 @@ const migrateLegacyNativeChatStoreToV2 = async (chatKey: string) => {try {const result = await invokeChat<NativeLegacyMigrationResult>("chat_db_migrate_legacy",- {- input: {- keyB64: chatKey,- legacyKeyB64: candidateKey,- },- },+ { input: { keyB64: chatKey, legacyKeyB64: candidateKey } },);if (result.didMigrate) {log.info("Migrated legacy native chat store to v2 DB", result);