Skip to content

Conversation

@adhityamamallan
Copy link
Member

@adhityamamallan adhityamamallan commented Dec 8, 2025

Summary

Implement basic ungrouped table with placeholders for ungrouped events

Test plan

Unit tests + ran locally.

Screenshot 2025-12-08 at 15 12 01

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 basic infrastructure for an ungrouped event table view in Workflow History V2. It creates a new table component that flattens event groups into individual events, sorts them appropriately (non-pending events by ID, pending events by time), and provides the foundation for displaying workflow history events in an ungrouped format.

Key changes:

  • Added WorkflowHistoryUngroupedTable component with virtualized scrolling support
  • Implemented event sorting logic that handles both pending and non-pending events
  • Created placeholder WorkflowHistoryUngroupedEvent component for individual event rendering

Reviewed changes

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

Show a summary per file
File Description
workflow-history-v2.tsx Integrated ungrouped table component with conditional rendering based on view mode
workflow-history-ungrouped-table.tsx Main table component with event flattening, sorting, and virtualized list rendering
workflow-history-ungrouped-table.types.ts Type definitions for table props and ungrouped event information
workflow-history-ungrouped-table.styles.ts Responsive grid-based table header styling
workflow-history-ungrouped-table.constants.ts Grid template columns configuration for 8-column layout
compare-ungrouped-events.ts Sorting logic for ordering non-pending events by ID and pending events by timestamp
compare-ungrouped-events.test.ts Comprehensive test coverage for the sorting function
workflow-history-ungrouped-table.test.tsx Integration tests for the table component with various scenarios
workflow-history-ungrouped-event.tsx Placeholder component that currently renders event data as JSON
workflow-history-ungrouped-event.types.ts Type definitions for individual event props
workflow-history-ungrouped-event.styles.ts Temporary styling for the placeholder event component
workflow-history-v2.test.tsx Updated tests to verify ungrouped table rendering conditions

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

import { styled } from './workflow-history-ungrouped-event.styles';
import { type Props } from './workflow-history-ungrouped-event.types';

export default function WorkflowHistoryUngroupedEvent({ eventInfo }: Props) {
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

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

[nitpick] The component receives multiple props (workflowStartTimeMs, decodedPageUrlParams, isExpanded, toggleIsExpanded, animateOnEnter, onReset) but only destructures and uses eventInfo. While this is a placeholder implementation, consider at least destructuring the unused props to avoid ESLint warnings, or using a rest parameter pattern if they're genuinely not needed yet.

Suggested change
export default function WorkflowHistoryUngroupedEvent({ eventInfo }: Props) {
export default function WorkflowHistoryUngroupedEvent({
workflowStartTimeMs,
decodedPageUrlParams,
isExpanded,
toggleIsExpanded,
animateOnEnter,
onReset,
eventInfo,
}: Props) {

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting, does this shows a warning ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nope, it would show a warning if I implemented Copilot's suggestion though.
I think this is a good argument in favour of having inline "Props" instead of keeping them in a separate file.

Copy link
Contributor

Choose a reason for hiding this comment

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

How does inline props help here ?

Signed-off-by: Adhitya Mamallan <[email protected]>
Signed-off-by: Adhitya Mamallan <[email protected]>
@adhityamamallan adhityamamallan marked this pull request as ready for review December 8, 2025 14:43
import { styled } from './workflow-history-ungrouped-event.styles';
import { type Props } from './workflow-history-ungrouped-event.types';

export default function WorkflowHistoryUngroupedEvent({ eventInfo }: Props) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting, does this shows a warning ?

{isUngroupedHistoryViewEnabled ? (
<div>WIP: ungrouped table</div>
<WorkflowHistoryUngroupedTable
eventGroupsById={filteredEventGroupsById}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: the name eventGroupsById got me for a second thinking it is a map.

Copy link
Member Author

Choose a reason for hiding this comment

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

True, I see that we call the Array<[string, Type]> type "Entries" in some other places

@adhityamamallan adhityamamallan merged commit aabebe6 into cadence-workflow:master Dec 9, 2025
3 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