Skip to content

feat: Add filters to History Page V2#1088

Merged
adhityamamallan merged 6 commits intocadence-workflow:masterfrom
adhityamamallan:history-v2-filters
Nov 24, 2025
Merged

feat: Add filters to History Page V2#1088
adhityamamallan merged 6 commits intocadence-workflow:masterfrom
adhityamamallan:history-v2-filters

Conversation

@adhityamamallan
Copy link
Member

@adhityamamallan adhityamamallan commented Nov 19, 2025

Summary

  • Add Filters menu to History Page V2, in a popover menu
  • Add colour codes for various event filtering types

Test plan

Unit tests + ran locally.

Screenshot 2025-11-21 at 12 02 59

With sticky header

Screenshot 2025-11-21 at 12 15 50

On narrow screens

Screenshot 2025-11-21 at 12 16 00

With some values selected

Screenshot 2025-11-21 at 12 16 19

Copy link
Contributor

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 adds a filters menu to the History Page V2 using a popover UI pattern, replacing the previous toggle-based approach. The implementation includes color-coded filter options for event types and comprehensive test coverage.

Key Changes

  • Replaced PageFiltersToggle with a StatefulPopover containing a new WorkflowHistoryFiltersMenu component
  • Added color configuration for workflow history event filtering types
  • Created filter option configurations for both type and status filters using the TagFilter component

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/views/workflow-history-v2/workflow-history-v2.types.ts Added type definition for event filtering type colors
src/views/workflow-history-v2/workflow-history-v2.tsx Updated import path to use v2-specific filter configuration
src/views/workflow-history-v2/workflow-history-header/workflow-history-header.tsx Replaced filter toggle with popover-based filters button
src/views/workflow-history-v2/workflow-history-header/workflow-history-header.styles.ts Added popover and button overrides for styling
src/views/workflow-history-v2/workflow-history-header/__tests__/workflow-history-header.test.tsx Updated tests to reflect new popover-based UI
src/views/workflow-history-v2/workflow-history-filters-menu/workflow-history-filters-menu.types.ts Added type definitions for filters menu props
src/views/workflow-history-v2/workflow-history-filters-menu/workflow-history-filters-menu.tsx Implemented new filters menu component with reset functionality
src/views/workflow-history-v2/workflow-history-filters-menu/workflow-history-filters-menu.styles.ts Added styled components for filters menu layout
src/views/workflow-history-v2/workflow-history-filters-menu/__tests__/workflow-history-filters-menu.test.tsx Added comprehensive test suite for filters menu
src/views/workflow-history-v2/config/workflow-history-filters.config.ts Created v2 filter configuration using TagFilter components
src/views/workflow-history-v2/config/workflow-history-filters-type-options.config.ts Configured type filter options with color-coded icons
src/views/workflow-history-v2/config/workflow-history-filters-status-options.config.ts Configured status filter options with themed icons
src/views/workflow-history-v2/config/workflow-history-event-filtering-type-colors.config.ts Defined color palette for event filtering types

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +13 to +52
startEnhancer: () =>
createElement(MdCircle, {
color: workflowHistoryEventFilteringTypeColorsConfig.ACTIVITY.content,
}),
},
DECISION: {
label: 'Decision',
startEnhancer: () =>
createElement(MdCircle, {
color: workflowHistoryEventFilteringTypeColorsConfig.DECISION.content,
}),
},
SIGNAL: {
label: 'Signal',
startEnhancer: () =>
createElement(MdCircle, {
color: workflowHistoryEventFilteringTypeColorsConfig.SIGNAL.content,
}),
},
TIMER: {
label: 'Timer',
startEnhancer: () =>
createElement(MdCircle, {
color: workflowHistoryEventFilteringTypeColorsConfig.TIMER.content,
}),
},
CHILDWORKFLOW: {
label: 'Child Workflow',
startEnhancer: () =>
createElement(MdCircle, {
color:
workflowHistoryEventFilteringTypeColorsConfig.CHILDWORKFLOW.content,
}),
},
WORKFLOW: {
label: 'Other',
startEnhancer: () =>
createElement(MdCircle, {
color: workflowHistoryEventFilteringTypeColorsConfig.WORKFLOW.content,
}),
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

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

The startEnhancer functions should accept a { theme } parameter to match the TagFilterOptionConfig type signature. Currently they're defined as () => createElement(...) but should be ({ theme }) => createElement(...). While the theme parameter isn't used here (colors are hardcoded), it's required by the type definition and should be accepted for consistency with the status options config.

Copilot uses AI. Check for mistakes.
</styled.MenuHeader>
<styled.MenuFilters>
{workflowHistoryFiltersConfig.map(
(filter: WorkflowHistoryFilterConfig<any>) => (
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

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

The explicit type annotation WorkflowHistoryFilterConfig<any> using any is unnecessary and reduces type safety. TypeScript can infer the type from workflowHistoryFiltersConfig automatically. Consider removing the explicit type annotation and let TypeScript infer: workflowHistoryFiltersConfig.map((filter) => ...)

Suggested change
(filter: WorkflowHistoryFilterConfig<any>) => (
(filter) => (

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

Unfortunately, this isn't the case. Typescript assumes that the type should satisfy all possible filter values at once

@adhityamamallan adhityamamallan marked this pull request as ready for review November 21, 2025 11:23
Signed-off-by: Adhitya Mamallan <adhitya.mamallan@uber.com>
Signed-off-by: Adhitya Mamallan <adhitya.mamallan@uber.com>
Signed-off-by: Adhitya Mamallan <adhitya.mamallan@uber.com>
Signed-off-by: Adhitya Mamallan <adhitya.mamallan@uber.com>
Signed-off-by: Adhitya Mamallan <adhitya.mamallan@uber.com>
@adhityamamallan adhityamamallan merged commit 0f3132c into cadence-workflow:master Nov 24, 2025
5 checks passed
@adhityamamallan adhityamamallan deleted the history-v2-filters branch November 24, 2025 11:17
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.

3 participants