Skip to content

New Feature Pagination #4704

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

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

vinodkiran
Copy link
Contributor

@vinodkiran vinodkiran commented Jun 23, 2025

Adding Pagination Support (Table view and Card view) for the following

  • Chatflows
  • Agentflows (v1/v2)
  • Chat Sessions
  • Agent Executions (already existing)
  • Assistants - Custom
  • Assistants - OpenAI
  • Tools
  • Variables
  • API Keys
  • Document Stores
  • Datasets
  • Dataset Items
  • Evaluators
  • Evaluations (with versions)

The following will NOT be taken up in this PR and will be handled separately shortly.

  • Document Loaders
  • Chat Messages for a session
  • Credentials
  • SSO Config (not needed)
  • Roles
  • Users
  • Workspaces
  • Login Activity - redo pagination to make it consistent with the rest of the application.

@vinodkiran vinodkiran requested review from Copilot, 0xi4o and HenryHengZJ and removed request for 0xi4o June 23, 2025 02:03
@vinodkiran vinodkiran requested a review from chungyau97 June 23, 2025 02:06
Copilot

This comment was marked as outdated.

HenryHengZJ and others added 6 commits June 24, 2025 23:12
2) ensure page limits are passed on load
3) co-pilot review comments (n+1 query)
4)
2) ensure page limits are passed on load
3) co-pilot review comments (n+1 query)
4) refresh lists after insert/delete.
@vinodkiran vinodkiran requested a review from Copilot June 27, 2025 06:39
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds pagination support across list and table views by wiring a new TablePagination component through the UI, extending API client calls to accept page & limit parameters, and updating server-side controllers and services to handle paginated queries.

  • Introduce a reusable TablePagination component in the UI
  • Update list views to manage currentPage, pageLimit, total and call APIs with pagination
  • Extend client API methods, controllers, and services to accept and apply page/limit parameters

Reviewed Changes

Copilot reviewed 50 out of 50 changed files in this pull request and generated 2 comments.

Show a summary per file
File Pattern Description
packages/ui/src/views/*/index.jsx Added pagination state/hooks and rendered <TablePagination>
packages/ui/src/ui-component/pagination/TablePagination.jsx New reusable pagination component
packages/ui/src/api/*.js Updated getAll* endpoints to accept { params: { page, limit } }
packages/server/src/utils/pagination.ts New utility to parse page and limit from req.query
packages/server/src/services/*/index.ts Updated services to apply .skip()/.take() when page>0 & limit>0
packages/server/src/controllers/*/index.ts Controllers now call services with parsed page and limit
packages/ui/src/ui-component/table/DocumentStoreTable.jsx New table component for document store view
Comments suppressed due to low confidence (1)

packages/ui/src/views/variables/index.jsx:343

  • Filtering the variable list client-side after pagination limits results to the current page only, so search won’t find matches on other pages. Consider passing the search query to the API so filtering happens server-side before pagination.
                                                    {variables.filter(filterVariables).map((variable, index) => (

… API key services

- Added check for empty entities in DocumentStoreDTO.fromEntities to return an empty array.
- Updated condition in getAllDocumentStores to handle total count correctly, allowing for zero total.
- Refined logic in getAllApiKeys to check for empty keys and ensure correct API key retrieval.
- Adjusted UI components to safely handle potential undefined apiKeys array.
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.

4 participants