Skip to content

Fix issues with basic visibility filters #928

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

adhityamamallan
Copy link
Member

@adhityamamallan adhityamamallan commented Jun 20, 2025

Summary

  • Fix "Not found" behaviour in basic visibility when filters are active, by combining PageFilters active filters count with manual checks for workflow ID and workflow type
  • Rename the input param areSearchParamsAbsent for getWorkflowsBasicErrorPanelProps to hasActiveSearchParams
  • Fix time range query params being read for advanced visibility workflow listing (this is a no-op because the query param key is the same for both basic visibility and advanced visibility time params)

Test plan

Updated unit tests + ran locally.

Before

Screenshot 2025-06-20 at 4 44 12 PM

After

Screenshot 2025-06-20 at 4 47 13 PM Screenshot 2025-06-20 at 4 47 25 PM

@adhityamamallan adhityamamallan requested a review from Copilot June 20, 2025 14:53
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes filter visibility logic in the basic workflows view and corrects time-range parameters in the advanced workflows view.

  • In the advanced view, use the correct timeRangeStart/timeRangeEnd query keys and update the effect dependencies.
  • In the basic view, integrate the shared usePageFilters hook to combine manual search filters with page filters, pass an areAnyFiltersActive flag to the table, and update error-panel logic/tests accordingly.

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/views/domain-workflows-advanced/domain-workflows-advanced.tsx Switched from timeRangeStartBasic/timeRangeEndBasic to generic query keys and updated dependencies.
src/views/domain-workflows-basic/domain-workflows-basic.tsx Added usePageFilters hook, wired props into filters and table.
src/views/domain-workflows-basic/domain-workflows-basic-table/helpers/get-workflows-basic-error-panel-props.ts Renamed parameter to areAnyFiltersActive and adjusted logic.
src/views/domain-workflows-basic/domain-workflows-basic-table/domain-workflows-basic-table.types.ts Added new areAnyFiltersActive prop.
src/views/domain-workflows-basic/domain-workflows-basic-table/domain-workflows-basic-table.tsx Removed old query-param hook, now uses the passed-in filters flag.
src/views/domain-workflows-basic/domain-workflows-basic-filters/domain-workflows-basic-filters.types.ts Introduced a Props type based on usePageFilters return value.
src/views/domain-workflows-basic/domain-workflows-basic-filters/domain-workflows-basic-filters.tsx Switched the filters component to accept injected usePageFilters props.
Multiple test files Updated tests to pass the new flag and renamed parameter in tests.
Comments suppressed due to low confidence (3)

src/views/domain-workflows-basic/domain-workflows-basic-table/domain-workflows-basic-table.types.ts:7

  • [nitpick] Consider renaming areAnyFiltersActive to hasActiveFilters or isFilterActive for improved readability and consistency with boolean naming conventions.
  areAnyFiltersActive: boolean;

src/views/domain-workflows-basic/domain-workflows-basic-filters/domain-workflows-basic-filters.tsx:5

  • The component uses domainPageQueryParamsConfig in PageFiltersSearch but there’s no import for it; add import domainPageQueryParamsConfig from '../domain-page/config/domain-page-query-params.config';.
import PageFiltersSearch from '@/components/page-filters/page-filters-search/page-filters-search';

src/views/domain-workflows-basic/domain-workflows-basic-filters/domain-workflows-basic-filters.types.ts:1

  • You cannot use typeof usePageFilters on a type-only import; either import the hook as a value (import usePageFilters from ...) or change the Props type to ReturnType<usePageFilters> without typeof.
import type usePageFilters from '@/components/page-filters/hooks/use-page-filters';

@sagar-18-07-2006
Copy link

nice Catch

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