/** * Compute a stable offline storage key to use for local/demo mode. * * Defaults to `"noya-local"` when no fileId is provided. A custom namespace * can be supplied to avoid collisions across app contexts. */ export function getOfflineStorageKey( fileId?: string, namespace?: string ): string { if (fileId && fileId.length > 0) return fileId; return namespace ? `${namespace}-local` : "noya-local"; }