From f3a2912aa1da2b92551f3e9ebd9f0a047bde10bb Mon Sep 17 00:00:00 2001 From: Vito Sansevero Date: Sun, 25 Oct 2026 05:04:38 -0700 Subject: [PATCH] fix(system): keep the server's search-again line on a duplicate review A duplicate cleanup review the server refuses with 409 sources-changed showed the generic "could not be reviewed" message; it now shows the server's "The sources changed since the search. Search for duplicates again." --- tests/js/workspace-system-maintenance.test.js | 3 +++ web/js/workspace/maintenance-review.mjs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/js/workspace-system-maintenance.test.js b/tests/js/workspace-system-maintenance.test.js index 95c282c3..2b124204 100644 --- a/tests/js/workspace-system-maintenance.test.js +++ b/tests/js/workspace-system-maintenance.test.js @@ -93,6 +93,9 @@ test('a refused apply names its reason; a lost answer is not confirmed', async ( assert.equal(reviewRefusal(error(413, 'too-large', 'This plan is too large to review at once.')), 'This plan is too large to review at once.'); assert.equal(reviewRefusal(error(500, null, 'boom')), REVIEW_FAILED); + // S7 re-review N1: a duplicate review whose sources changed since the search keeps the server's "search again". + const changed = 'The sources changed since the search. Search for duplicates again.'; + assert.equal(reviewRefusal(error(409, 'sources-changed', changed)), changed); assert.equal(reviewRefusal(new TypeError('x')), REVIEW_FAILED); }); diff --git a/web/js/workspace/maintenance-review.mjs b/web/js/workspace/maintenance-review.mjs index 0373e204..1d1fcb5e 100644 --- a/web/js/workspace/maintenance-review.mjs +++ b/web/js/workspace/maintenance-review.mjs @@ -56,7 +56,7 @@ export const OPERATION_TITLES = Object.freeze({ const REVIEW_AGAIN = new Set(['plan-expired', 'storage-changed']); // Refusals whose server message is the whole truth. const SERVER_SAYS = new Set(['insufficient-space', 'nothing-to-do', 'too-large', 'invalid-request', 'not-found', - 'job-running', 'no-groups', 'apply-failed']); + 'job-running', 'no-groups', 'apply-failed', 'sources-changed']); const number = value => value.toLocaleString('en-US');