From 4658cccd6ce133834567c11c24a631f73e5d0527 Mon Sep 17 00:00:00 2001 From: Allirey <22729337+Allirey@users.noreply.github.com> Date: Thu, 23 Oct 2025 11:13:33 +0200 Subject: [PATCH 1/2] prevent stacking of duplicated pvs --- ui/lib/src/ceval/protocol.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/lib/src/ceval/protocol.ts b/ui/lib/src/ceval/protocol.ts index 3bd82c24e87eb..7101060b56162 100644 --- a/ui/lib/src/ceval/protocol.ts +++ b/ui/lib/src/ceval/protocol.ts @@ -132,7 +132,7 @@ export class Protocol { pvs: [pvData], }; } else if (this.currentEval) { - this.currentEval.pvs.push(pvData); + this.currentEval.pvs[multiPv - 1] = pvData; this.currentEval.depth = Math.min(this.currentEval.depth, depth); } From 44684f57b1d675c52cef150833a9c541abf8fbbe Mon Sep 17 00:00:00 2001 From: Allirey <22729337+Allirey@users.noreply.github.com> Date: Thu, 23 Oct 2025 18:33:14 +0200 Subject: [PATCH 2/2] fix pv1 still occasionally getting duplicated with another pvs --- ui/lib/src/ceval/protocol.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/lib/src/ceval/protocol.ts b/ui/lib/src/ceval/protocol.ts index 7101060b56162..20d286f80fd21 100644 --- a/ui/lib/src/ceval/protocol.ts +++ b/ui/lib/src/ceval/protocol.ts @@ -131,8 +131,8 @@ export class Protocol { mate: isMate ? ev : undefined, pvs: [pvData], }; - } else if (this.currentEval) { - this.currentEval.pvs[multiPv - 1] = pvData; + } else if (this.currentEval && this.currentEval.pvs.length < multiPv) { + this.currentEval.pvs.push(pvData); this.currentEval.depth = Math.min(this.currentEval.depth, depth); }