Skip to content

Conversation

@vas3a
Copy link
Collaborator

@vas3a vas3a commented Nov 26, 2025

Related JIRA Ticket:

https://topcoder.atlassian.net/browse/

What's in this PR?

isValidating: isLoading,
}: SWRResponse<AiWorkflowRunItem[], Error> = useSWR<AiWorkflowRunItem[], Error>(
`${TC_API_BASE_URL}/workflows/${workflowId}/runs/${runId}/items`,
`${TC_API_BASE_URL}/workflows/${workflowId}/runs/${runId}/items?[${runStatus}]`,

Choose a reason for hiding this comment

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

[⚠️ correctness]
The query parameter [${runStatus}] in the URL is unconventional and may lead to unexpected behavior if not handled correctly. Consider using a standard query parameter format like runStatus=${runStatus}.

`${TC_API_BASE_URL}/workflows/${workflowId}/runs/${runId}/items`,
`${TC_API_BASE_URL}/workflows/${workflowId}/runs/${runId}/items?[${runStatus}]`,
{
fetcher: url => xhrGetAsync(url.replace(`[${runStatus}]`, '')),

Choose a reason for hiding this comment

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

[⚠️ correctness]
The use of url.replace([${runStatus}], '') to remove the run status from the URL is error-prone. If runStatus contains special characters, it might not be replaced correctly. Consider using a more robust method to construct the URL without the need for replacement.

</div>

<p className={styles.modelDescription}>
<div className={styles.modelDescription}>

Choose a reason for hiding this comment

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

[⚠️ correctness]
Changing the <p> tag to a <div> tag for modelDescription might affect the semantics of the HTML. If the content is still a paragraph, consider using a <p> tag to maintain semantic correctness.

</div>
</div>
<p className={styles.workflowDescription}>
<div className={styles.workflowDescription}>

Choose a reason for hiding this comment

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

[⚠️ correctness]
Changing the <p> tag to a <div> tag may affect the styling and semantics of the content. Ensure that the CSS styles and the semantic meaning of the content are preserved with this change.

@vas3a vas3a merged commit fe11f1b into dev Nov 26, 2025
8 checks passed
@vas3a vas3a deleted the auto-refetch-run-items branch November 26, 2025 15:32
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.

2 participants