Skip to content

Conversation

@adhityamamallan
Copy link
Member

@adhityamamallan adhityamamallan commented Nov 26, 2025

Summary

  • Add WorkflowHistoryEventGroup component that renders the single row for an event group
  • Edit upstream components to pass required props
  • Implement item expansion in History Page V2 using useExpansionToggle hook
  • Fixes to grid styling
  • Add Workflow Actions Modal to History Page V2

Test plan

Added unit tests + ran locally.

Basic table

Screenshot 2025-11-26 at 11 03 48

With hover

Screenshot 2025-11-26 at 15 12 17

Expanded

Screenshot 2025-11-26 at 15 12 21

Reset Workflow form

Screenshot 2025-11-26 at 15 12 25

On narrow screens

image

@adhityamamallan adhityamamallan force-pushed the history-v2-grouped-event branch from f772407 to b89db0f Compare November 26, 2025 12:34
Signed-off-by: Adhitya Mamallan <[email protected]>
Signed-off-by: Adhitya Mamallan <[email protected]>
Signed-off-by: Adhitya Mamallan <[email protected]>
Signed-off-by: Adhitya Mamallan <[email protected]>
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 implements the grouped event view for History v2, introducing a comprehensive event grouping interface with expansion/collapse functionality, duration tracking, and reset capabilities. The changes establish a foundation for displaying workflow history events in a more organized, grouped format.

Key changes:

  • Added event group rendering with Panel-based UI including status badges, timestamps, and durations
  • Implemented expansion/collapse state management using a custom hook for individual event groups
  • Integrated workflow reset functionality with modal support for decision events

Reviewed changes

Copilot reviewed 17 out of 17 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.tsx Added expansion toggle state management, workflow close time computation, and modal integration for reset functionality
src/views/workflow-history-v2/workflow-history-grouped-table/workflow-history-grouped-table.types.ts Extended props to include workflow execution state, event expansion handlers, and reset callbacks
src/views/workflow-history-v2/workflow-history-grouped-table/workflow-history-grouped-table.tsx Replaced placeholder with WorkflowHistoryEventGroup component and updated default item height for virtualized rendering
src/views/workflow-history-v2/workflow-history-grouped-table/workflow-history-grouped-table.styles.ts Adjusted padding to remove space for expand icon (now hidden) and reduced accordion panel padding
src/views/workflow-history-v2/workflow-history-grouped-table/workflow-history-grouped-table.constants.ts Updated grid template columns to accommodate icon, adjusted column proportions for better layout
src/views/workflow-history-v2/workflow-history-grouped-table/__tests__/workflow-history-grouped-table.test.tsx Updated tests to mock WorkflowHistoryEventGroup, removed grid layout test, added new required props to setup
src/views/workflow-history-v2/workflow-history-event-group/workflow-history-event-group.types.ts Defined props interface for event group component with workflow state and interaction handlers
src/views/workflow-history-v2/workflow-history-event-group/workflow-history-event-group.tsx Created event group component with header displaying status, time, duration, and reset button; panel expansion based on event state
src/views/workflow-history-v2/workflow-history-event-group/workflow-history-event-group.styles.ts Defined styled components and overrides for event group panel with grid layout and animation support
src/views/workflow-history-v2/workflow-history-event-group/helpers/get-event-group-filtering-type.ts Implemented helper to determine filtering type based on event group type and attributes
src/views/workflow-history-v2/workflow-history-event-group/helpers/__tests__/get-event-group-filtering-type.test.ts Added comprehensive test coverage for filtering type determination logic
src/views/workflow-history-v2/workflow-history-event-group/__tests__/workflow-history-event-group.test.tsx Created tests for event group rendering, expansion, reset functionality, and loading states
src/views/workflow-history-v2/workflow-history-event-group-duration/workflow-history-event-group-duration.types.ts Defined props for duration component including start/close times and workflow state
src/views/workflow-history-v2/workflow-history-event-group-duration/workflow-history-event-group-duration.tsx Implemented duration component with live updates for ongoing events and conditional rendering
src/views/workflow-history-v2/workflow-history-event-group-duration/helpers/get-formatted-events-duration.ts Created helper to format duration between timestamps with configurable millisecond display
src/views/workflow-history-v2/workflow-history-event-group-duration/helpers/__tests__/get-formatted-events-duration.test.ts Added tests for duration formatting with various time scenarios
src/views/workflow-history-v2/workflow-history-event-group-duration/__tests__/workflow-history-event-group-duration.test.tsx Created tests for duration component behavior including live updates and conditional rendering

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

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Signed-off-by: Adhitya Mamallan <[email protected]>
@adhityamamallan adhityamamallan changed the title feat: History v2 grouped event feat: History Page V2 - implement Event Group row in Workflow History Grouped Table Nov 26, 2025
@adhityamamallan adhityamamallan changed the title feat: History Page V2 - implement Event Group row in Workflow History Grouped Table feat: History Page V2 - event group row in history grouped table Nov 26, 2025
@adhityamamallan adhityamamallan marked this pull request as ready for review November 26, 2025 14:14
Copilot finished reviewing on behalf of adhityamamallan November 26, 2025 14:16
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

Copilot reviewed 17 out of 17 changed files in this pull request and generated 5 comments.


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

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@Assem-Uber
Copy link
Contributor

I have few questions on UI:

  • How does it look on smaller screens ?
  • Where are we adding the Starts in badge?
  • The time and duration fields seems overfitted to the current data. How does workflows with years duration look like ?

import getFormattedEventsDuration from './helpers/get-formatted-events-duration';
import { type Props } from './workflow-history-event-group-duration.types';

export default function WorkflowHistoryEventGroupDuration({
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to duplicate this component? I expect a single flag returning the value without the badge (only text) would be sufficient.

Copy link
Member Author

@adhityamamallan adhityamamallan Dec 1, 2025

Choose a reason for hiding this comment

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

I will be adding the "starts in" duration here in a future PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

Starts in will be in the duration column ? Can you please share the mockup for it, it doesn't seem to be easy to understand.

Copy link
Member Author

Choose a reason for hiding this comment

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

Screenshot 2025-12-01 at 12 34 15 Screenshot 2025-12-01 at 12 36 42

Copy link
Contributor

@Assem-Uber Assem-Uber Dec 1, 2025

Choose a reason for hiding this comment

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

Starts in looks good, can you explain the timer duration. How can it be not fired and have a duration?
Maybe this means the expected timer duration, but if so it seems like we are overloading the duration column with different meanings for the same text.

Copy link
Member Author

Choose a reason for hiding this comment

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

That makes sense, it's moreso just "time since timer was started" and "time until timer fires"

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's a bit clearer in the actual UI because you can see the left number increasing and the right one decreasing every second

}
}

return 'WORKFLOW';
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are is this filtering by WORKFLOW by default ? shouldn't it be null?

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 doesn't do any filtering of its own; rather, it just fetches the group type of the event group. Since we have special logic for signal events, we can't quite use the GroupType field in the history event group itself.

Copy link
Member Author

Choose a reason for hiding this comment

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

I added 'WORKFLOW' as a fallback, but in practice, that case should never be touched.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see any guarantees that this won't be touched in practice. I tried adding a new groupType for history groups and didn't get any type warnings that i need to add an entry inside workflowHistoryFiltersTypeConfig so it is possible to be missed out and in this case we automatically add it to the WORKFLOW type.

It is better to try to cover this case with types, but if not at least we are aware that this is possible and take the correct decision for it. Don't we have a plan to have OTHER group, i think it can be a good fit as a fallback. Feel free to add it as a TODO if it makes sense.

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree. For now, 'WORKFLOW' is our "other" group anyway

Copy link
Member Author

Choose a reason for hiding this comment

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

Added a TODO

@adhityamamallan
Copy link
Member Author

How does it look on smaller screens ?

Unfortunately, it's not very usable on small screens for now; I'm thinking of getting rid of the grid layout and just using a flexbox on small screens.

Where are we adding the Starts in badge?

Next to the duration. I was initially planning on adding it to the other badges, but putting it next to duration makes more sense.

The time and duration fields seems overfitted to the current data. How does workflows with years duration look like?

Good point; I already increase the size of the duration column in the follow-up PRs. I can increase the time column size too.

Signed-off-by: Adhitya Mamallan <[email protected]>
Signed-off-by: Adhitya Mamallan <[email protected]>
@adhityamamallan adhityamamallan merged commit 01b2226 into cadence-workflow:master Dec 1, 2025
4 checks passed
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