From d63166b58177376f523516e88eb5dcc75060f89c Mon Sep 17 00:00:00 2001 From: timmy Date: Sun, 16 Aug 2026 08:55:49 +0000 Subject: [PATCH] feat: dictate replies from mobile Search preview (Closes #953) --- frontend/dashboard.css | 2 ++ frontend/dashboard.js | 6 ++++++ frontend/index.html | 16 +++++++++++++++ tests/test_voice_conversation_capture.py | 26 ++++++++++++++++++++++++ 4 files changed, 50 insertions(+) diff --git a/frontend/dashboard.css b/frontend/dashboard.css index 4f7d4c9..5e847b0 100644 --- a/frontend/dashboard.css +++ b/frontend/dashboard.css @@ -644,6 +644,8 @@ textarea { resize: vertical; min-height: 120px; } .search-preview-reply textarea { box-sizing:border-box; width:100%; min-height:110px; resize:vertical; scroll-margin-bottom:calc(190px + env(safe-area-inset-bottom)); } .search-preview-reply-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; } .search-preview-reply-actions button { min-height:44px; } +.search-preview-reply .voice-conversation-controls button, +.search-preview-reply .voice-conversation-review-actions button { min-height:44px; } .search-preview-navigation { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:8px; } .search-preview-actions { position:sticky; bottom:0; display:grid; gap:8px; padding:10px 0; padding-bottom:calc(10px + env(safe-area-inset-bottom)); background:#0b1526; } .search-preview-actions button, .search-preview-actions a { min-height:44px; box-sizing:border-box; display:flex; align-items:center; justify-content:center; } diff --git a/frontend/dashboard.js b/frontend/dashboard.js index 90cb3c6..b81dfdc 100644 --- a/frontend/dashboard.js +++ b/frontend/dashboard.js @@ -640,9 +640,13 @@ const issueVoiceReply = mountConversationVoice('issue-comment', '#issue-comment'); const pullVoiceReply = mountConversationVoice('pull-comment', '#pull-comment'); const updateVoiceReply = mountConversationVoice('update-reply', '#update-reply'); + const searchVoiceReply = mountConversationVoice('search-reply', '#search-preview-reply'); function conversationVoiceTarget(kind, item) { return kind + ':' + String(item?.repository || '').trim().toLowerCase() + '#' + Number(item?.number); } + function searchConversationVoiceTarget(item) { + return 'search:' + conversationVoiceTarget(item?.kind, item); + } const createIssueAttachmentController = issueAttachment.mount({ input: qs('#create-issue-attachment'), inputs: [qs('#take-create-issue-photo'), qs('#create-issue-attachment')], @@ -4945,6 +4949,7 @@ qs('#close-search-preview').textContent = searchPreviewReturnKind === 'today-readiness' ? 'Back to blockers' : 'Back to search'; if (state.status === 'closed') { + searchVoiceReply.cancel(); sheet.classList.remove('open'); return; } @@ -4960,6 +4965,7 @@ renderSearchPreviewReply(state, null, searchPreview, document); if (state.status === 'loading') { + searchVoiceReply.open(searchConversationVoiceTarget(state.item)); searchPreviewDetail = null; qs('#search-preview-key').textContent = state.item.repository + ' #' + state.item.number; qs('#search-preview-title').textContent = state.item.title || 'Work preview'; diff --git a/frontend/index.html b/frontend/index.html index 96d5139..1bd266e 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -546,6 +546,22 @@