-
Notifications
You must be signed in to change notification settings - Fork 126
feat: History Page V2 - event group row in history grouped table #1095
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
feat: History Page V2 - event group row in history grouped table #1095
Conversation
f772407 to
b89db0f
Compare
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]>
Signed-off-by: Adhitya Mamallan <[email protected]>
Signed-off-by: Adhitya Mamallan <[email protected]>
b89db0f to
74fe264
Compare
There was a problem hiding this 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.
src/views/workflow-history-v2/workflow-history-event-group/workflow-history-event-group.tsx
Outdated
Show resolved
Hide resolved
src/views/workflow-history-v2/workflow-history-event-group/workflow-history-event-group.tsx
Outdated
Show resolved
Hide resolved
...views/workflow-history-v2/workflow-history-event-group/workflow-history-event-group.types.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: Adhitya Mamallan <[email protected]>
There was a problem hiding this 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.
src/views/workflow-history-v2/workflow-history-grouped-table/workflow-history-grouped-table.tsx
Outdated
Show resolved
Hide resolved
src/views/workflow-history-v2/workflow-history-event-group/workflow-history-event-group.tsx
Show resolved
Hide resolved
...w-history-v2/workflow-history-event-group-duration/workflow-history-event-group-duration.tsx
Show resolved
Hide resolved
...ow-history-v2/workflow-history-event-group-duration/helpers/get-formatted-events-duration.ts
Show resolved
Hide resolved
|
I have few questions on UI:
|
...-history-v2/workflow-history-grouped-table/__tests__/workflow-history-grouped-table.test.tsx
Outdated
Show resolved
Hide resolved
| import getFormattedEventsDuration from './helpers/get-formatted-events-duration'; | ||
| import { type Props } from './workflow-history-event-group-duration.types'; | ||
|
|
||
| export default function WorkflowHistoryEventGroupDuration({ |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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
...s/workflow-history-v2/workflow-history-event-group/helpers/get-event-group-filtering-type.ts
Show resolved
Hide resolved
| } | ||
| } | ||
|
|
||
| return 'WORKFLOW'; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a TODO
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.
Next to the duration. I was initially planning on adding it to the other badges, but putting it next to duration makes more sense.
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]>


Summary
useExpansionTogglehookTest plan
Added unit tests + ran locally.
Basic table
With hover
Expanded
Reset Workflow form
On narrow screens