Bug
In packages/web/src/client/src/components/all-chats/DirectoryGroup.tsx, sessionsToShow is hardcoded to filteredSessions.slice(0, INITIAL_SESSIONS_SHOWN) with no local state to track whether the user clicked "Show all".
Clicking the button calls loadMoreGroupSessions(encodedPath), which fetches more sessions from the server and updates the store — but the rendering slice cap never changes. The user can never see more than 10 sessions per directory group regardless of how many are loaded.
Steps to Reproduce
- Open All Chats page
- Find a directory group with >10 sessions
- Click "Show all N sessions"
- Observe: still only 10 sessions displayed
Expected
After clicking "Show all", all locally-loaded sessions should be rendered. If there are more on the server, fetch and display those too.
Fix Direction
Add a local showAll state flag. When showAll is true, render filteredSessions unsliced. The "Show all" click should first expand locally-loaded sessions, and only fetch from the server when hasMoreOnServer is true.
File
packages/web/src/client/src/components/all-chats/DirectoryGroup.tsx ~line 72-80
Origin
PR #144 CodeRabbit review
Bug
In
packages/web/src/client/src/components/all-chats/DirectoryGroup.tsx,sessionsToShowis hardcoded tofilteredSessions.slice(0, INITIAL_SESSIONS_SHOWN)with no local state to track whether the user clicked "Show all".Clicking the button calls
loadMoreGroupSessions(encodedPath), which fetches more sessions from the server and updates the store — but the rendering slice cap never changes. The user can never see more than 10 sessions per directory group regardless of how many are loaded.Steps to Reproduce
Expected
After clicking "Show all", all locally-loaded sessions should be rendered. If there are more on the server, fetch and display those too.
Fix Direction
Add a local
showAllstate flag. WhenshowAllis true, renderfilteredSessionsunsliced. The "Show all" click should first expand locally-loaded sessions, and only fetch from the server whenhasMoreOnServeris true.File
packages/web/src/client/src/components/all-chats/DirectoryGroup.tsx~line 72-80Origin
PR #144 CodeRabbit review