Update floating buttons and keyboard actions for native-widget#8548
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f8d07d1. Configure here.
| inputField.maxLines = MAX_LINES | ||
| } | ||
| updateSendButtonVisibility() | ||
| updateNewLineButtonVisibility() |
There was a problem hiding this comment.
Floating buttons never created until first streaming event
High Severity
setFloatingSubmitContainer stores the container reference but never triggers configureSubmitButtons(). The only callers of configureSubmitButtons() are prepareSubmitButtons() (during onAttachedToWindow, before the floating container is set) and setChatStreaming() (on chat state changes). Since NativeInputManager.bindWidget calls setFloatingSubmitContainer after onAttachedToWindow has already run, floatingButtons is never created until the first chat state change fires setChatStreaming. In the browser/search context where no streaming occurs, floatingButtons stays null permanently — so updateNewLineButtonVisibility() is a no-op, voice buttons fall back to submitButtons (wrong host), and the floating carriage return button never appears.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit f8d07d1. Configure here.
malmstein
left a comment
There was a problem hiding this comment.
Works as expected, thanks @aibrahim- !


Task/Issue URL: https://app.asana.com/1/137249556945/project/1212608036467427/task/1214733589467185?focus=true
Description
Steps to test this PR
In Search mode
In Duck.ai
UI changes
Note
Medium Risk
Changes submission semantics and IME/input-type handling across browser vs Duck.ai contexts, which can affect message sending and keyboard behavior. Also adjusts button hosting/visibility logic, so regressions are possible in chat controls across states (focus/streaming/attachments).
Overview
Updates native chat input so hardware Enter no longer always submits:
InputModeWidgetnow gates hardware-enter submission via overridableshouldSubmitOnHardwareEnter(), andNativeInputModeWidgetdisables it for Duck.ai chat.Refines Duck.ai vs browser IME behavior by switching Duck.ai chat to multiline input with
IME_ACTION_NONE, and forcing anInputMethodManager.restartInputwhen the input context changes.Reworks native submit/voice controls to support a separate floating button host (including a new-line button shown only in browser-context chat with text and not streaming), simplifies bottom-row visibility logic, and tweaks layout spacing (removes
rowSpacer, adds margins around toggle row/bottom row).Reviewed by Cursor Bugbot for commit f8d07d1. Bugbot is set up for automated code reviews on this repo. Configure here.