Wire per-row Pin/Unpin in chat history overflow menu#8604
Merged
Conversation
This was referenced May 18, 2026
2ebe300 to
b7d6e93
Compare
23dda12 to
13f65fe
Compare
9 tasks
aitorvs
reviewed
May 19, 2026
b7d6e93 to
f6907a1
Compare
7814890 to
8ccddb3
Compare
8207298 to
cd1d1b5
Compare
750e7cc to
0bdc467
Compare
malmstein
approved these changes
May 19, 2026
Contributor
malmstein
left a comment
There was a problem hiding this comment.
Works as expected, left a few comments but nothing blocker
cd1d1b5 to
f7b5cd6
Compare
0bdc467 to
f77064b
Compare
f7b5cd6 to
65337eb
Compare
f77064b to
6530893
Compare
65337eb to
3166499
Compare
6530893 to
a720619
Compare
a720619 to
008e473
Compare
Surfaces a snackbar after the per-row Pin/Unpin overflow action so the user can recover from a mistap. The toggle still fires immediately; the snackbar is purely informational + an Undo affordance that re-issues setPinned with the previous value. Also fixes a pre-existing build break in RecordingRenameRepository, which was missing the setPinned override added in b3157b9.
Intent-named methods read more naturally at call sites that already know which direction they're going, and dropping the Boolean return keeps the public contract free of JSON-validity concerns — not-found and malformed JSON are silent no-ops. The shared mutation logic stays as a private setPinned helper inside RealDuckAiChatStore. The repository keeps its boolean-toggle setPinned signature because its caller (ChatHistoryViewModel) computes the next state as a boolean; the impl dispatches to pinChat / unpinChat.
008e473 to
06c472f
Compare
The rebase dropped the one-line override on this private test fake, breaking compileDebugUnitTestKotlin because RecordingRenameRepository implements ChatHistoryRepository which declares setPinned.
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/72649045549333/task/1214820120386824?focus=true
Description
Wires the Pin / Unpin action on the Duck.ai chat history screen so a chat actually moves between the Pinned and Recent sections. The toggle fires immediately with no confirmation; a snackbar with Undo appears so a mistap is recoverable. State is persisted via the native chat store so the same Pinned/Recent split shows on next open and on Duck.ai itself.
Steps to test this PR
Note
Prerequisites:
duckAiChatHistory(self,historyScreen) is ON andduckChat → useNativeStorageChatDatais ON.Happy path
Persistence
UI changes
Note
Medium Risk
Adds a new persisted pin/unpin write path into the native chat store and surfaces it via immediate UI actions with undo, which could affect chat metadata consistency across sessions. Changes are localized but touch storage JSON updates and user-facing state transitions.
Overview
Enables the per-row Pin/Unpin action in chat history to immediately move chats between Pinned and Recent, and shows a snackbar with Undo after toggling.
Adds a new
ChatHistoryRepository.setPinnedflow backed by native storage (DuckAiChatStore.pinChat/unpinChat) that updates the stored chat JSON’spinnedfield, plus ViewModel/fragment wiring (messageEvents) and new tests validating state changes and persistence behavior.Reviewed by Cursor Bugbot for commit 83e7fe3. Bugbot is set up for automated code reviews on this repo. Configure here.