thunderbird-patch-review

Simple email patch review tool for Thunderbird

git clone git://mccd.space/thunderbird-patch-review
commit 5a0a10d4d3abae6347354203f9dfd4f2356c761c
parent 316273f6eedde47669f8037e09ba7115f34832ac
Author: Pi Agent <agent@pi.local>
Date:   Sun, 19 Jul 2026 10:43:12 +0200

review: hover Send review when disabled says a comment is needed

The Send review button is disabled until a comment exists (or, on
sourcehut series, a patchset-status update is on the table), with no
hint as to why. Reassign the title in updateCount() so the disabled
state reads 'Add at least one comment before sending a review.' and the
enabled state keeps its original tooltip.

Diffstat:
Mextension/review/review.js | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/extension/review/review.js b/extension/review/review.js
@@ -481,6 +481,11 @@ function updateCount() {
   const canSend = total > 0 || state.isSourcehut;
   $("#btn-send").disabled = !canSend;
   $("#send-split").querySelector(".menu-toggle").disabled = !canSend;
+  // Hovering a disabled Send review tells the user what's missing. The
+  // enabled-state tooltip is the original one in review.html.
+  $("#btn-send").title = canSend
+    ? "Send one reply per commented patch"
+    : "Add at least one comment before sending a review.";
   // The title is independent of the button-pluralization below; update it
   // first so a failure in the latter cannot leave the count stale.
   renderSeriesTitle();