Skip to content

Add useRunSearchParams hook for pipeline run filtering#1704

Merged
Mbeaulne merged 1 commit intomasterfrom
01-27-pipeline_run_filters_-_basic
Feb 10, 2026
Merged

Add useRunSearchParams hook for pipeline run filtering#1704
Mbeaulne merged 1 commit intomasterfrom
01-27-pipeline_run_filters_-_basic

Conversation

@Mbeaulne
Copy link
Collaborator

@Mbeaulne Mbeaulne commented Jan 27, 2026

Resolves: https://github.com/Shopify/oasis-frontend/issues/456

Description

Adds a new useRunSearchParams hook to manage pipeline run filter state with URL synchronization. This hook provides a clean interface for components to read and update filter parameters while keeping them persisted in the URL.

Type of Change

  • New feature

Changes

  • Added useRunSearchParams hook with:
    • filters - Current filter state parsed from URL
    • setFilter / setFilters - Update individual or multiple filters
    • setFilterDebounced - Debounced filter updates (300ms) for text inputs
    • clearFilters - Reset all filters
    • hasActiveFilters / activeFilterCount - Helper state for UI
  • Added PipelineRunFilters and AnnotationFilter types
  • Enabled React Compiler for the new hook

Checklist

  • I have tested this does not break current pipelines/runs functionality

Test Instructions

This feature has no UI so we can't test yet. If you want to validate it you can use any of the branches above to confirm.
Run the test suite:

npm test src/hooks/useRunSearchParams.test.ts

Copy link
Collaborator Author

Mbeaulne commented Jan 27, 2026

@Mbeaulne Mbeaulne changed the title Pipeline run filters - basic Add useRunSearchParams hook for pipeline run filtering Jan 27, 2026
@Mbeaulne Mbeaulne force-pushed the 01-27-pipeline_run_filters_-_basic branch from 1f60f2c to 57a994f Compare January 27, 2026 15:32
@Mbeaulne Mbeaulne force-pushed the 01-27-pipeline_run_filters_-_basic branch 2 times, most recently from 8d921a9 to 5de01ff Compare January 28, 2026 20:46
@Mbeaulne Mbeaulne force-pushed the 01-27-pipeline_run_filters_-_basic branch from 5de01ff to 29c1ac2 Compare February 2, 2026 20:20
@Mbeaulne Mbeaulne marked this pull request as ready for review February 2, 2026 21:07
@Mbeaulne Mbeaulne requested a review from a team as a code owner February 2, 2026 21:07
@Mbeaulne Mbeaulne force-pushed the 01-27-pipeline_run_filters_-_basic branch from 29c1ac2 to 1ea6b69 Compare February 2, 2026 21:08
@Mbeaulne Mbeaulne changed the title Add useRunSearchParams hook for pipeline run filtering WIP: Add useRunSearchParams hook for pipeline run filtering Feb 2, 2026
@Mbeaulne Mbeaulne force-pushed the 01-27-pipeline_run_filters_-_basic branch 2 times, most recently from 36a66d1 to 682be80 Compare February 2, 2026 21:14
@Mbeaulne Mbeaulne changed the title WIP: Add useRunSearchParams hook for pipeline run filtering Add useRunSearchParams hook for pipeline run filtering Feb 2, 2026
@TangleML TangleML deleted a comment from graphite-app bot Feb 2, 2026
@Mbeaulne Mbeaulne force-pushed the 01-27-pipeline_run_filters_-_basic branch 6 times, most recently from d6151d8 to 221b53c Compare February 3, 2026 16:58
@Mbeaulne Mbeaulne force-pushed the 01-27-pipeline_run_filters_-_basic branch 3 times, most recently from c9f149a to 0d4873c Compare February 3, 2026 18:03
@Mbeaulne Mbeaulne changed the title Add useRunSearchParams hook for pipeline run filtering WIP: Add useRunSearchParams hook for pipeline run filtering Feb 4, 2026
Comment on lines +87 to +92
export function isValidExecutionStatus(
value: string,
): value is ContainerExecutionStatus {
return value in EXECUTION_STATUS_LABELS;
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I go back and forth keeping this here or adding it to pipelineRunFilterUtils.

Choose a reason for hiding this comment

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

It is at least only dependent on variables in this same file. So I think it's reasonable to have it here!

I can totally see a case being made to go in either direction. You could say "if it's only used in one place, put it in that one place or don't have a function at all".

Programmer to programmer haha.

@Mbeaulne Mbeaulne force-pushed the 01-27-pipeline_run_filters_-_basic branch from 0d4873c to d10ce1d Compare February 9, 2026 17:11
@Mbeaulne Mbeaulne changed the title WIP: Add useRunSearchParams hook for pipeline run filtering Add useRunSearchParams hook for pipeline run filtering Feb 9, 2026
@Mbeaulne Mbeaulne force-pushed the 01-27-pipeline_run_filters_-_basic branch 2 times, most recently from e774f18 to fbfb714 Compare February 9, 2026 19:51
@Mbeaulne Mbeaulne force-pushed the 01-27-pipeline_run_filters_-_basic branch 2 times, most recently from 2318f55 to 35bac10 Compare February 9, 2026 20:56
@Mbeaulne Mbeaulne requested a review from morgan-wowk February 9, 2026 21:16
Copy link
Collaborator Author

Mbeaulne commented Feb 10, 2026

Merge activity

  • Feb 10, 2:57 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Feb 10, 3:00 PM UTC: Graphite rebased this pull request as part of a merge.
  • Feb 10, 3:01 PM UTC: @Mbeaulne merged this pull request with Graphite.

@Mbeaulne Mbeaulne force-pushed the 01-27-pipeline_run_filters_-_basic branch from 35bac10 to f5a1be4 Compare February 10, 2026 14:59
@Mbeaulne Mbeaulne merged commit e25826a into master Feb 10, 2026
8 checks passed
@Mbeaulne Mbeaulne deleted the 01-27-pipeline_run_filters_-_basic branch February 10, 2026 15:01
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

Comments