Repository navigation
Conversation
Pinning a conversation removed it from Recent entirely: the selector skipped every row with a `pinned_at`. Pinning is a bookmark that lifts a row into the top section, not a statement that it stopped being recent, so the row vanished from the one list the user scans by time. Recent now includes pinned rows, ordered with everything else by last activity. A pinned row also bypasses the "Show completed" and closed-folder gates, matching the Pinned section's own reachability rule — the two sections must never disagree about a row the user deliberately kept. The duplicated row is the existing, intended shape: a conversation already appears under its folder (or in Chat) and again in Recent. The Pinned section is one more copy, and the `recent-` row-key prefix already keeps the two React keys distinct, so `flatIndexOfConversation` still prefers the canonical row. Agent: opencode Session-Id: 45868-2cf53768 Working-Dir: D:\dev\codeg-recent-sort Generated-By: AI-assisted
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.
What was wrong
Pinning a conversation removed it from the Recent list entirely.
selectRecentConversationsWithReuseskipped every row with apinned_at, so bookmarking something made it vanish from the one list the user scans by time.Pinning is a bookmark that lifts a row into the top section — it is not a statement that the conversation stopped being recent. The user's expectation is that the pinned row is also still where they left it in the timeline.
The change
recent-row-key prefix already keeps the React keys distinct, andflatIndexOfConversationalready prefers the canonical (Pinned/folder/Chat) row, so "scroll to the active conversation" still lands in the right place.Tests
selectRecentConversationsWithReuse: a pinned row stays in the bucket (and is ordered by activity with its neighbours), including when its folder is closed, and when it is completed while completed rows are hidden.SidebarConversationList: a pinned conversation renders under both Pinned and Recent.pnpm test: 10560 passed. The single failure in that full run (a recharts bar render) is an unrelated flake — the file passes on its own.tsc --noEmitand eslint on the touched files are clean.Built on top of the merged #1010 (Recent ordered by last activity).