Skip to content

DuckAi/Sidebar: Implement replace Chat Sidebar with chats history - #9752

Merged
karlenDimla merged 3 commits into
developfrom
feature/karl/duckai-sidebar/re-route
Sep 16, 2026
Merged

karlenDimla merged 3 commits into
developfrom
feature/karl/duckai-sidebar/re-route

Conversation

@karlenDimla

@karlenDimla karlenDimla commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Open a duck.ai chat
  • Select the sidebar
  • Verify that chats history opens

nativeDuckAiSidebar disabled

  • Open a duck.ai chat
  • Select the sidebar
  • Verify that the FE sidebar opens

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 nativeDuckAiSidebar enabled open native chat history (openDuckChatHistory / LaunchDuckChatHistory) instead of the legacy web sidebar JS bridge.

Adds nativeDuckAiSidebar to DuckAiFeatureState, wired from remote config via new DuckChatFeature.nativeDuckAiSidebar() (default internal) in RealDuckChat. BrowserTabFragment now calls onDuckChatSidebarButtonPressed() instead of openDuckChatSidebar() directly.

Also fixes swapped native actions: onCustomizeResponsesClicked now emits NativeAction.CUSTOMIZE_RESPONSES and openDuckChatSidebar emits NativeAction.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.

karlenDimla commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor Author

@malmstein malmstein left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@karlenDimla
karlenDimla force-pushed the feature/karl/duckai-sidebar/re-route branch from 6c82012 to 577a8ee Compare September 15, 2026 17:50
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>
@karlenDimla
karlenDimla added this pull request to the merge queue Sep 16, 2026
Merged via the queue into develop with commit a1f8f29 Sep 16, 2026
15 checks passed
@karlenDimla
karlenDimla deleted the feature/karl/duckai-sidebar/re-route branch September 16, 2026 20:42
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