feat(sidebar): filter the Recent section to chats or folder sessions - #848
Merged
Merged
Conversation
The flat Recent section always mixed folderless chats and folder-bound sessions. Add a kind filter cycled from a button in its header: All to Chat to Folders to All. The icon names the current filter, and unlike the header's other hover-revealed actions it stays visible while a filter other than "all" is active so a narrowed list never looks mysteriously short. The choice persists in localStorage next to the other sidebar view preferences; the empty-section hint names the active filter. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The header button cycled All → Chat → Folders with only an icon to say which was active, which a new user cannot read. It is now a "⋯" trigger that opens a small radio menu listing the three choices by name, with the active one checked. The trigger still stays visible while a filter other than "all" is active and still names the active filter in its tooltip. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…s open The filter menu is modal, so while it is open Radix sets `pointer-events: none` on <body> and the header row loses its hover. With the "all" filter the hover-revealed trigger then faded out from under its own open menu. It now also stays shown off its own `data-state="open"`. The header test asserts that open state, and the visibility contract the test already named: a narrowing filter pins the trigger on, "all" hides it with the other actions.
…copy The section header and the "Show Recent group" option call it "الأحدث"; the filter tooltip and menu label called it "الأخيرة", naming a section the sidebar does not show.
Storage: every filter round-trips, and absent or unrecognised values read as "all". List: a persisted filter is restored on mount, an emptied section names the active filter, and a pick from the header menu narrows Recent and is saved.
The empty-Recent row was documented as reachable only in an empty workspace; a chats or folders filter can now narrow the section to nothing too.
Under "all" the hint is not limited to an empty workspace: it also shows when every conversation is pinned, hidden as completed, or in a closed folder, since Recent leaves those out.
The empty-hint test now runs for the chats filter as well as folders and rejects every other hint; the menu test switches back to All and checks both kinds return. The filter describe removes its stored value afterwards so later describes in the file never render a narrowed Recent, and the storage round-trip spells out the three filters instead of reading them from the list under test.
Owner
|
codeg work task |
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 changed
The sidebar's Recent section currently always mixes folder-less Chat sessions together with sessions bound to a folder. This PR adds a "⋯" button on the Recent header row that opens a checkmark-style radio menu: All / Chat / Folders:
workspace:sidebar-recent-filter), consistent with other sidebar view preferences; any invalid value falls back to "All".selectRecentConversationsWithReusegains an optionalfilterparameter, defaulting to"all", so existing callers are unaffected.Testing
src/components/conversationspass.pnpm lint,tsc --noEmitpass.Assisted with Claude Code