From 3a7272bdfbbec0796c495098f1830c7a67c162f4 Mon Sep 17 00:00:00 2001 From: iris Date: Sat, 17 Oct 2026 23:46:37 +0200 Subject: [PATCH] flow: close the @-mention list once the recipient is chosen The composer's suggestion list stayed open for as long as the line started with a name that matched an agent, so typing "@iris hello" left it showing. Enter then accepted the highlighted suggestion (a no-op once the name is complete) and returned without sending; the message only went on a second Enter. The list now shows only while the cursor is still inside the leading @-token, so Enter sends as soon as the message has started. --- frontend/packages/dashboard/src/flow.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/packages/dashboard/src/flow.js b/frontend/packages/dashboard/src/flow.js index 2d4de8a4..b89cd78d 100644 --- a/frontend/packages/dashboard/src/flow.js +++ b/frontend/packages/dashboard/src/flow.js @@ -353,10 +353,12 @@ import { epochSec } from "./util.js"; } function updateSuggest() { const v = input.value; - // Only suggest when an @-token sits at the very start of the - // input — switching recipient is always "redirect this whole - // line." Mid-message @-mentions stay literal. - const m = v.match(/^@(\S*)/); + // Only suggest while the cursor is still inside the @-token at the + // very start of the input — switching recipient is always "redirect + // this whole line." Once whitespace follows the token the recipient + // is chosen: the list must close, or it swallows the Enter that + // should send. Mid-message @-mentions stay literal. + const m = v.match(/^@(\S*)$/); if (!m) { hideSuggest(); return;