From: Willy Tarreau Date: Mon, 6 Jul 2026 18:45:22 +0000 (+0200) Subject: DEV: patchbot: repeat the syncing buttons at the bottom of the page X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/$%7BGITURL%7D/1?a=commitdiff_plain;h=f245b158342a701a8ccf0fec207d1f6bf2968b2e;p=haproxy.git DEV: patchbot: repeat the syncing buttons at the bottom of the page The "Get updates" and "Save changes" buttons only existed at the top right of the page, while a review session ends at the bottom of the table: with no button left in sight there, it was way too easy to forget to save the work. Emit a copy of both buttons and of the status line at the bottom right, sharing the same handlers; the status message and the save-button graying are applied to both instances at once so the two spots always tell the same story. --- diff --git a/dev/patchbot/scripts/post-ai.sh b/dev/patchbot/scripts/post-ai.sh index 8d53753fb..5131662e5 100755 --- a/dev/patchbot/scripts/post-ai.sh +++ b/dev/patchbot/scripts/post-ai.sh @@ -257,10 +257,15 @@ function init_ref() { updt_save_btn(); } +// the status line and the save button exist twice, at the top and at the +// bottom of the page, so both instances are always updated together function sync_msg(m) { var el = document.getElementById("sync_msg"); if (el) el.innerText = m; + el = document.getElementById("sync_msg2"); + if (el) + el.innerText = m; } // renders the reference notes of line by replacing the whole container @@ -466,6 +471,7 @@ function cancel_note(i) { // change so the common case stays cheap. function updt_save_btn() { var btn = document.getElementById("save_btn"); + var btn2 = document.getElementById("save_btn2"); var pending = false; var i, s, el; @@ -482,6 +488,8 @@ function updt_save_btn() { } } btn.disabled = !pending; + if (btn2) + btn2.disabled = !pending; } // "Save changes" button: pushes the local edits, i.e. the states differing @@ -916,6 +924,17 @@ done echo "New
CIDSubjectVerdict
N U W Y
Reason" echo "" + +# a copy of the syncing buttons at the bottom right: that's where the user +# ends up after a review, far from the top ones, and forgetting to save the +# work is too easy when no button remains in sight +if [ -n "$VERSION" ]; then + echo -n "
" + echo -n " " + echo -n "" + echo "
" +fi + echo "

" echo "

Output:

" echo ""