From d7b98b4698943a7e811c6bbfeb5a93cd78fd008b Mon Sep 17 00:00:00 2001 From: Jason Woltje Date: Sun, 15 Nov 2026 03:13:43 -0600 Subject: [PATCH] fix(webui): sp4, an organization's own task board with no filter on no longer says its tasks match the filters (#1873, lane sp4) The scope's org= in the workspace read is where the board reads, not a filter, so the count line and the empty state no longer treat it as one. Found in the retaken shots. --- packages/webui/src/public/tasks-board.js | 3 ++- packages/webui/tests/system-tasks-browser.test.mjs | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/webui/src/public/tasks-board.js b/packages/webui/src/public/tasks-board.js index ea526421e..e2e7d8709 100644 --- a/packages/webui/src/public/tasks-board.js +++ b/packages/webui/src/public/tasks-board.js @@ -230,7 +230,8 @@ const rows = filtered(), all = snap.tasks.length; // Project, state, assignee and label filter on the server, so the board never holds the unfiltered // total; with one of those on, the line says how many match rather than inventing an "of N". - const onServer = new URLSearchParams(readQuery()).size > 1, n = rows.length; + // The scope's org= is where the board reads, not a filter. + const onServer = new URLSearchParams(readQuery()).size > (scope ? 2 : 1), n = rows.length; const line = onServer ? `

Showing ${n} ${n === 1 ? 'task that matches' : 'tasks that match'} the filters.

` : n !== all ? `

Showing ${n} of ${all} tasks.

` : ''; // An empty result is only exhaustive when every organization's tasks were read. diff --git a/packages/webui/tests/system-tasks-browser.test.mjs b/packages/webui/tests/system-tasks-browser.test.mjs index 9e57c5107..d6d99b20d 100644 --- a/packages/webui/tests/system-tasks-browser.test.mjs +++ b/packages/webui/tests/system-tasks-browser.test.mjs @@ -171,6 +171,8 @@ test('#/orgs/beta/tasks shows beta\'s tasks only, with a link to every organizat await wait(`${cards} === ${BETA}`); assert.equal(await b.evaluate('location.hash'), '#/orgs/beta/tasks'); assert.equal(await b.evaluate('document.querySelector("[data-tasks-board]").dataset.tbScope'), 'beta'); + // No filter is on, so no "match the filters" line: the scope is not a filter. + assert.equal(await b.evaluate('document.querySelector("[data-tasks-board] .tb-count")'), null); assert.equal(await b.evaluate('document.querySelector("[data-tb-org]")'), null); assert.match(await b.evaluate('document.querySelector("[data-tasks-board] .sub").textContent'), /Tasks from Beta Works only/); assert.equal(await b.evaluate('document.querySelector("[data-tasks-board] .sub a")?.getAttribute("href")'), '#/tasks');