| author | |
| committer | |
| log | c530e5d50f5a77cd732c0c3e09d9ef964faea96e |
| tree | 6babde028dc19cdcb6ef939b63faed2b2e0c9b1b |
| parent | 674720c6cd233ca8c9a7b357eb954e26cae3466d |
After the async dispatch, only clear renamingThreadId if it still
matches the thread being renamed, preventing a second rename's
input from being cleared by the first's completion.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 files changed, 5 insertions(+), 1 deletions(-)
apps/web/src/components/Sidebar.tsx+5-1| ... | ... | @@ -543,7 +543,11 @@ export default function Sidebar() { |
| 543 | 543 | description: error instanceof Error ? error.message : "An error occurred.", |
| 544 | 544 | }); |
| 545 | 545 | } |
| 546 | cancelRename(); | |
| 546 | setRenamingThreadId((current) => { | |
| 547 | if (current !== threadId) return current; | |
| 548 | renamingInputRef.current = null; | |
| 549 | return null; | |
| 550 | }); | |
| 547 | 551 | }, |
| 548 | 552 | [cancelRename], |
| 549 | 553 | ); |