From 8fc3179a8a852fec342da1f17ae9ab3bc7ef2927 Mon Sep 17 00:00:00 2001 From: nankingjing <1079826437@qq.com> Date: Sun, 5 Jul 2026 18:43:20 +0800 Subject: [PATCH] fix(#3874): auto-refresh sidebar session list after new session creation Co-Authored-By: Claude --- static/sessions.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/sessions.js b/static/sessions.js index aa478e9f9..791f225a3 100644 --- a/static/sessions.js +++ b/static/sessions.js @@ -1242,7 +1242,8 @@ async function newSession(flash, options={}){ const _dirP=loadDir('.'); if(_dirP&&typeof _dirP.catch==='function') _dirP.catch(()=>{}); } - // don't call renderSessionList here - callers do it when needed + // Refresh sidebar to include the newly created session (#3874). + if(typeof refreshSessionList==='function'){Promise.resolve(refreshSessionList('new-session')).catch(()=>{})} })(); try{ return await _newSessionInFlight;