Fix sidebar session list responsiveness

This commit is contained in:
wuyang6
2026-05-11 20:53:08 +08:00
parent c4427bbd07
commit 47f08dba04
5 changed files with 153 additions and 145 deletions
@@ -117,7 +117,7 @@ export function ThreadListSidebar({
<SidebarTrigger className="size-8 shrink-0" />
</div>
</SidebarHeader>
<SidebarContent className="aui-sidebar-content px-2">
<SidebarContent className="aui-sidebar-content overflow-hidden px-2">
<ThreadList />
</SidebarContent>
<SidebarRail />
@@ -341,7 +341,7 @@ function useSidebarSessions(open: boolean) {
.then((res) => (res.ok ? res.json() : []))
.then((payload) => {
if (cancelled || !Array.isArray(payload)) return;
setSessions(dedupeSidebarSessions(payload).slice(0, 12));
setSessions(dedupeSidebarSessions(payload));
})
.catch(() => {
if (!cancelled) setSessions([]);