Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix(ci): align negative-counter clamp test with bumpCount's zero floor (#5481)

LearningCircuit1573afdbca7d
diff --git a/tests/js/components/logpanel.test.js b/tests/js/components/logpanel.test.js
index 03eecf6ea3..b90a1ca7e6 100644
--- a/tests/js/components/logpanel.test.js
+++ b/tests/js/components/logpanel.test.js
@@ -2137,10 +2137,13 @@ describe('loadLogsForResearch — counter drift when live entries already exist'
});
it('clamps negative category badges while indicator and All follow the rendered DOM', () => {
- // Guards the defensive Math.max(0, ...) floor in
- // updateFilterCounters. The structural recompute in
- // loadLogsForResearch handles bulk paths; this test pins that
- // a future live insertion path with stale negative category
+ // Guards both defensive Math.max(0, ...) floors: bumpCount
+ // heals the bumped category's *state* (info: -50 + 1 lands on
+ // 0, not -49), while updateFilterCounters clamps the rendered
+ // *badge* for categories the insert never touches (warning
+ // stays -10 in state but renders "0"). The structural recompute
+ // in loadLogsForResearch handles bulk paths; this test pins
+ // that a live insertion path with stale negative category
// state cannot surface a negative badge before the state is
// structurally recomputed.
buildPanelDom();
@@ -2160,7 +2163,7 @@ describe('loadLogsForResearch — counter drift when live entries already exist'
expect(
document.querySelectorAll('.ldr-console-log-entry')
).toHaveLength(1);
- expect(window._logPanelState.counts.info).toBe(-49);
+ expect(window._logPanelState.counts.info).toBe(0);
expect(window._logPanelState.counts.warning).toBe(-10);
expect(document.getElementById('log-indicator').textContent).toBe('1');
expect(