Skip to content

Conversation

@adhityamamallan
Copy link
Member

@adhityamamallan adhityamamallan commented Oct 23, 2025

Summary

Show cluster replication status label next to cluster names in the Cluster Dropdown and in the Clusters list in Domain Metadata

Test plan

Updated unit tests + ran locally.

Screenshot 2025-10-23 at 11 59 34 Screenshot 2025-10-23 at 11 59 39

@adhityamamallan adhityamamallan marked this pull request as ready for review October 28, 2025 10:52
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 adds visual indicators to distinguish cluster replication roles in active-active domains. The change introduces a new helper function that returns appropriate labels ("primary", "active", or "passive") based on domain type and cluster status, then applies these labels in the cluster dropdown selector and domain metadata display.

Key changes:

  • Created getClusterReplicationStatusLabel helper that returns "primary" for active clusters in active-active domains, "active"/"passive" for active-passive domains, and undefined for non-primary clusters in active-active domains
  • Updated cluster dropdown and metadata displays to show replication status labels conditionally
  • Added comprehensive test coverage for the new labeling behavior across different domain types

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/views/domain-page/helpers/get-cluster-replication-status-label.ts New helper function to determine cluster replication status labels based on domain type
src/views/domain-page/helpers/__tests__/get-cluster-replication-status-label.test.ts Unit tests covering all cases for the new helper function
src/views/domain-page/helpers/__mocks__/get-cluster-replication-status-label.ts Mock implementation of the helper for testing
src/views/domain-page/domain-page-metadata-clusters/domain-page-metadata-clusters.tsx Integrated helper to conditionally display labels in cluster metadata
src/views/domain-page/domain-page-metadata-clusters/__tests__/domain-page-metadata-clusters.test.tsx Added test for active-active domain label display
src/views/domain-page/domain-page-cluster-selector/domain-page-cluster-selector.tsx Integrated helper into cluster selector dropdown options
src/views/domain-page/domain-page-cluster-selector/__tests__/domain-page-cluster-selector.test.tsx Updated tests to verify label display in dropdown for both domain types

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

@adhityamamallan adhityamamallan merged commit 2db5cb5 into cadence-workflow:master Oct 29, 2025
5 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