Skip to content

Conversation

@Assem-Uber
Copy link
Contributor

@Assem-Uber Assem-Uber commented Nov 20, 2025

Summary
Integrate new grouping hook into history page. The new Grouping logic has an improved performance by splitting grouping logic into small batches and processing them in background (using browser schedulers APIs).

Changes

  • Change useInitialSelectedEvent to work with groups
  • Use useWorkflowHistoryGrouper in workflow-history page.

Testing

  • Tested the grouping with in progress workflow to check how pending event addition/removal works
  • Tested the grouping performance with large workflows
  • Tested the useInitialSelectedEvent changes by using links for events and make sure we scroll to it.

Screen recording

  • Interacting with the page that uses the new grouping logic
Screen.Recording.2025-11-20.at.14.54.21.mov

Assem-Uber and others added 30 commits November 3, 2025 09:56
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
* Grouped events header

Signed-off-by: Assem Hafez <assem.hafez@uber.com>

* add test cases

Signed-off-by: Assem Hafez <assem.hafez@uber.com>

* fix comment typo

Signed-off-by: Assem Hafez <assem.hafez@uber.com>

* add space for reset button

Signed-off-by: Assem Hafez <assem.hafez@uber.com>

* move grouped table

Signed-off-by: Assem Hafez <assem.hafez@uber.com>

* Update src/views/workflow-history-v2/workflow-history-grouped-table/workflow-history-grouped-table.tsx

Co-authored-by: Adhitya Mamallan <adi1998is@gmail.com>

* Change Id to ID

Signed-off-by: Assem Hafez <assem.hafez@uber.com>

---------

Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Co-authored-by: Adhitya Mamallan <adi1998is@gmail.com>
Signed-off-by: Tim Chan <tim.chan@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
adhityamamallan and others added 19 commits November 19, 2025 15:14
Add filters for Failover History table, but only for active-active domains
Create filter for Cluster Attribute Scope, which depends on domain description to suggest possible scopes
Create filter for Cluster Attribute Value, which depends on selected scope to suggest possible values/names
Remove (now) unused styles file from DomainPageFailovers

Signed-off-by: Adhitya Mamallan <adhitya.mamallan@uber.com>
…workflow#1065)

* grouping utility

Signed-off-by: Assem Hafez <assem.hafez@uber.com>

* update test cases

Signed-off-by: Assem Hafez <assem.hafez@uber.com>

* change the api of onChange and add destroy method

Signed-off-by: Assem Hafez <assem.hafez@uber.com>

* replace getGroups with getState

Signed-off-by: Assem Hafez <assem.hafez@uber.com>

* call onchange after updating pending events

Signed-off-by: Assem Hafez <assem.hafez@uber.com>

* use sync processBatch for first page

Signed-off-by: Assem Hafez <assem.hafez@uber.com>

* Update src/views/workflow-history/helpers/workflow-history-grouper.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply PR comments

* Update src/views/workflow-history/helpers/workflow-history-grouper.types.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add modal for viewing an individual failover event, which is shown when "See more" in the table is clicked

Signed-off-by: Adhitya Mamallan <adhitya.mamallan@uber.com>
* Add new Workflow History V2 root component, which (for now) renders only a placeholder header component and placeholder tables.
* Implement Workflow History Header with basic UI and sticky functionality
* Add logic in WorkflowHistoryWrapper to render V2 UI based on feature flag

Signed-off-by: Adhitya Mamallan <adhitya.mamallan@uber.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This was referenced Nov 20, 2025
// remove current listener (if exists) to have fresh emits only
this.unsubscribe?.();
this.unsubscribe = null;

Copy link
Member

Choose a reason for hiding this comment

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

To omit duplicative diffs, is it possible to...

  1. Push your branch to GH
  2. Create a new PR
  3. Set the "base" to the prior branch (rather than master)

The dups make challenging to review, unfortunately.

Copy link
Member

Choose a reason for hiding this comment

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

Rebasing them to point back to master after the fact is a bit cumbersome (at least it was the last time I tried), so I normally raise them all at once but queue them individually.

expect(result.current.initialEventFound).toBe(true);
});

it('should return initialEventGroupIndex as undefined when selectedEventId is defined & group is not found in filtered entries', () => {
Copy link
Member

Choose a reason for hiding this comment

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

I wonder what the purpose is?

The test name seems to describe the implementation details instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This basically means that if the selected event is not in the filtered groups initialEventGroupIndex would be returned as undefined.

The test title is using the name of its API variables (initialEventGroupIndex &selectedEventId) those are what exposed to the hook user. It is not internal details to the hook. Let me know if you have naming suggestions.

@Assem-Uber Assem-Uber merged commit dba0b79 into cadence-workflow:master Nov 24, 2025
5 checks passed
@Assem-Uber Assem-Uber deleted the feature/16026/use-grouper-in-history-page branch November 24, 2025 10:21
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