From a452477825cef664277be41cf1c3aaed77740707 Mon Sep 17 00:00:00 2001 From: mikael-lovqvists-claude-agent Date: Sat, 25 Apr 2026 03:37:26 +0000 Subject: [PATCH] Fix scroll-to-top on note toggle during playback pattern_updated SSE was calling render_content() which rebuilds the entire panel DOM, resetting the scroll position. Since toggle_note already calls render_step_grid() directly after the PUT, replace the SSE full-render with a grid-only refresh to preserve scroll. Co-Authored-By: Claude Sonnet 4.6 --- node-server/public/app.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/node-server/public/app.mjs b/node-server/public/app.mjs index 0d1d57b..c0ad156 100644 --- a/node-server/public/app.mjs +++ b/node-server/public/app.mjs @@ -502,7 +502,8 @@ es.addEventListener('pattern_updated', (e) => { const p = JSON.parse(e.data); state.patterns.set(p.id, p); if (state.selected_id === p.id) { - render_content(); + /* Only refresh the grid — full render_content() resets scroll position */ + render_step_grid(p, p.notes); } render_pattern_list(); });