From 67faed08ddce48767b3aee1f3a4197e91bd35b4d Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Wed, 13 May 2026 19:19:11 +0000 Subject: [PATCH] =?UTF-8?q?stage-349:=20fix=20CHANGELOG=20inaccuracy=20?= =?UTF-8?q?=E2=80=94=20#2198=20uses=20inline=20=5FoldestIdx+msgIdx,=20not?= =?UTF-8?q?=20a=20helper=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Opus advisor flagged that the original CHANGELOG entry referenced a _fork_keep_count_for_anchor() helper that doesn't exist in the diff. The actual fix is the inline (_oldestIdx + msgIdx) computation in static/commands.js, captured BEFORE _ensureAllMessagesLoaded() resets _oldestIdx. Updated the entry to match the code. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d363ee1..99d907a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ - **PR #2201** by @MrFant — Multi-turn conversations with thinking-mode providers (MiMo/Xiaomi, DeepSeek, Kimi/Moonshot) no longer 400 with `Param Incorrect: reasoning_content must be passed back`. WebUI's `_sanitize_messages_for_api()` strips fields not in `_API_SAFE_MSG_KEYS` before sending conversation history to the LLM; `reasoning_content` was missing from the whitelist, so when history was replayed on the second turn, the assistant message with `tool_calls` arrived without `reasoning_content` and providers enforcing thinking-mode echo-back rejected it. One-line fix: adds `'reasoning_content'` to `_API_SAFE_MSG_KEYS`. CLI was unaffected because `run_agent.py` has its own `_copy_reasoning_content_for_api()` that doesn't go through this filter. -- **PR #2198** by @Michaelyklam — Fork-from-here keep-count was off-by-one (or larger) for truncated sessions where the visible-message index didn't match the absolute transcript index. New `_fork_keep_count_for_anchor()` helper resolves the keep count against the absolute message index rather than the visible-window index, so forking from a message after a compression boundary keeps the correct number of prior messages on the new branch. 186-line regression suite in `tests/test_issue2184_fork_from_here_absolute_index.py`. +- **PR #2198** by @Michaelyklam — Fork-from-here keep-count was off-by-one (or larger) for truncated sessions where the visible-message index didn't match the absolute transcript index. JS now sends `_oldestIdx + msgIdx` (the absolute message index in the full transcript) as `keep_count` instead of the visible-window-relative index — captured *before* `_ensureAllMessagesLoaded()` resets `_oldestIdx`, so the index remains stable. Backend `source_messages[:keep_count]` then forks from the correct point even when the user has only loaded a tail window. When the full transcript is loaded (`_oldestIdx==0`), behavior is unchanged. 186-line regression suite in `tests/test_issue2184_fork_from_here_absolute_index.py` explicitly pins `keep_count: absoluteKeepCount` (and forbids the old `keep_count: msgIdx` form). - **PR #2200** by @Jordan-SkyLF — Firefox/Waterfox session sidebar scrolling no longer jumps or stutters when background refreshes rebuild the list while the user is interacting. Adds an interaction guard for background refreshes from streaming/gateway polling and gateway SSE — defers only opt-in `renderSessionList({deferWhileInteracting:true})` calls while the sidebar is hovered/focused/under pointer interaction; explicit user-triggered refreshes still run immediately. Avoids virtualized-list DOM rebuilds when the computed visible window is unchanged. Disables browser scroll anchoring on `.session-list` to stop Firefox/Waterfox rubber-banding against virtualized DOM replacement. 84-line regression suite for the deferral path, generation guard, virtualization render path, and scroll-boundary CSS.