Skip to content

Enable native input for internal builds#8588

Draft
malmstein wants to merge 1 commit into
developfrom
feature/david/enable_native_input_internal
Draft

Enable native input for internal builds#8588
malmstein wants to merge 1 commit into
developfrom
feature/david/enable_native_input_internal

Conversation

@malmstein
Copy link
Copy Markdown
Contributor

@malmstein malmstein commented May 17, 2026

Task/Issue URL: https://app.asana.com/1/137249556945/project/1174433894299346/task/1214735022214304?focus=true

Description

Flips the nativeInputField feature flag default from FALSE to INTERNAL so internal builds get the native input widget automatically, and removes the now-redundant "Native Input Field" user toggle from AI Features settings. The widget is now shown purely based on the feature flag.

Implementation notes:

  • RealDuckChat caches duckChatFeature.nativeInputField().isEnabled() in a MutableStateFlow populated from cacheConfig(). The existing observeNativeInputFieldUserSettingEnabled() API stays on DuckChat and emits from that flow, so all consumers (omnibar layout, NTP, system search, native input manager, contextual native input manager, JS helper, cacheUserSettings) keep working without call-site changes.
  • The user-setting plumbing is gone: setter removed from DuckChatInternal/repository/data store, observe + read methods removed from repository/data store, preference key removed. DuckChatJSHelper's SUPPORTS_NATIVE_CHAT_INPUT / SUPPORTS_NATIVE_PROMPT now read the feature flag directly.

Steps to test this PR

Internal build

  • Install internal debug build (./gradlew :app:installInternalDebug)
  • Open AI Features settings — confirm there is no "Native Input Field" row
  • Tap the omnibar — confirm the native input widget appears (chat/search toggle, image attach, model picker)
  • Open a new tab — confirm the widget shows with the expected behaviour
  • Open Duck.ai contextual sheet on a browser tab — confirm native input is used

Play build (flag off by default)

  • Install play debug build (./gradlew :app:installPlayDebug)
  • Open AI Features settings — confirm there is no "Native Input Field" row
  • Tap the omnibar — confirm the native input widget does not appear and the existing web-based input is used
  • Flip aiChat / nativeInputField to enabled via the feature flags debug screen and relaunch — confirm the native input widget now appears

UI changes

Before After
(Upload before screenshot) (Upload after screenshot)

Note

Medium Risk
Changes how the native Duck.ai input is enabled by removing persisted user settings and switching gating to a remote feature flag, which could alter behavior for users/build variants if the flag state is misconfigured.

Overview
Enables Duck.ai native input for internal builds by default by changing nativeInputField’s default toggle value to INTERNAL and treating it as a capability/feature flag rather than a user preference.

Removes the “Native Input Field” setting from AI Features settings (UI, strings, ViewModel wiring) and deletes the associated repository/data-store plumbing and preference key; RealDuckChat now caches the flag in-memory and exposes it via the existing observeNativeInputFieldUserSettingEnabled() API to avoid call-site changes.

Updates DuckChatJSHelper to report SUPPORTS_NATIVE_CHAT_INPUT/SUPPORTS_NATIVE_PROMPT directly from the nativeInputField feature flag, and adjusts tests to reflect the new flag-driven behavior.

Reviewed by Cursor Bugbot for commit 2151b75. Bugbot is set up for automated code reviews on this repo. Configure here.

Flip the nativeInputField feature flag default to INTERNAL and
remove the now-redundant user toggle from AI Features settings.
Widget visibility is driven by the feature flag, with the existing
observer API in DuckChat backed by the cached flag value so all
consumers (omnibar, NTP, system search, native and contextual
input managers, JS helper) pick it up unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants