From a2243f4c4f521ab1efbb2e435466ca13b78a73a6 Mon Sep 17 00:00:00 2001 From: Nathan Esquenazi Date: Sat, 4 Apr 2026 14:24:04 -0700 Subject: [PATCH] fix: remove unused ordered variable, add hoisting note Agent review feedback: ordered array was constructed but never iterated (the new code uses groups[] instead). Removed the dead variable. Added comment noting function hoisting for _renderOneSession. Co-Authored-By: Claude Opus 4.6 (1M context) --- static/sessions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/sessions.js b/static/sessions.js index 121a2ca..e655745 100644 --- a/static/sessions.js +++ b/static/sessions.js @@ -198,7 +198,6 @@ function renderSessionListFromCache(){ // Date grouping: Pinned / Today / Yesterday / Earlier const now=Date.now(); const ONE_DAY=86400000; - const ordered=[...pinned,...unpinned].slice(0,50); // Collapse state persisted in localStorage let _groupCollapsed={}; try{_groupCollapsed=JSON.parse(localStorage.getItem('hermes-date-groups-collapsed')||'{}');}catch(e){} @@ -244,6 +243,7 @@ function renderSessionListFromCache(){ list.appendChild(wrapper); } // ── Render session items (extracted for group body use) ── + // Note: declared after the groups loop but available via function hoisting. function _renderOneSession(s){ const el=document.createElement('div'); const isActive=S.session&&s.session_id===S.session.session_id;