code: private void onUploadFinished() {
          if (artifactUploadState.areAllUploadsFinished() && artifactUploadState.isStatusPopupMinimized()) {
              if (artifactUploadState.getFilesInFailedState().isEmpty()) {
                  cleanupStates();
                  closeWindow();
              } else {
                  maximizeWindow();
              }
          }
      }
docs: Called for every finished (succeeded or failed) upload.