Skip to content

feat: History V2 - event details with summary#1104

Merged
adhityamamallan merged 11 commits intocadence-workflow:masterfrom
adhityamamallan:history-details-with-summary
Dec 5, 2025
Merged

feat: History V2 - event details with summary#1104
adhityamamallan merged 11 commits intocadence-workflow:masterfrom
adhityamamallan:history-details-with-summary

Conversation

@adhityamamallan
Copy link
Member

@adhityamamallan adhityamamallan commented Dec 2, 2025

Summary

  • Implement Event Details components for Workflow History V2
  • Pass groupId to WorkflowHistoryEventGroup to generate a unique key for summary details
  • Fix group expansion logic to expand/collapse all events in a group instead of just the first one, to make toggling between grouped and ungrouped views more intuitive
  • Change props type of WorkflowHistoryEventDetailsGroup (v1) to accept WorkflowPageParams instead of WorkflowPageTabsParams (which passes the workflow tab as extra, even though it's always going to be "history")

Test plan

Unit tests + ran locally.

Screenshot 2025-12-03 at 15 16 48 Screenshot 2025-12-03 at 15 17 19

Pending events

Screenshot 2025-12-05 at 13 40 55

On narrow screens

Screenshot 2025-12-03 at 15 17 36

Rendering a single details entry in a panel (just an example, this is not actually part of the PR)

Screenshot 2025-12-03 at 15 16 26

Rendering a details entry group in a panel (just an example, this is not actually part of the PR)

Screenshot 2025-12-03 at 15 16 33

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 a new history details view with summary functionality for workflow events. It introduces a tabbed interface to display event details with the ability to show a summary tab that aggregates key fields from multiple events in a group.

  • Adds new reusable components for rendering event details in panels and groups with support for custom rendering configurations
  • Implements a tabbed group details view with optional summary tab showing aggregated information
  • Updates event group expansion behavior to expand/collapse all events in a group together

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
workflow-history-panel-details-entry/ New component for rendering individual detail entries with support for custom value components and group/single entry types
workflow-history-group-details/ New component providing tabbed interface for viewing event details with summary and per-event tabs
workflow-history-event-details/ New component for organizing event details into panels and standard details sections
workflow-history-grouped-table.tsx Updated to pass groupId instead of discarding it, enabling summary tab identification
workflow-history-event-group/ Enhanced to generate event details, manage group expansion state, and render the new group details component

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

@adhityamamallan adhityamamallan changed the title feat: History details with summary feat: History V2 - event details with summary Dec 3, 2025
@adhityamamallan adhityamamallan marked this pull request as ready for review December 3, 2025 14:23
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 2 comments.

Comments suppressed due to low confidence (1)

src/views/workflow-history-v2/workflow-history-event-group/tests/workflow-history-event-group.test.tsx:223

  • The test "calls toggleIsEventExpanded when panel is toggled" (line 207) appears to test the old behavior where only the first event was toggled. However, based on the PR description, the expansion logic was fixed to expand/collapse all events in a group. This test should be updated to verify that toggleIsEventExpanded is called for all events when the panel is toggled, not just the first one.

Consider updating the test to:

  1. Use a multi-event group
  2. Verify that toggleIsEventExpanded is called once for each event in the group
  it('calls toggleIsEventExpanded when panel is toggled', async () => {
    const eventGroup: HistoryEventsGroup = {
      ...mockActivityEventGroupWithMetadata,
      events: [scheduleActivityTaskEvent],
    };

    const toggleIsEventExpanded = jest.fn();
    const { user } = setup({ eventGroup, toggleIsEventExpanded });

    // Click on the header content to toggle the panel
    const headerLabel = screen.getByText('Mock event');
    await user.click(headerLabel);

    expect(toggleIsEventExpanded).toHaveBeenCalledWith(
      scheduleActivityTaskEvent.eventId
    );
  });

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

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>
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 force-pushed the history-details-with-summary branch from 7c436d7 to 0e28730 Compare December 5, 2025 12:28
Signed-off-by: Adhitya Mamallan <adhitya.mamallan@uber.com>
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 19 out of 19 changed files in this pull request and generated 3 comments.


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

Signed-off-by: Adhitya Mamallan <adhitya.mamallan@uber.com>
@Assem-Uber
Copy link
Contributor

LGTM to me, @adhityamamallan let's follow-up on:

  • Expansion states
  • Retry policy being showed as Panel, the text contrast is low and moving it from the table to a panel seems to be more of ordering issue rather than a way of improved presentation.

@adhityamamallan
Copy link
Member Author

adhityamamallan commented Dec 5, 2025

LGTM to me, @adhityamamallan let's follow-up on:

  • Expansion states

Sure thing, I would like to discuss these too.

  • Retry policy being showed as Panel, the text contrast is low and moving it from the table to a panel seems to be more of ordering issue rather than a way of improved presentation.

We're not actually showing the retry policy in a panel 😅
I just added that screenshot as an example of what an event group would look like inside a panel. Clarified it a bit better now

@adhityamamallan adhityamamallan merged commit 299bdea into cadence-workflow:master Dec 5, 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.

3 participants