thunderbird-patch-review

Easy-to-use patch review interface for Thunderbird

Contribute: ~marcc/thunderbird-review-plugin@lists.sr.ht

git clone git://mccd.space/thunderbird-patch-review

commit 893f427859dd63ba8ee6f2caf092e675617bde35
parent 3834c1b43d97c6b354146ea71f61a59f8cf4bc72
Author: Pi Agent <agent@pi.local>
Date:   Sat, 18 Jul 2026 12:52:45 +0200

review: auto-dismiss non-error status notices after 5s

showStatus starts a 5s timer for non-error notices and clears it on
hideStatus or a subsequent showStatus; errors stay until manually closed
so they are not lost.

Diffstat:
Mextension/review/review.js | 14++++++++++++++
1 file changed, 14 insertions(+), 0 deletions(-)
diff --git a/extension/review/review.js b/extension/review/review.js
@@ -558,14 +558,28 @@ $("#btn-open-editor").addEventListener("click", () => openEditor($("#repo-path")
 // ---------------------------------------------------------------------------
 // Status panel
 
+let statusTimer = null;
+
 function showStatus(text, { error = false, editor = null } = {}) {
+  if (statusTimer) {
+    clearTimeout(statusTimer);
+    statusTimer = null;
+  }
   $("#status-text").textContent = text;
   $("#status-text").classList.toggle("error", error);
   $("#btn-open-editor").hidden = !editor;
   $("#status").hidden = false;
+  // Auto-dismiss non-error notices after a few seconds; errors stay until closed.
+  if (!error) {
+    statusTimer = setTimeout(hideStatus, 5000);
+  }
 }
 
 function hideStatus() {
+  if (statusTimer) {
+    clearTimeout(statusTimer);
+    statusTimer = null;
+  }
   $("#status").hidden = true;
 }