π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Unconditionally enable for internal
Manav Rathi7bdbaec44322
diff --git a/web/packages/new/photos/services/ml/index.ts b/web/packages/new/photos/services/ml/index.tsindex bc7db78572..6de92a6205 100644--- a/web/packages/new/photos/services/ml/index.ts+++ b/web/packages/new/photos/services/ml/index.ts@@ -5,7 +5,6 @@import { isDesktop } from "@/base/app";import { blobCache } from "@/base/blob-cache";import { ensureElectron } from "@/base/electron";-import { isDevBuild } from "@/base/env";import log from "@/base/log";import { masterKeyFromSession } from "@/base/session-store";import type { Electron } from "@/base/types/ipc";@@ -327,16 +326,17 @@ export const mlSync = async () => {const workerDidUnawaitedIndex = () => void updateClustersAndPeople();const updateClustersAndPeople = async () => {- // TODO-Cluster- if (await wipClusterEnable()) {- const masterKey = await masterKeyFromSession();+ if (!(await isInternalUser())) return;- // Fetch existing cgroups from remote.- await pullUserEntities("cgroup", masterKey);+ const masterKey = await masterKeyFromSession();- // Generate or update local clusters.- await (await worker()).clusterFaces(masterKey);- }+ // Fetch existing cgroups from remote.+ await pullUserEntities("cgroup", masterKey);++ // Generate or update local clusters.+ await (await worker()).clusterFaces(masterKey);++ // Update the people shown in the UI.await updatePeople();};@@ -364,14 +364,6 @@ export const indexNewUpload = (enteFile: EnteFile, uploadItem: UploadItem) => {void worker().then((w) => w.onUpload(enteFile, uploadItem));};-/**- * WIP! Don't enable, dragon eggs are hatching here.- * TODO-Cluster- */-export const wipClusterEnable = async (): Promise<boolean> =>- (!!process.env.NEXT_PUBLIC_ENTE_WIP_CL && isDevBuild) ||- (await isInternalUser());-export type MLStatus =| { phase: "disabled" /* The ML remote flag is off */ }| {diff --git a/web/packages/new/photos/services/ml/people.ts b/web/packages/new/photos/services/ml/people.tsindex 827d78acca..79e9152b86 100644--- a/web/packages/new/photos/services/ml/people.ts+++ b/web/packages/new/photos/services/ml/people.ts@@ -1,4 +1,3 @@-import { wipClusterEnable } from ".";import type { EnteFile } from "../../types/file";import { getLocalFiles } from "../files";import { savedCGroups, type CGroup } from "../user-entity";@@ -138,8 +137,6 @@ export type Person = (* reference.*/export const reconstructPeople = async (): Promise<Person[]> => {- if (!(await wipClusterEnable())) return [];-const files = await getLocalFiles("normal");const fileByID = new Map(files.map((f) => [f.id, f]));