Duck.Ai/ChatHistory: Add context menu - #9760
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
c0ea2e3 to
3165abd
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ 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 3165abd. Configure here.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Fixes test module compilation broken when getChatProtectionUrl was added to the DuckChatInternal interface without updating the test fake. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
reduce() stays on Empty when there are no chats, so entering select mode from the empty state was a no-op. Only offer Select Chats when chats are present; Chat Protection remains available regardless. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
malmstein
left a comment
There was a problem hiding this comment.
lgtm, one suggestion: the new chat-tab vs new-tab branch has no test, and ChatHistoryViewModelTest already has the pattern for it.
| controls.update { it.copy(mode = Mode.Selecting(emptySet())) } | ||
| } | ||
|
|
||
| fun onChatsProtectionClicked() { |
There was a problem hiding this comment.
suggestion: the inNewTab decision here isn't covered, and the fixture is already in place since FakeDuckChatInternal stubs getChatProtectionUrl. two cases worth pinning with the existing navigationEvents pattern: selected tab is a duck.ai chat so we reuse it, and anything else so we open a new one.


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
Steps to test this PR
Setup
nativeDuckAiSidebarenabled, defaultnativeDuckAiSidebaron) from a duck.ai chat tabnativeDuckAiSidebardisabled (via FF inventory)Note
Low Risk
UI and navigation-only changes behind an existing feature flag, with URL construction centralized in RealDuckChat.
Overview
Adds a feature-flagged (
nativeDuckAiSidebar) overflow (⋮) menu on the native Duck.ai chat history toolbar with Select Chats (enters existing bulk-select mode when history is loaded) and Chat Protection.Chat Protection is wired through a new
DuckChatInternal.getChatProtectionUrl()inRealDuckChat, which appendschatProtection=open(plus native-input query params when applicable). The view model opens that URL in the current tab when the selected tab is already a Duck.ai chat URL, otherwise in a new tab; the fragment handles the newOpenChatProtectionnavigation event accordingly.Toolbar behavior hides the overflow icon in select mode and respects the flag when applying the default toolbar. Supporting UI includes the overflow menu item, popup layout, shield icon, and strings; test fakes implement the new URL helper.
Reviewed by Cursor Bugbot for commit 1f24033. Bugbot is set up for automated code reviews on this repo. Configure here.