Skip to content

Conversation

@santoshp210-akamai
Copy link
Contributor

Description 📝

Enhancements to the Notification Channel Show Details page

Changes 🔄

List any change(s) relevant to the reviewer.

  • Pagination, Search, Service filtering to the Associated Alerts table
  • Catch all routing for Notification Channel /create,/edit,/detail endpoints
  • Adjusted UI spacing to be consistent with Alerts Show Details page
  • Relevant mocks and UTs

Scope 🚢

Upon production release, changes in this PR will be visible to:

  • All customers
  • Some customers (e.g. in Beta or Limited Availability)
  • No customers / Not applicable

Target release date 🗓️

Feb 10th release

Preview 📷

Include a screenshot <img src="" /> or video <video src="" /> of the change.

🔒 Use the Mask Sensitive Data setting for security.

💡 For changes requiring multiple steps to validate, prefer a video for clarity.

Before

Before After
image image image

How to test 🧪

Prerequisites

(How to setup test environment)

  • In DevCloud or Mock environment (Legacy MSW Handlers)
  • Click Alerts, under Monitor. Make sure to enable the notificationChannels in the aclpAlerting(CloudPulse Alerting) feature flag
  • Click on the Notification Channel Tab
  • Choose a Notification Channel either click on the hyperlink of the channel name, or click on Show Details on the action menu of the chosen alert.

Verification steps

(How to verify changes)

  • Pagination of the table
  • Searching of channel names and Service based filtering
  • Catch-all routing for the /edit, /create, /detail endpoints
Author Checklists

As an Author, to speed up the review process, I considered 🤔

👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support


  • I have read and considered all applicable items listed above.

As an Author, before moving this PR from Draft to Open, I confirmed ✅

  • All tests and CI checks are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

},
};

hookMocks.useFlags.mockReturnValue(flags);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
hookMocks.useFlags.mockReturnValue(flags);

Rather than mocking the use src/hooks/useFlags module, we should use our built in flags helper if possible, like this:

renderWithTheme(<NotificationChannelAlerts channelId={1} />, {
      flags: mockFlags,
});

Comment on lines 360 to 361
renderWithTheme(<NotificationChannelAlerts channelId={1} />);
expect(screen.getAllByText(/beta/i)).toHaveLength(alerts.length);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
renderWithTheme(<NotificationChannelAlerts channelId={1} />);
expect(screen.getAllByText(/beta/i)).toHaveLength(alerts.length);
const { getAllByText } = renderWithTheme(<NotificationChannelAlerts channelId={1} />);
expect(getAllByText(/beta/i)).toHaveLength(alerts.length);

We generally follow the pattern of destructuring queries from renderWithTheme instead of using the global screen object. Could we update this file (and the other) to align with that convention?

Copy link
Contributor Author

@santoshp210-akamai santoshp210-akamai Feb 4, 2026

Choose a reason for hiding this comment

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

@pmakode-akamai , We were following the destructuring but after some ESLint upgrade we had the linter warning whenever we destructure and not use the global screen.

If destructing works well, then we will switch to destructuring from now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will try to make these changes in few files where I already have to edit, but in this current PR we can't change all the implementations of global screen in the UTs .

We will take the task up separately

expect(screen.queryByText('Linode CPU Alert')).not.toBeInTheDocument();
expect(screen.queryByText('Linode Memory Alert')).not.toBeInTheDocument();
});
test('should render the Beta flag for the services in the service column', async () => {
Copy link
Contributor

@pmakode-akamai pmakode-akamai Feb 3, 2026

Choose a reason for hiding this comment

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

Suggested change
test('should render the Beta flag for the services in the service column', async () => {
it('should render the Beta flag for the services in the service column', async () => {

Comment on lines 26 to 32
vi.mock('src/hooks/useFlags', () => ({
useFlags: queryMocks.useFlags,
}));

queryMocks.useFlags.mockReturnValue({
aclpServices: aclpServicesFlag,
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
vi.mock('src/hooks/useFlags', () => ({
useFlags: queryMocks.useFlags,
}));
queryMocks.useFlags.mockReturnValue({
aclpServices: aclpServicesFlag,
});

Same here: We should use our built in flags helper option if possible

Comment on lines 22 to 25
vi.mock('src/hooks/useFlags', () => ({
useFlags: hookMocks.useFlags,
}));

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
vi.mock('src/hooks/useFlags', () => ({
useFlags: hookMocks.useFlags,
}));

Same here

);
}
return filteredAlerts;
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we add unit tests for the newly added utility functions?

Comment on lines 22 to 25
vi.mock('src/hooks/useFlags', () => ({
useFlags: hookMocks.useFlags,
}));

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
vi.mock('src/hooks/useFlags', () => ({
useFlags: hookMocks.useFlags,
}));

Comment on lines 198 to 203
handleSortClick(
orderBy,
handleOrderChange,
handlePageChange,
order
);
Copy link
Contributor

@pmakode-akamai pmakode-akamai Feb 3, 2026

Choose a reason for hiding this comment

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

Is resetting to page 1 when sorting the expected behavior? I see a different pattern used elsewhere in the codebase where we keep the paginated page persisted when sorting by passing handleOrderChange directly to TableSortCell (e.g., NodeTable).

If resetting to page 1 is intentional, then we shouldn't be relying on functions with 3 / 3+ args. We generally prefer using object params in those cases. That said, if we can simplify this logic, it might be clearer to make it more straightforward like this:

        const handleTableSort = (orderBy: string, order?: Order) => {
              if (order) {
                handleOrderChange(orderBy, order);
                handlePageChange(1);
              }
        };

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From our UX for Alerting we have been following this since AlertsResources component. So for the consistency we follow this behaviour.

But the simplified logic makes sense. Will update that.

Comment on lines 14 to 18
const handlers = {
handleDelete: vi.fn(),
handleDetails: vi.fn(),
handleEdit: vi.fn(),
};
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Maybe we could move this to a beforeEach OR outside the tests to reduce duplication

@github-project-automation github-project-automation bot moved this from Review to Approved in Cloud Manager Feb 4, 2026
@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🔺 2 failing tests on test run #8 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
2 Failing864 Passing11 Skipped37m 45s

Details

Failing Tests
SpecTest
clone-linode.spec.tsCloud Manager Cypress Tests→clone linode » can clone a Linode from Linode details page
access-key.e2e.spec.tsCloud Manager Cypress Tests→object storage access key end-to-end tests » can create an access key with limited access - e2e

Troubleshooting

Use this command to re-run the failing tests:

pnpm cy:run -s "cypress/e2e/core/linodes/clone-linode.spec.ts,cypress/e2e/core/objectStorage/access-key.e2e.spec.ts"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Approved

Development

Successfully merging this pull request may close these issues.

4 participants