From 90f0576222e5aa090d312712edd38a43642b4cca Mon Sep 17 00:00:00 2001 From: "opencode-agent[bot]" <219766164+opencode-agent[bot]@users.noreply.github.com> Date: Tue, 30 Jun 2026 16:26:20 +0800 Subject: [PATCH] fix(session-ui): deselect review line on draft cancel (#34585) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 𝓛𝓲𝓽𝓽𝓵𝓮 𝓕𝓻𝓪𝓷𝓴 --- .../session-ui/src/components/line-comment-annotations.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/session-ui/src/components/line-comment-annotations.tsx b/packages/session-ui/src/components/line-comment-annotations.tsx index edff8c00ad..c0755d3eeb 100644 --- a/packages/session-ui/src/components/line-comment-annotations.tsx +++ b/packages/session-ui/src/components/line-comment-annotations.tsx @@ -408,7 +408,10 @@ export function createLineCommentController( selection: formatSelectedLineLabel(range, i18n.t), mention: props.mention, onInput: note.setDraft, - onCancel: note.cancelDraft, + onCancel: () => { + note.cancelDraft() + note.select(null) + }, onSubmit: (comment) => { props.onSubmit({ comment, selection: cloneSelectedLineRange(range) }) note.cancelDraft()