-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix user pagination and page setting #3056
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR modifies user pagination and time filtering functionality in the Helicone web application.
- Added time filter parameter to
useUsers
hook in/web/services/hooks/users.tsx
but count endpoint doesn't use combined filter - Switched from prop-based to URL query parameter state management in
/web/components/templates/users/usersPageV2.tsx
- Inconsistency between default sort direction ('asc') and fallback ('desc') in user page sorting
- Updated page size options and defaults for user table pagination
- Added
useQueryParam
hook for URL parameter synchronization
2 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile
const [sortDirection, setSortDirection] = useQueryParam( | ||
"sortDirection", | ||
"asc" | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Default sortDirection is 'asc' but fallback on line 89 uses 'desc'. This inconsistency could cause unexpected sorting behavior.
const { users, count, from, isLoading, to, refetch } = useUsers( | ||
currentPage, | ||
pageSize, | ||
parseInt(currentPage, 10), | ||
parseInt(pageSize, 10), | ||
sortLeaf, | ||
filterUITreeToFilterNode( | ||
userTableFilters.sort((a, b) => a.label.localeCompare(b.label)), | ||
debouncedAdvancedFilters | ||
) | ||
// timeFilter | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: refetch is imported but never used after removing the refetch calls from page change handlers
No description provided.