DuckAi/Sidebar: Implement replace Chat Sidebar with chats history - #9752
Merged
Merged
Conversation
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Sep 9, 2026
karlenDimla
force-pushed
the
feature/karl/duckai-sidebar/re-route
branch
from
September 15, 2026 17:50
6c82012 to
577a8ee
Compare
Task/Issue URL: https://app.asana.com/1/137249556945/task/1218238186970938?focus=true Tech Design URL (if applicable): API Proposals URL(s) (if applicable): ### Description - Chat history screen gains an overflow menu (gated by the flag) with Select chats and Chats protection actions; Chats protection opens the Duck.ai chat-protection URL (new RealDuckChat.getChatProtectionUrl()), in a new tab unless already on a chat tab. ### Steps to test this PR ### Setup - [x] Internal build installed - [x] At least three saved chat exists in history _`nativeDuckAiSidebar` enabled, default_ - [x] Open the native chat history screen (Duck.ai sidebar button with `nativeDuckAiSidebar` on) from a duck.ai chat tab - [x] Overflow (⋮) icon **IS** visible in the chat history toolbar - [x] Tapping ⋮ opens a popup with **Select chats** and **Chats protection* - [x] Tapping **Select chats** enters selection mode (toolbar switches to select-mode actions) - [x] Verify items are selectable, selecting/deselecting ALL works and Overflow (⋮) icon and search icon are NOT visible - [x] Press back and verify you exit the select state - [x] Tapping Overflow (⋮) icon and select **Chat protection** from the menu - [x] Verify that history screen is dismissed and on the previously opened tab, the chat protection sheet becomes visible - [x] Go to New Tab Page - [x] Select menu and press "Chats" - [x] Tapping Overflow (⋮) icon and select **Chat protection** from the menu - [x] Verify a new duck.ai chat tab opens and the chat protection sheet becomes visible _`nativeDuckAiSidebar` disabled (via FF inventory)_ - [x] Go to New Tab Page - [x] Select menu and press "Chats" - [x] Verify that Overflow (⋮) icon is **NOT** visible while the history search bar is showing <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > UI and navigation-only changes behind an existing feature flag, with unit tests for URL/tab routing; no auth or data-layer changes. > > **Overview** > Adds a **toolbar overflow (⋮) menu** on native Duck.ai chat history, shown only when **`nativeDuckAiSidebar`** is enabled. The menu offers **Select Chats** (enters bulk selection; hidden when history isn’t loaded) and **Chat Protection**. > > **Chat Protection** navigates via a new **`getChatProtectionUrl()`** on `RealDuckChat` (`chatProtection=open` on the chat URL). The ViewModel opens that URL in the **current tab** if the user was already on a Duck.ai chat tab, otherwise in a **new tab**; the fragment wires `OpenChatProtection` to `BrowserNav` accordingly. > > Overflow is hidden in select mode and during search. Tests cover tab-reuse vs new-tab behavior; the test fake implements `getChatProtectionUrl()` and `isDuckChatUrl` for `duck.ai`. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit b58e76e. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Claude Opus 4.8 (1M context) <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/task/1218228567702514?focus=true
Tech Design URL (if applicable):
API Proposals URL(s) (if applicable): https://app.asana.com/1/137249556945/project/1201462763415876/task/1218312857360677?focus=true
Description
This is the main PR to Implement replace Chat Sidebar with chats history and include all change outlined in the stack:
Steps to test this PR
nativeDuckAiSidebar enabled, default
nativeDuckAiSidebar disabled
Note
Medium Risk
Changes omnibar Duck.ai navigation behind a remote flag; incorrect rollout could send users to the wrong sidebar/history surface, though legacy behavior is preserved when the flag is off.
Overview
Routes the omnibar Duck.ai sidebar tap through a feature-flagged path so users with
nativeDuckAiSidebarenabled open native chat history (openDuckChatHistory/LaunchDuckChatHistory) instead of the legacy web sidebar JS bridge.Adds
nativeDuckAiSidebartoDuckAiFeatureState, wired from remote config via newDuckChatFeature.nativeDuckAiSidebar()(default internal) inRealDuckChat.BrowserTabFragmentnow callsonDuckChatSidebarButtonPressed()instead ofopenDuckChatSidebar()directly.Also fixes swapped native actions:
onCustomizeResponsesClickednow emitsNativeAction.CUSTOMIZE_RESPONSESandopenDuckChatSidebaremitsNativeAction.SIDEBAR(they were reversed). Unit tests cover the flag branches, history vs sidebar fallback, and the corrected actions.Reviewed by Cursor Bugbot for commit 577a8ee. Bugbot is set up for automated code reviews on this repo. Configure here.