Skip to content

Conversation

@MatthewBemis
Copy link
Member

@MatthewBemis MatthewBemis commented Nov 6, 2025

Jira Ticket: https://broadworkbench.atlassian.net/browse/TSPS-634

Depends on https://broadworkbench.atlassian.net/browse/TSPS-502

Summary of changes:

What

  • Adds job history filtering controls for description, jobId, status, and pipelineName, supported on the backend as part of TSPS-502 (PR link coming soon)
  • Reorganizes a bunch of the code to be better grouped by tab
  • Refactored pipeline fetching to use a common hook usePipelinesList
  • A few unrelated Sonar fixes
Screen.Recording.2025-11-06.at.3.43.48.PM.mov

Why

Testing strategy

@MatthewBemis MatthewBemis changed the title [TSPS-642] Add filtering controls to Teaspoons Job History page [wip] [TSPS-634] Add filtering controls to Teaspoons Job History page [wip] Nov 6, 2025
error: Error | undefined;
}

export const usePipelinesList = (): UsePipelinesListResult => {
Copy link
Member Author

@MatthewBemis MatthewBemis Nov 6, 2025

Choose a reason for hiding this comment

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

factored this fetch logic out into a hook because all 3 tabs now rely on it

@@ -149,7 +149,7 @@ export const ViewOutputsModal = ({ jobId, onDismiss }: OutputsModalProps): React
</div>
) : (
<div style={{ padding: '1rem', textAlign: 'center' }}>
No output information found for this job. If this job completed more than $
No output information found for this job. If this job completed more than{' '}
Copy link
Member Author

Choose a reason for hiding this comment

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

drive-by fix to remove unnecessary dollar sign

Copy link
Contributor

Choose a reason for hiding this comment

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

time is money!

}}
>
<div style={{ fontWeight: 600, fontSize: '14px' }}>Description</div>
<DelayedSearchInput
Copy link
Member Author

Choose a reason for hiding this comment

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

these inputs are debounced to avoid hitting the backend for every single keystroke in the text input

Comment on lines +146 to +179
control: (provided) => ({
...provided,
minHeight: '2.25rem',
height: '2.25rem',
}),
Copy link
Member Author

Choose a reason for hiding this comment

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

it drove me crazy that the height of the Select component was a few pixels taller than the height of the text input components that are next to these, hence the height style override to make them consistent

Comment on lines +55 to +58
...(status ? { status } : {}),
...(description ? { description } : {}),
...(jobId ? { jobId } : {}),
...(pipelineName ? { pipelineName } : {}),
Copy link
Member Author

Choose a reason for hiding this comment

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

this query string formulation may change pending the results of TSPS-502, but that's such an insignificant detail that the rest of the PR can still be reviewed imo

@broadbot broadbot requested a deployment to pr-4 November 6, 2025 20:27 Abandoned
Copy link
Member Author

@MatthewBemis MatthewBemis Nov 6, 2025

Choose a reason for hiding this comment

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

you'll see a bunch of directory changes- i did some re-organization that felt a little bit overdue especially after working on this ticket. components that aren't used in multiple places are now grouped more closely with the tab that they belong to.

@broadbot broadbot requested a deployment to pr-4 November 6, 2025 20:56 Abandoned
@MatthewBemis MatthewBemis changed the title [TSPS-634] Add filtering controls to Teaspoons Job History page [wip] [TSPS-634] Add filtering controls to Teaspoons Job History page Nov 6, 2025
const response = await fetch(url, { method: 'HEAD' });
const size = response.headers.get('content-length');
return size ? formatBytes(parseInt(size)) : 'Unknown size';
return size ? formatBytes(Number.parseInt(size)) : 'Unknown size';
Copy link
Member Author

Choose a reason for hiding this comment

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

driveby fix for a sonar warning that got flagged since i touched this code


const DataDeletionDateCell = ({ pipelineRun }: CellProps): ReactNode => {
if (!pipelineRun.timeCompleted || !(pipelineRun.status === 'SUCCEEDED')) {
if (!pipelineRun.timeCompleted || pipelineRun.status !== 'SUCCEEDED') {
Copy link
Member Author

Choose a reason for hiding this comment

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

another driveby sonar fix

config/dev.json Outdated
"orchestrationUrlRoot": "https://firecloud-orchestration.dsde-dev.broadinstitute.org",
"rawlsUrlRoot": "https://rawls.dsde-dev.broadinstitute.org",
"teaspoonsUrlRoot": "https://teaspoons.dsde-dev.broadinstitute.org",
"teaspoonsUrlRoot": "http://localhost:8080",
Copy link
Member Author

Choose a reason for hiding this comment

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

will revert this prior to merging, but needed to test this against my local teaspoons w/ the changes

@MatthewBemis MatthewBemis marked this pull request as ready for review November 6, 2025 22:28
@MatthewBemis MatthewBemis requested a review from a team as a code owner November 6, 2025 22:28
Copy link

@jsotobroad jsotobroad left a comment

Choose a reason for hiding this comment

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

this makes sense to me. It might be worth going over as a team just to get an understanding of the new file structure and changes added here since it seems not insignificant

pageNumber,
...(sortProperty ? { sortProperty } : {}),
...(sortDirection ? { sortDirection } : {}),
...(status ? { status } : {}),

Choose a reason for hiding this comment

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

its kinda crazy all of these changes to "just" pass in these values

Copy link

@jsotobroad jsotobroad left a comment

Choose a reason for hiding this comment

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

thank you for the walkthrough in post!

Copy link
Contributor

@mmorgantaylor mmorgantaylor left a comment

Choose a reason for hiding this comment

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

looks fantastic. I love being able to show and hide the filters. 👍 pending reverting the teaspoonsUrlRoot value for dev

@@ -149,7 +149,7 @@ export const ViewOutputsModal = ({ jobId, onDismiss }: OutputsModalProps): React
</div>
) : (
<div style={{ padding: '1rem', textAlign: 'center' }}>
No output information found for this job. If this job completed more than $
No output information found for this job. If this job completed more than{' '}
Copy link
Contributor

Choose a reason for hiding this comment

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

time is money!

const [submittedJobId, setSubmittedJobId] = useState<string>();

// User quota for the selected pipeline
const { isLoading: isLoadingPipelines, pipelines: pipelinesList } = usePipelinesList();
Copy link
Contributor

Choose a reason for hiding this comment

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

great refactor

@MatthewBemis MatthewBemis force-pushed the mb-tsps-filtering-jobs branch from b0f18b5 to e0cd572 Compare November 18, 2025 19:19
@sonarqubecloud
Copy link

@MatthewBemis MatthewBemis added this pull request to the merge queue Nov 18, 2025
Merged via the queue into dev with commit b1dee1e Nov 18, 2025
11 checks passed
@MatthewBemis MatthewBemis deleted the mb-tsps-filtering-jobs branch November 18, 2025 20:08
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.

5 participants