fix(sidebar): count inactive rows through the render path

This commit is contained in:
Rod Boev
2026-06-12 12:03:04 -04:00
parent 0ed902bd05
commit 6a1109475b
2 changed files with 3 additions and 3 deletions

View File

@@ -4774,8 +4774,8 @@ function _renderSidebarRowsFromRawSessions(sessionsRaw){
}
function _countRenderedSidebarRowsFromRawSessions(sessionsRaw){
// Child attachment does not change the top-level row count shown in the chip label.
return _collapseSessionLineageForSidebar(sessionsRaw).length;
// Keep inactive-tab chip counts on the exact same top-level row path as render.
return _renderSidebarRowsFromRawSessions(sessionsRaw).length;
}
function renderSessionListFromCache(){

View File

@@ -65,6 +65,6 @@ def test_partition_helper_keeps_raw_source_counts_while_render_owns_visible_coun
assert "const renderedWebuiSessionCount=" in render_body
assert "const renderedCliSessionCount=" in render_body
helper_body = _function_block("_countRenderedSidebarRowsFromRawSessions")
assert "_collapseSessionLineageForSidebar(sessionsRaw).length;" in helper_body
assert "_renderSidebarRowsFromRawSessions(sessionsRaw).length;" in helper_body
assert "function _renderSidebarRowsFromRawSessions(sessionsRaw){" in SESSIONS_JS
assert "_attachChildSessionsToSidebarRows(_collapseSessionLineageForSidebar(sessionsRaw), sessionsRaw)" in SESSIONS_JS