Merge "CachedPreferences tests: readability improvements to `assertPrefs`"
diff --git a/java/com/google/gerrit/server/change/MergeabilityCacheImpl.java b/java/com/google/gerrit/server/change/MergeabilityCacheImpl.java
index 44af1e4..7097eb8 100644
--- a/java/com/google/gerrit/server/change/MergeabilityCacheImpl.java
+++ b/java/com/google/gerrit/server/change/MergeabilityCacheImpl.java
@@ -221,6 +221,9 @@
   @Override
   public Boolean getIfPresent(
       ObjectId commit, Ref intoRef, SubmitType submitType, String mergeStrategy) {
-    return cache.getIfPresent(new EntryKey(commit, toId(intoRef), submitType, mergeStrategy));
+    EntryKey entryKey = new EntryKey(commit, toId(intoRef), submitType, mergeStrategy);
+    Boolean mergeable = cache.getIfPresent(entryKey);
+    logger.atFine().log("got mergeable=%s (entryKey=%s)", mergeable, entryKey);
+    return mergeable;
   }
 }
diff --git a/java/com/google/gerrit/server/git/MergeUtil.java b/java/com/google/gerrit/server/git/MergeUtil.java
index 86893c1..beb6097 100644
--- a/java/com/google/gerrit/server/git/MergeUtil.java
+++ b/java/com/google/gerrit/server/git/MergeUtil.java
@@ -785,6 +785,7 @@
       CodeReviewCommit mergeTip,
       CodeReviewCommit toMerge) {
     if (hasMissingDependencies(mergeSorter, toMerge)) {
+      logger.atFine().log("%s cannot be merged due to missing dependencies", toMerge.name());
       return false;
     }
 
@@ -795,9 +796,11 @@
     try (ObjectInserter ins = new InMemoryInserter(repo)) {
       return newThreeWayMerger(ins, repo.getConfig()).merge(mergeTip, toMerge);
     } catch (LargeObjectException e) {
-      logger.atWarning().log("Cannot merge due to LargeObjectException: %s", toMerge.name());
+      logger.atWarning().log("%s cannot be merged due to LargeObjectException", toMerge.name());
       return false;
     } catch (NoMergeBaseException e) {
+      logger.atFine().log(
+          "%s cannot be merged because no merge base could be found", toMerge.name());
       return false;
     } catch (IOException e) {
       throw new StorageException("Cannot merge " + toMerge.name(), e);
diff --git a/polygerrit-ui/app/elements/diff/gr-apply-fix-dialog/gr-apply-fix-dialog.ts b/polygerrit-ui/app/elements/diff/gr-apply-fix-dialog/gr-apply-fix-dialog.ts
index 5319c90..3bb89d4 100644
--- a/polygerrit-ui/app/elements/diff/gr-apply-fix-dialog/gr-apply-fix-dialog.ts
+++ b/polygerrit-ui/app/elements/diff/gr-apply-fix-dialog/gr-apply-fix-dialog.ts
@@ -441,6 +441,8 @@
       fileExtension: getFileExtension(
         this.fixSuggestions?.[0].replacements?.[0].path ?? ''
       ),
+      success: res.ok,
+      status: res.status,
     });
   }
 }
diff --git a/polygerrit-ui/app/elements/shared/gr-suggestion-diff-preview/gr-suggestion-diff-preview.ts b/polygerrit-ui/app/elements/shared/gr-suggestion-diff-preview/gr-suggestion-diff-preview.ts
index 93f17c8..813ee29 100644
--- a/polygerrit-ui/app/elements/shared/gr-suggestion-diff-preview/gr-suggestion-diff-preview.ts
+++ b/polygerrit-ui/app/elements/shared/gr-suggestion-diff-preview/gr-suggestion-diff-preview.ts
@@ -280,6 +280,8 @@
         fixSuggestion?.replacements?.[0].path ?? ''
       ),
       commentId: this.commentId ?? '',
+      success: res.ok,
+      status: res.status,
     });
     if (res?.ok) {
       this.getNavigation().setUrl(