Skip to content

Conversation

@adhityamamallan
Copy link
Member

@adhityamamallan adhityamamallan commented Dec 15, 2025

Summary

  • Remove "Type" column from failovers table
  • Allow rendering cluster failovers if either from/to is missing (this occurs when new cluster attributes are created)
  • Rename "primary" to "default"
  • Add top spacing to table when rendering without filter component (active-passive domain)

Test plan

Updated unit tests + ran locally.

Failovers Table

Screenshot 2025-12-15 at 11 59 44

Failovers modal (with "none" fromCluster)

Screenshot 2025-12-15 at 11 30 32

"default" cluster attribute

Screenshot 2025-12-15 at 11 31 41 Screenshot 2025-12-15 at 11 31 45 Screenshot 2025-12-15 at 12 00 30 Screenshot 2025-12-15 at 11 38 14 Screenshot 2025-12-15 at 11 31 51

Active-Passive domain

Screenshot 2025-12-15 at 11 41 21

Signed-off-by: Adhitya Mamallan <[email protected]>
Signed-off-by: Adhitya Mamallan <[email protected]>
@adhityamamallan adhityamamallan changed the title fix: Handle cases where one cluster is missing from failover fix: Various fixes for Domain Failover History Dec 15, 2025
@adhityamamallan adhityamamallan marked this pull request as ready for review December 15, 2025 11:02
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 fixes several issues in the Domain Failover History feature. The primary changes include removing the "Type" column from the failovers table, allowing failover rendering when either source or destination cluster is missing, renaming "primary" terminology to "default" for clarity, and adding proper spacing to the table in active-passive domain views.

Key changes:

  • Renamed PRIMARY_CLUSTER_SCOPE to DEFAULT_CLUSTER_SCOPE throughout the codebase for clearer terminology
  • Removed the "Type" column from failover tables and adjusted column widths accordingly
  • Updated cluster failover logic to display "None" placeholder when only one cluster is missing, instead of hiding the entire component

Reviewed changes

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

Show a summary per file
File Description
src/views/domain-page/helpers/get-cluster-replication-status-label.ts Updated to use DEFAULT_CLUSTER_SCOPE constant and return "default" label instead of "primary"
src/views/domain-page/helpers/cluster-failover-matches-attribute.ts Replaced PRIMARY_CLUSTER_SCOPE with DEFAULT_CLUSTER_SCOPE in attribute matching logic
src/views/domain-page/helpers/__tests__/get-cluster-replication-status-label.test.ts Updated test descriptions and assertions to reflect "default" terminology
src/views/domain-page/helpers/__tests__/cluster-failover-matches-attribute.test.ts Updated import to use DEFAULT_CLUSTER_SCOPE
src/views/domain-page/domain-page-failovers/domain-page-failovers.tsx Added conditional rendering for table top spacer in active-passive domains
src/views/domain-page/domain-page-failovers/domain-page-failovers.styles.ts New file adding TableTopSpacer component for spacing consistency
src/views/domain-page/domain-page-failovers/domain-page-failovers.constants.ts Replaced PRIMARY_CLUSTER_SCOPE with DEFAULT_CLUSTER_SCOPE and removed unused FAILOVER_TYPE_LABEL_MAP
src/views/domain-page/domain-page-failovers-filters/domain-page-failovers-filters.tsx Updated all references from PRIMARY_CLUSTER_SCOPE to DEFAULT_CLUSTER_SCOPE
src/views/domain-page/domain-page-failovers-filters/__tests__/domain-page-failovers-filters.test.tsx Updated constant imports and usage in tests
src/views/domain-page/domain-page-failover-single-cluster/domain-page-failover-single-cluster.tsx Changed null check from OR to AND, allowing rendering with one missing cluster and showing "None" placeholder
src/views/domain-page/domain-page-failover-single-cluster/domain-page-failover-single-cluster.styles.ts Added noClusterContainer style for "None" placeholder
src/views/domain-page/domain-page-failover-single-cluster/__tests__/domain-page-failover-single-cluster.test.tsx Updated tests to verify "None" placeholder behavior and null rendering when both clusters missing
src/views/domain-page/domain-page-failover-modal/domain-page-failover-modal.tsx Changed scope label from "Primary" to "Default" and removed 'use client' directive
src/views/domain-page/domain-page-failover-modal/__tests__/domain-page-failover-modal.test.tsx Updated test assertions to expect "Default" instead of "Primary"
src/views/domain-page/domain-page-failover-active-active/domain-page-failover-active-active.tsx Updated to use DEFAULT_CLUSTER_SCOPE and DEFAULT_CLUSTER_SCOPE_LABEL constants
src/views/domain-page/domain-page-failover-active-active/__tests__/domain-page-failover-active-active.test.tsx Updated test descriptions and constant usage to reflect "default" terminology
src/views/domain-page/config/domain-page-failovers-table.config.ts Removed "Type" column and adjusted "Failover Information" width from 40% to 50%
src/views/domain-page/config/domain-page-failovers-table-active-active.config.ts Adjusted array slice indices to account for removed "Type" column

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

…domain-page-failovers-filters.test.tsx

Co-authored-by: Copilot <[email protected]>
@adhityamamallan adhityamamallan merged commit 55ebfc5 into cadence-workflow:master Dec 16, 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