Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ build_steps: &build_steps # Initialization.
- run: *install_deploysuite
- run: *build_configuration_fetch
- run: *running_yarn_build
- run: *running_yarn_sb_build
# - run: *running_yarn_sb_build

Choose a reason for hiding this comment

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

[⚠️ maintainability]
The running_yarn_sb_build step has been commented out. Ensure that this is intentional and that the Storybook build is no longer needed in the build process. If it is still required, consider implementing a conditional execution based on environment or branch to avoid unnecessary builds.

- persist_to_workspace: *workspace_persist

deploy_steps: &deploy_steps
Expand Down
6 changes: 5 additions & 1 deletion src/apps/review/src/lib/hooks/useFetchAiWorkflowRuns.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useCallback, useEffect, useRef, useState } from 'react'
import { orderBy, uniqBy } from 'lodash'
import useSWR, { SWRResponse } from 'swr'

import { EnvironmentConfig } from '~/config'
Expand Down Expand Up @@ -141,9 +142,12 @@ export function useFetchAiWorkflowsRuns(
}
}, [fetchError])

const uniqueRuns = uniqBy(orderBy(runs, 'completedAt', 'desc'), 'workflow.id')

Choose a reason for hiding this comment

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

[⚠️ performance]
The reverse() method is used after orderBy, which might be unnecessary if the intention is to sort in descending order. Consider removing reverse() and using orderBy(runs, 'completedAt', 'asc') if ascending order is desired.

.reverse()

return {
isLoading,
runs,
runs: uniqueRuns,
}
}

Expand Down
Loading