From fb494070e1016dc08d3c0647e59ca2e06d552472 Mon Sep 17 00:00:00 2001 From: Wenxu Mao Date: Fri, 24 Apr 2026 21:09:50 -0700 Subject: [PATCH 1/7] fix(sidebar): prevent rename input from flashing away and space committing Two bugs in sidebar session rename: 1. Double-click rename flashed away because onBlur fired before the useEffect could focus the input. Added a 200ms grace window after entering edit mode to ignore transient blur events. 2. Space key committed the rename because button keyup activation propagated from the input. Added onKeyUp stopPropagation on the rename input to prevent space from activating the parent button. Co-Authored-By: Claude Opus 4.6 (1M context) --- web/src/components/SessionItem.test.tsx | 74 +++++++++++++++++++++++++ web/src/components/SessionItem.tsx | 19 ++++++- 2 files changed, 91 insertions(+), 2 deletions(-) diff --git a/web/src/components/SessionItem.test.tsx b/web/src/components/SessionItem.test.tsx index d1a31438f..77c096545 100644 --- a/web/src/components/SessionItem.test.tsx +++ b/web/src/components/SessionItem.test.tsx @@ -789,6 +789,80 @@ describe("SessionItem quest title label", () => { }); }); +describe("SessionItem rename input", () => { + // Bug fix: space key was committing the rename because keyup propagated + // to the parent