π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Prune comments, add preload sync note
Manav Rathi5a76bf5217ab
diff --git a/desktop/src/preload.ts b/desktop/src/preload.tsindex ce10b6b3a8..a19062af17 100644--- a/desktop/src/preload.ts+++ b/desktop/src/preload.ts@@ -3,6 +3,8 @@// Node's ReadableStream types; see main/utils/stream.ts./// <reference lib="dom" />+// Keep the exposed bridge in sync with web/packages/base/types/ipc.ts.+import { contextBridge, ipcRenderer, webUtils } from "electron/renderer";import type { IpcRendererEvent } from "electron";diff --git a/web/apps/albums/src/public-album/components/TripLayout/utils/dataProcessing.ts b/web/apps/albums/src/public-album/components/TripLayout/utils/dataProcessing.tsindex 73c5d3e35d..22624cff39 100644--- a/web/apps/albums/src/public-album/components/TripLayout/utils/dataProcessing.ts+++ b/web/apps/albums/src/public-album/components/TripLayout/utils/dataProcessing.ts@@ -96,7 +96,6 @@ export const fetchLocationNames = async ({);return { cluster, locationInfo };} catch {- // Return null on error, will be filtered outreturn null;}});@@ -104,7 +103,7 @@ export const fetchLocationNames = async ({const results = await Promise.all(geocodingPromises);results.forEach((result) => {- if (!result) return; // Skip failed requests+ if (!result) return;const { cluster, locationInfo } = result;cluster.forEach((photo) => {diff --git a/web/apps/albums/src/public-album/components/TripLayout/utils/geocoding.ts b/web/apps/albums/src/public-album/components/TripLayout/utils/geocoding.tsindex 33b476bded..ec8ef3806f 100644--- a/web/apps/albums/src/public-album/components/TripLayout/utils/geocoding.ts+++ b/web/apps/albums/src/public-album/components/TripLayout/utils/geocoding.ts@@ -86,7 +86,6 @@ export const getLocationName = async (return result;} catch {- // Fallback on errorreturn { place: "Unknown", country: "Unknown" };}};diff --git a/web/apps/albums/src/public-album/page/PublicAlbumPage.tsx b/web/apps/albums/src/public-album/page/PublicAlbumPage.tsxindex ed223aa66e..eee9e456a8 100644--- a/web/apps/albums/src/public-album/page/PublicAlbumPage.tsx+++ b/web/apps/albums/src/public-album/page/PublicAlbumPage.tsx@@ -334,7 +334,6 @@ export default function PublicAlbumPage() {}};main();- // TODO:// eslint-disable-next-line react-hooks/exhaustive-deps}, []);diff --git a/web/apps/photos/src/components/PlanSelector.tsx b/web/apps/photos/src/components/PlanSelector.tsxindex bf26872b20..22247c7487 100644--- a/web/apps/photos/src/components/PlanSelector.tsx+++ b/web/apps/photos/src/components/PlanSelector.tsx@@ -154,7 +154,6 @@ const PlanSelectorCard: React.FC<PlanSelectorCardProps> = ({setLoading(false);}})();- // TODO// eslint-disable-next-line react-hooks/exhaustive-deps}, []);diff --git a/web/apps/photos/src/components/WatchFolder.tsx b/web/apps/photos/src/components/WatchFolder.tsxindex e9d1b7e72c..59fc2d725e 100644--- a/web/apps/photos/src/components/WatchFolder.tsx+++ b/web/apps/photos/src/components/WatchFolder.tsx@@ -83,7 +83,6 @@ export const WatchFolder: React.FC<ModalVisibilityProps> = ({return () => {removeEventListener("drop", handleWatchFolderDrop);};- // TODO:// eslint-disable-next-line react-hooks/exhaustive-deps}, [open]);diff --git a/web/apps/photos/src/services/watch.ts b/web/apps/photos/src/services/watch.tsindex 53b9bc69f0..4f010614c3 100644--- a/web/apps/photos/src/services/watch.ts+++ b/web/apps/photos/src/services/watch.ts@@ -35,7 +35,6 @@ class FolderWatcher {private debouncedRunNextEvent: () => void;constructor() {- // TODO:// eslint-disable-next-line @typescript-eslint/no-misused-promisesthis.debouncedRunNextEvent = debounce(() => this.runNextEvent(), 1000);}diff --git a/web/packages/gallery/components/FileInfo.tsx b/web/packages/gallery/components/FileInfo.tsxindex 4a5f7a6d05..39449fc383 100644--- a/web/packages/gallery/components/FileInfo.tsx+++ b/web/packages/gallery/components/FileInfo.tsx@@ -1,9 +1,5 @@/* eslint-disable @typescript-eslint/ban-ts-comment */// TODO: Split this file to deal with the ente-new/photos imports.-// 1. Move common components into FileInfoComponents.tsx-// 2. Move the rest out to files in the apps themselves:-// - albums/SharedFileInfo-// - photos/FileInfoimport CalendarTodayIcon from "@mui/icons-material/CalendarToday";import CameraOutlinedIcon from "@mui/icons-material/CameraOutlined";diff --git a/web/packages/gallery/services/files-db.ts b/web/packages/gallery/services/files-db.tsindex 288bd5e185..2039b62a15 100644--- a/web/packages/gallery/services/files-db.ts+++ b/web/packages/gallery/services/files-db.ts@@ -123,39 +123,15 @@ export const LocalEnteFile = z.looseObject({export const LocalEnteFiles = z.array(LocalEnteFile);-/**- * Apply transformations when reading files from the DB.- *- * There are two parts to it -- *- * 1. the required part (patching old entries that might be present in the local- * database),- * 2. the optional part (removing some unused fields).- *- * Part 1 ---- *- * Transform metadata in legacy files that might be present in the local- * database. Note that this will not be needed for files that are fetched- * afresh, since the corresponding transform is already done during- * {@link decryptRemoteFile}; this is only for handling potentially items that- * might've been already present locally.- *- * Part 2 ---- *- * Remove unused fields from the file objects when reading them.- *- * This is similar to the transformation we perform when reading collections- * from the database, to discard fields that are no longer forwarded when we- * parse the remote object, and thus will not be present in the local DB either- * when going forward. They might be present for the existing entries in DB- * though, which is why these functions are needed.- *- * However, since unlike collections, we don't route the files through Zod when- * reading. So instead we do it using this function. Effectively, the end result- * should be the same. In any case, doing this cleanup has no functional impact.- *- * Both parts added June 2025, 1.7.14-beta, prune eventually (tag: Migration).- */+// Two transforms when reading files from the DB, both added June 2025,+// 1.7.14-beta, prune eventually (tag: Migration):+//+// 1. Patch metadata of legacy entries. Freshly fetched files get this+// transform in decryptRemoteFile; this handles items that were already+// present locally.+// 2. Drop fields we no longer forward when parsing the remote object. The+// collections DB does this via its Zod read transform; files are not+// routed through Zod when reading, so it happens here instead.export const transformFilesIfNeeded = (files: EnteFile[]) =>isFilesTransformNeeded(files) ? files.map(transformFile) : files;