AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

feat(platform/library): Allow sorting Agents by Last Execution Time

Open Keerthi421 opened this issue 7 months ago β€’ 7 comments

Changes πŸ—οΈ

This PR implements a new sorting option in the Library view to order agents by their last execution time rather than last edit time. This addresses a common user need to quickly access recently run agents, regardless of how they were executed (via GUI or otherwise).

-->Added LAST_EXECUTION to LibraryAgentSortEnum in types.ts -->Updated the dropdown in library-sort-menu.tsx to include a "Last Run" option -->Modified the placeholder text based on the selected sort option -->Changed the default sort behavior in state-provider.tsx to LAST_EXECUTION -->Adjusted API request logic to pass lastExecution as the sort key, enabling backend-side sorting by run time -->Ensured sorting accounts for all executions (manual and automatic) #9860

Keerthi421 avatar Apr 23 '25 12:04 Keerthi421

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Apr 23 '25 12:04 CLAassistant

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

Default Value Inconsistency

The component sets a defaultValue for the Select component but also implements dynamic placeholder text. This could lead to UI inconsistencies where the displayed text doesn't match the actual selected value.

<Select onValueChange={handleSortChange} defaultValue={librarySort}>
  <SelectTrigger className="ml-1 w-fit space-x-1 border-none px-0 text-base underline underline-offset-4 shadow-none">
    <ArrowDownNarrowWideIcon className="h-4 w-4 sm:hidden" />
    <SelectValue placeholder={getPlaceholderText()} />

qodo-code-review[bot] avatar Apr 23 '25 12:04 qodo-code-review[bot]

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[bot] avatar Apr 23 '25 12:04 github-actions[bot]

Here's the code health analysis summary for commits 1e3236a..9c19fe0. View details on DeepSourceΒ β†—.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScriptβœ…Β Success
❗ 5 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.

deepsource-io[bot] avatar Apr 23 '25 12:04 deepsource-io[bot]

Deploy Preview for auto-gpt-docs ready!

Name Link
Latest commit 9c19fe00e55b733ea0da5d3033a45ca7a2d2b0f1
Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/6812f84124bc2a00086b5999
Deploy Preview https://deploy-preview-9871--auto-gpt-docs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Apr 23 '25 12:04 netlify[bot]

Deploy Preview for auto-gpt-docs-dev ready!

Name Link
Latest commit 9c19fe00e55b733ea0da5d3033a45ca7a2d2b0f1
Latest deploy log https://app.netlify.com/sites/auto-gpt-docs-dev/deploys/6812f8416a4459000844acce
Deploy Preview https://deploy-preview-9871--auto-gpt-docs-dev.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Apr 24 '25 05:04 netlify[bot]

Hey @Keerthi421, welcome to the AutoGPT community! Thank you so much for picking this ticket up.

To help us get this merged, could you please run the formatter and sign the CLA?

Torantulino avatar Apr 26 '25 11:04 Torantulino

@Pwuts Thankyou , I will work on it

Keerthi421 avatar May 05 '25 14:05 Keerthi421

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

github-actions[bot] avatar Jun 30 '25 12:06 github-actions[bot]

Continuing this as #10353

Pwuts avatar Jul 11 '25 13:07 Pwuts