From a5a8cd94c9af17f39a36993c0f419404c60055c3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 21 Mar 2026 21:58:12 +0000 Subject: [PATCH] fix(ui): address code review feedback for comments/annotations UX Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> Agent-Logs-Url: https://github.com/christianlouis/DocuElevate/sessions/20bbea80-fdfd-42d2-b0c2-756ca25b240b --- frontend/static/js/annotations.js | 2 +- frontend/static/js/comments.js | 6 ++---- frontend/templates/file_detail.html | 8 +++++--- frontend/translations/en.json | 3 ++- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/frontend/static/js/annotations.js b/frontend/static/js/annotations.js index 985b4135..35d0ede2 100644 --- a/frontend/static/js/annotations.js +++ b/frontend/static/js/annotations.js @@ -275,7 +275,7 @@ var cancelBtn = document.createElement('button'); cancelBtn.type = 'button'; cancelBtn.className = 'annotation-cancel-btn'; - cancelBtn.textContent = 'Cancel'; + cancelBtn.textContent = _i18n.cancel || 'Cancel'; cancelBtn.addEventListener('click', function () { contentDiv.textContent = originalText; }); diff --git a/frontend/static/js/comments.js b/frontend/static/js/comments.js index e0cf9259..a6add2e0 100644 --- a/frontend/static/js/comments.js +++ b/frontend/static/js/comments.js @@ -255,7 +255,7 @@ fetch('/api/files/' + _fileId + '/comments/' + commentId + '/resolve', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ resolve: resolve }), + body: JSON.stringify({ is_resolved: resolve }), }) .then(function (r) { if (!r.ok) throw new Error('Failed'); @@ -357,12 +357,10 @@ var cancelBtn = document.createElement('button'); cancelBtn.type = 'button'; cancelBtn.className = 'comment-cancel-btn'; - cancelBtn.textContent = 'Cancel'; + cancelBtn.textContent = _i18n.cancel || 'Cancel'; cancelBtn.addEventListener('click', function () { bodyDiv.innerHTML = originalHTML; }); - - btns.appendChild(saveBtn); btns.appendChild(cancelBtn); form.appendChild(textarea); form.appendChild(btns); diff --git a/frontend/templates/file_detail.html b/frontend/templates/file_detail.html index 9bb08b4e..2c1242bc 100644 --- a/frontend/templates/file_detail.html +++ b/frontend/templates/file_detail.html @@ -2339,7 +2339,7 @@