From ab87ed55e2bff829fd2c7ac177b969c735e56e81 Mon Sep 17 00:00:00 2001 From: Amber Agent Date: Thu, 4 Dec 2025 21:00:22 +0000 Subject: [PATCH] fix(frontend): reset pagination offset when refreshing sessions list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The refresh button on the sessions page now resets the offset to 0 before refetching data. This ensures users are returned to the first page when clicking refresh, preventing confusion when the number of sessions changes. This behavior is now consistent with the search functionality which also resets to page 1. Fixes #439 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../src/components/workspace-sections/sessions-section.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/frontend/src/components/workspace-sections/sessions-section.tsx b/components/frontend/src/components/workspace-sections/sessions-section.tsx index 034bfc81..28b06128 100644 --- a/components/frontend/src/components/workspace-sections/sessions-section.tsx +++ b/components/frontend/src/components/workspace-sections/sessions-section.tsx @@ -117,6 +117,11 @@ export function SessionsSection({ projectName }: SessionsSectionProps) { setSearchInput(e.target.value); }; + const handleRefresh = () => { + setOffset(0); + refetch(); + }; + return ( @@ -128,7 +133,7 @@ export function SessionsSection({ projectName }: SessionsSectionProps) {
-