Merged
Conversation
5dcf6a1 to
2f60657
Compare
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Voice search always uses Duck AI mode ignoring tab
- Updated the native input voice click handler to pass
isChatTabSelected()so voice search mode now matches the currently selected tab.
- Updated the native input voice click handler to pass
Or push these changes by commenting:
@cursor push 6767a2570a
Preview (6767a2570a)
diff --git a/app/src/main/java/com/duckduckgo/app/browser/nativeinput/NativeInputManager.kt b/app/src/main/java/com/duckduckgo/app/browser/nativeinput/NativeInputManager.kt
--- a/app/src/main/java/com/duckduckgo/app/browser/nativeinput/NativeInputManager.kt
+++ b/app/src/main/java/com/duckduckgo/app/browser/nativeinput/NativeInputManager.kt
@@ -401,7 +401,7 @@
hideMainButtons()
if (voiceSearchAvailability.isVoiceSearchAvailable) {
setVoiceButtonVisible(true)
- onVoiceClick = { callbacks.onVoiceSearchPressed(true) }
+ onVoiceClick = { callbacks.onVoiceSearchPressed(isChatTabSelected()) }
}
}
bindSearchCallbacks(widgetView, callbacks)
app/src/main/java/com/duckduckgo/app/browser/nativeinput/NativeInputManager.kt
Outdated
Show resolved
Hide resolved
2f60657 to
015e10d
Compare
015e10d to
6687035
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Task/Issue URL: https://app.asana.com/1/137249556945/project/488551667048375/task/1213814620948013?focus=true
Description
Steps to test this PR
With native input enabled
Note
Medium Risk
Integrates voice search into native input and alters voice-result routing (search vs Duck.ai), which could affect user flows around input/keyboard and Duck.ai submission behavior.
Overview
Adds a voice-search entry point to the native input widget: the widget can now show a mic button (gated by
VoiceSearchAvailability) and report clicks via a newNativeInputCallbacks.onVoiceSearchPressedcallback.Updates voice search handling to support two modes (
SEARCHvsDUCK_AI): native input can launch voice search in the appropriate mode, search results now hide native input without animation before populating the omnibar, and Duck.ai voice results are routed into native input (auto-selecting the chat tab and submitting the message) when native input is enabled, otherwise falling back to opening DuckChat.Written by Cursor Bugbot for commit 6687035. This will update automatically on new commits. Configure here.