]> git.kaiwu.me - haproxy.git/commit
DEV: patchbot: let the page save the review edits to the server
authorWilly Tarreau <w@1wt.eu>
Mon, 6 Jul 2026 14:29:32 +0000 (16:29 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 7 Jul 2026 12:45:19 +0000 (14:45 +0200)
commit0ed6d1f840cf74da5ad9e7650a395a7256c7f23a
treebb118d5f04314137763cb6df09852fd738e54d0d
parent635d91aad92a341ff5f80d10908a19140cee3ac1
DEV: patchbot: let the page save the review edits to the server

This is the write side of the review syncing: a "Save changes" button
next to "Get updates" collects the local edits and pushes them to
update.cgi. An edit is a radio button change differing from the
reference state (so clicking around and coming back to the reference
sends nothing), or a note typed in the per-line input revealed by the
new "[add note]" link under the AI explanation (500 chars max, matching
the server-side cap).

No directive carries a base value: states are last-write-wins and notes
are append-only server-side, so two reviewers saving concurrently
cannot conflict. On success the reference advances to the pushed values
and the note inputs are cleared, so the page is clean without needing a
refetch; on error (server busy or unreachable) everything stays local
and a later click simply retries.
dev/patchbot/scripts/post-ai.sh