From a1eec6d191ebbf11d7ebaf89751c12f7ba681550 Mon Sep 17 00:00:00 2001 From: hermes-agent Date: Thu, 7 May 2026 18:21:56 +0000 Subject: [PATCH] stage-314 absorb: remove duplicate loadKanbanBoards tail call in loadKanban PR #1828 added an await loadKanbanBoards() at the START of loadKanban() to resolve the active board before board-scoped requests fire (so a stale saved slug can fall back to default cleanly). The existing tail-of-function refresh at line 1278 was harmless under one-time loads but doubles /api/kanban/boards traffic under SSE-driven refreshes (debounced at 250ms via _scheduleKanbanRefresh). The 30-second polling interval started by _kanbanStartPolling() picks up any board state changes that arrive after the render, so the tail call is redundant in PR #1828's new model. Per Opus pre-release verdict: SHIP with this perf cleanup as in-release absorb (5 LOC delta, clearly defensive, no behavior change for the single-load case). --- static/panels.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/static/panels.js b/static/panels.js index 76cfd2e7..44668211 100644 --- a/static/panels.js +++ b/static/panels.js @@ -1272,10 +1272,13 @@ async function loadKanban(animate){ _kanbanSetSelectOptions($('kanbanAssigneeFilter'), _kanbanBoard.assignees || (assignees && assignees.assignees) || (config && config.assignees), 'kanban_all_assignees'); _kanbanSetSelectOptions($('kanbanTenantFilter'), _kanbanBoard.tenants, 'kanban_all_tenants'); await loadKanbanStats(); - // Refresh the multi-board switcher (and resolve which board to show - // from localStorage / server state). Best-effort — failures hide the - // switcher rather than blocking the panel from rendering. - await loadKanbanBoards(); + // Note: PR #1828 (v0.51.20) moved the boards refresh to the start of + // loadKanban() so the active board is resolved BEFORE board-scoped + // requests fire. The previous tail-of-function refresh has been removed + // to avoid doubling /api/kanban/boards traffic during SSE-driven + // refreshes (debounced at 250ms via _scheduleKanbanRefresh). The + // 30-second poll started by _kanbanStartPolling() picks up any board + // state changes that arrive after this render. _kanbanStartPolling(); _kanbanRenderBoard(); } catch(e) {