manager icon indicating copy to clipboard operation
manager copied to clipboard

poc: [M3-10153] - Update legacy/beta toggle behavior for Metrics, Alerts & Banners

Open pmakode-akamai opened this issue 7 months ago โ€ข 1 comments

Description ๐Ÿ“

Currently, we use account level user preferences (endpoint) to track whether they are on legacy or beta (ACLP), but this is applied globally across all Linodes. We need to handle this on a per-Linode basis, as users may have different preferences for each Linode.

We have two options to solve this:

  • Linode ID to Boolean Map โŒ: Store a map of linodeId to a boolean value to track ACPL/beta mode for each Linode in the account level user preferences endpoint. This works, but it's not an ideal solution and should be AVOIDED if possible.

  • API Update for Shared/Individual Experiences โœ…: Modify the getLinode API to return a is_beta flag for shared experience between Alerts and Metrics features for legacy/beta. For more control, we could get a separate flags like is_alerts_beta or is_metrics_beta for individual experiences. We need to figure out the best way to manage legacy-ACPL/beta settings on a per-Linode basis, without relying on global preferences.

    • This implementation includes the following updates:
      • Metrics => Use (account level) users/preferences for banners (global across all the linodes)
      • Alerts => Use local state + api field to show banners (users may have different preferences for each linode)

[!Note] The API field (is_beta oris_alerts_beta, or something similar) is not confirmed yet

Changes ๐Ÿ”„

  • Metrics: Updated the legacy-beta banner & Metrics to use account-level user preferences, making the banner state consistent across all Linodes
  • Alerts: Updated the legacy-beta banner & Alerts to use local state + get Linode API field (note: field is not confirmed yet) to manage its visibility. The banner & Alerts appears:
    • In the Create Linode flow under Additional Options -> Alerts
    • On the Linode Details page under the Alerts tab

Target release date ๐Ÿ—“๏ธ

N/A

Preview ๐Ÿ“ท

No visual changes

How to test ๐Ÿงช

Prerequisites

  • Enable MSW and ACLP Beta Services -> alerts & metrics feature flag

Verification steps

  • Verify Metrics legacy/beta mode and experience is common across all the ACLP-supported linodes
    • Go to mocked ACLP-supported linodes, toggle the preference between legacy and beta on one linode, and ensure the change reflects across all aclp supported linodes
  • Verify Alerts legacy/beta mode and experience is distinct across multiple linodes
    • Test this with mocked ACLP-supported linodes to ensure Alerts behave differently based on each linode's individual state
  • Verify the default state of Alerts/banner on the Linode Details page is based on the Get Linode API field: is_alerts_beta (this field indicates whether the user has opted for beta or legacy mode)
  • Verify the default state of Alerts on the Linode Create page is always set to legacy mode (Alerts can be found under Additional Options section)
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

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

As an Author, before moving this PR from Draft to Open, I confirmed โœ…

  • [x] All unit tests are passing
  • [x] TypeScript compilation succeeded without errors
  • [x] Code passes all linting rules

pmakode-akamai avatar Jun 12 '25 10:06 pmakode-akamai

This PR is stale because it has been open 15 days with no activity. Please attend to this PR or it will be closed in 5 days

github-actions[bot] avatar Jun 29 '25 00:06 github-actions[bot]

Cloud Manager UI test results

:tada: 675 passing tests on test run #14 โ†—๏ธŽ

:x: Failing:white_check_mark: Passing:arrow_right_hook: Skipped:clock1: Duration
0 Failing675 Passing4 Skipped121m 45s

linode-gh-bot avatar Jul 07 '25 09:07 linode-gh-bot