Skip to content

feat(sidebar): filter the Recent section to chats or folder sessions - #848

Merged
xintaofei merged 8 commits into
xintaofei:mainfrom
SousekiL:feat/recent-filter
Sep 28, 2026
Merged

xintaofei merged 8 commits into
xintaofei:mainfrom
SousekiL:feat/recent-filter

Conversation

@SousekiL

@SousekiL SousekiL commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

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:

  • Options are listed as text with the current one checked, so new users don't have to guess what an icon means; the button stays visible whenever the filter isn't "All" instead of hiding along with the other hover buttons, avoiding a list that "mysteriously gets shorter". The button's tooltip states the current filter.
  • The filter value is persisted to localStorage (workspace:sidebar-recent-filter), consistent with other sidebar view preferences; any invalid value falls back to "All".
  • selectRecentConversationsWithReuse gains an optional filter parameter, defaulting to "all", so existing callers are unaffected.
  • When the filtered list is empty, the empty-state message reflects the current filter ("No recent chats" / "No recent folder sessions").
  • Copy added in 10 languages.

Testing

  • Added unit tests for grouping and the header; all tests under src/components/conversations pass.
  • pnpm lint, tsc --noEmit pass.

Assisted with Claude Code

SousekiL and others added 8 commits September 27, 2026 05:58
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.
@xintaofei

Copy link
Copy Markdown
Owner

codeg work task 243 is done — #848 (7 files, +182/-30).

@xintaofei
xintaofei merged commit 7c77627 into xintaofei:main Sep 28, 2026
7 checks passed
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