From 97b3707b5e2c6a1ce58a166c7e2c970d9b348fd3 Mon Sep 17 00:00:00 2001 From: archipelago Date: Mon, 3 Aug 2026 16:45:33 -0400 Subject: [PATCH] feat(spotlight): offer 'Talk to AIUI about it' for the typed query MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cmd/Ctrl+K search could only match text against known screens; anything it did not recognise dead-ended at 'No results'. That text is now handed to the assistant instead: a blue accented row (chat-bubble + sparkle) appears while there is a query, always last in the keyboard order, so Cmd+K -> type -> Enter reaches AIUI without the mouse. On a zero-match query it is the only option. The prompt travels by postMessage, NOT as an iframe URL param. Chat.vue's aiuiUrl is deliberately free of reactive dependencies so the iframe src stays byte-identical and AIUI survives a tab switch (see the D14_FLAGS comment); threading the question through the URL would reload AIUI and discard the conversation on every ask — the opposite of the intent. Two regression tests pin this: the src is byte-identical across an ask, and ask/askedAt are stripped afterwards so a refresh cannot silently re-ask. The ask is queued and flushed on AIUI's 'ready' handshake, because arriving from Cmd+K on a cold Chat tab means the iframe has not connected yet. AIUI-side receiver lands separately; until then this posts a message AIUI ignores, which is inert rather than broken. Co-Authored-By: Claude Opus 5 (1M context) --- neode-ui/src/components/SpotlightSearch.vue | 52 +++++++++++++++- neode-ui/src/views/Chat.vue | 48 ++++++++++++++- .../src/views/__tests__/chatAiuiEmbed.test.ts | 61 ++++++++++++++++++- 3 files changed, 156 insertions(+), 5 deletions(-) diff --git a/neode-ui/src/components/SpotlightSearch.vue b/neode-ui/src/components/SpotlightSearch.vue index a1c3c83a..b5c491a5 100644 --- a/neode-ui/src/components/SpotlightSearch.vue +++ b/neode-ui/src/components/SpotlightSearch.vue @@ -73,9 +73,40 @@ {{ item.section }} -
+
No results for "{{ query }}"
+ + +
+ +