Decouple Duck.ai native chat input behind a flag#8946
Draft
malmstein wants to merge 1 commit into
Draft
Conversation
The aiChat.nativeInputField() toggle bundled three behaviours: the native composing widget that replaces the old input screen, the native-input Duck.ai URL param, and the supportsNativeChatInput / supportsNativePrompt JS flags. It also gated the native input shown inside Duck.ai (contextual sheet and fullscreen). Disabling it to turn one off forced all of them off. Add aiChat.nativeChatInput() to gate only the Duck.ai-side native chat input integration, leaving the composing widget on nativeInputField. A single suppressor-aware source of truth, isNativeChatInputEnabled = isNativeInputFieldEnabled && nativeChatInput().isEnabled(), drives the URL param, the JS flags, and the in-Duck.ai native input, so the flag has no effect while the widget is off. When the new flag is off, Duck.ai contextual and fullscreen fall back to the web input and the native overlay is suppressed, avoiding two inputs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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/1157893581871903/task/1215886794910094
Tech Design URL (if applicable):
Description
aiChat.nativeInputField()currently bundles several behaviours behind one toggle:native-input=trueDuck.ai URL param (+originattribution),supportsNativeChatInput/supportsNativePromptJS flags sent to the Duck.ai web frontend,Disabling the flag to turn one of these off forced all of them off, which has caused issues.
This PR adds a new
aiChat.nativeChatInput()toggle that gates only the Duck.ai-side native chat input (2, 3, 4), leaving the composing widget onnativeInputField. A single suppressor-aware source of truth drives all three:exposed as
DuckChatInternal.isNativeChatInputEnabled()(JS helper) andDuckChat.observeNativeChatInputEnabled()(UI consumers). Because it ANDs the widget gate, the new flag has no effect while the widget is off.When
nativeChatInputis off, Duck.ai contextual and fullscreen fall back to the web input and the native overlay is suppressed (no more "two inputs").Behaviour matrix:
nativeInputFieldnativeChatInputDefault:
INTERNAL+@InternalAlwaysEnabled, mirroringnativeInputField.Steps to test this PR
Native chat input enabled (default, internal build)
native-input=trueNative chat input disabled (remote-disable
aiChat.nativeChatInput)native-inputparam;supportsNativeChatInput/supportsNativePromptare falseUI changes
🤖 Generated with Claude Code