optimize the app upgrade policy and the UI