mirror of
https://github.com/nesquena/hermes-webui.git
synced 2026-05-25 19:20:16 +00:00
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).
This commit is contained in:
+7
-4
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user