Skip to content

feat(frontend): Publish Agent Dialog Agent List Pagination #9833

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

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

Kedarinath1502
Copy link

@Kedarinath1502 Kedarinath1502 commented Apr 17, 2025

Added pagination for the frontend.

with <20 agents
image

with >20 agents video

Screen.Recording.2025-04-28.at.3.06.51.PM.mov

@Kedarinath1502 Kedarinath1502 requested a review from a team as a code owner April 17, 2025 01:26
@Kedarinath1502 Kedarinath1502 requested review from Bentlybro and kcze and removed request for a team April 17, 2025 01:26
@github-project-automation github-project-automation bot moved this to 🆕 Needs initial review in AutoGPT development kanban Apr 17, 2025
@CLAassistant
Copy link

CLAassistant commented Apr 17, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

This PR targets the master branch but does not come from dev or a hotfix/* branch.

Automatically setting the base branch to dev.

@github-actions github-actions bot changed the base branch from master to dev April 17, 2025 01:26
Copy link

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

API Parameter Change

The PR adds pagination parameters to the getMyAgents API call, but it's unclear if the backend API has been updated to support these parameters. Verify that the backend endpoint can handle page and page_size parameters.

const response = await api.getMyAgents({ page: currentPage, page_size: 20 });
setMyAgents(response);
Error Handling

The error handling for the API call shows the error in the console but doesn't provide user feedback. Consider adding a toast notification or error message for users when agent loading fails.

} catch (error) {
  console.error("Failed to load my agents:", error);
} finally {
  setLoading(false);

@github-actions github-actions bot added platform/frontend AutoGPT Platform - Front end platform/backend AutoGPT Platform - Back end and removed Review effort 2/5 labels Apr 17, 2025
Copy link

netlify bot commented Apr 17, 2025

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit 09bd708
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/680fdf1220d5710008fb4cf0

Copy link

deepsource-io bot commented Apr 17, 2025

Here's the code health analysis summary for commits a1f17ca..09bd708. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScript✅ Success
❗ 8 occurences introduced
🎯 6 occurences resolved
View Check ↗
DeepSource Python LogoPython✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label Apr 18, 2025
Copy link
Contributor

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

@kcze
Copy link
Contributor

kcze commented Apr 21, 2025

Thank you for the contribution! Please revert yarn.lock file since it's an unrelated change causing conflict and run yarn format in autogpt_platform/frontend directory.

Copy link
Contributor

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

@github-actions github-actions bot added size/l and removed conflicts Automatically applied to PRs with merge conflicts size/xl labels Apr 21, 2025
Copy link

netlify bot commented Apr 21, 2025

Deploy Preview for auto-gpt-docs-dev canceled.

Name Link
🔨 Latest commit 09bd708
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs-dev/deploys/680fdf126dd59b000874a559

@github-actions github-actions bot added size/m and removed size/l labels Apr 21, 2025
@Kedarinath1502
Copy link
Author

I’ve reverted the frontend yarn.lock to match upstream and applied yarn format. All CI and style checks are now passing on frontendpagination. Please let me know if there’s anything else I should adjust—thanks!

@ntindle ntindle changed the title Frontendpagination feat(frontend): Publish Agent Dialog Agent List Pagination Apr 28, 2025
@ntindle
Copy link
Member

ntindle commented Apr 28, 2025

fixes #9833

@github-actions github-actions bot added size/l and removed size/m labels Apr 28, 2025
@ntindle
Copy link
Member

ntindle commented Apr 30, 2025

This is great!! We really appreciate the contribution.

I had a chat with the designers and they requested
“Would you mind changing it so it’s an infinite scroll so that we don’t have extra UI elements?”

I also pushed some changes to the backend to help with testing this for ya

Let me know if you need any help :)

onClick={() =>
setCurrentPage((p) => Math.max(1, p - 1))
}
disabled={currentPage === 1}
Copy link
Member

Choose a reason for hiding this comment

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

Swap this from page based to infinite scroll once the last page comes into view

@github-project-automation github-project-automation bot moved this from 🆕 Needs initial review to 🚧 Needs work in AutoGPT development kanban Apr 30, 2025
@kcze
Copy link
Contributor

kcze commented May 8, 2025

Would you mind changing it so it’s an infinite scroll so that we don’t have extra UI elements?

This makes this PR pointless because the whole PR is pagination @ntindle unless you mean if there're <20 agents?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform/backend AutoGPT Platform - Back end platform/frontend AutoGPT Platform - Front end size/l
Projects
Status: 🚧 Needs work
Status: No status
Development

Successfully merging this pull request may close these issues.

4 participants