- Notifications
You must be signed in to change notification settings - Fork21
Auto refetch run items when workflow run status has changed#1346
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| 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}]`, |
There was a problem hiding this comment.
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 likerunStatus=${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}]`,'')), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
[correctness]
The use ofurl.replace([${runStatus}], '') to remove the run status from the URL is error-prone. IfrunStatus 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> | ||
| <pclassName={styles.modelDescription}> | ||
| <divclassName={styles.modelDescription}> |
There was a problem hiding this comment.
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 formodelDescription 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> | ||
| <pclassName={styles.workflowDescription}> | ||
| <divclassName={styles.workflowDescription}> |
There was a problem hiding this comment.
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.
fe11f1b intodevUh oh!
There was an error while loading.Please reload this page.
Related JIRA Ticket:
https://topcoder.atlassian.net/browse/
What's in this PR?