[Unified Rules] Reroute users to new rules app#250493
[Unified Rules] Reroute users to new rules app#250493baileycash-elastic merged 15 commits intoelastic:mainfrom
Conversation
785b166 to
74beb5b
Compare
14a076d to
baccade
Compare
d3a8ecc to
a297bd8
Compare
There was a problem hiding this comment.
Pull request overview
This PR implements a feature flag-based redirect that routes users from the legacy triggersActions app (/app/management/insightsAndAlerting/triggersActions) to the new unified rules app (/app/rules) when the unifiedRulesPage feature flag is enabled. This allows for a gradual migration to the new rules interface.
Changes:
- Implemented redirect logic in the plugin registration to route triggersActions traffic to the rules app
- Restructured FTR tests to separate tests for the new rules app from the legacy triggersActions tests
- Updated test configurations and paths to support both app versions
- Made the rules app visible in navigation when the feature flag is enabled
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| x-pack/platform/test/functional_with_es_ssl/config.base.ts | Removed unifiedRulesPage from default feature flags |
| x-pack/platform/test/functional_with_es_ssl/apps/triggers_actions_ui/rules_page/*.ts | Updated tests to use triggersActions paths instead of rules paths |
| x-pack/platform/test/functional_with_es_ssl/apps/triggers_actions_ui/index.ts | Removed rules_page test loading |
| x-pack/platform/test/functional_with_es_ssl/apps/triggers_actions_ui/index.rules.ts | Added rules_page test loading |
| x-pack/platform/test/functional_with_es_ssl/apps/rules/**/*.ts | New test files for the unified rules app with /app/rules paths |
| x-pack/platform/test/functional_with_es_ssl/apps/rules/config.ts | Configuration file that enables unifiedRulesPage feature flag for rules tests |
| x-pack/platform/plugins/shared/triggers_actions_ui/public/plugin.ts | Moved rules app registration and added redirect logic from triggersActions to rules app |
| x-pack/platform/plugins/shared/triggers_actions_ui/public/application/sections/rules_page/rules_page.tsx | Changed test subject from rulesPageTitle to appTitle |
| x-pack/platform/plugins/shared/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_table.tsx | Updated routing logic to use feature flag check instead of current app detection |
| src/platform/packages/shared/kbn-rule-data-utils/src/routes/stack_rule_paths.ts | Added rulesAppRoute constant |
| src/platform/packages/shared/kbn-management/cards_navigation/src/types.ts | Changed RULES AppId from triggersActions to rules |
| src/platform/packages/shared/deeplinks/management/deep_links.ts | Added RulesAppId type and updated AppId union |
| src/platform/packages/shared/deeplinks/management/constants.ts | Added RULES_APP_ID constant |
| packages/kbn-optimizer/limits.yml | Increased triggersActionsUi bundle size limit |
| .github/CODEOWNERS | Added ownership for new rules test directory |
| .buildkite/ftr_platform_stateful_configs.yml | Added rules config to CI build |
ElenaStoeva
left a comment
There was a problem hiding this comment.
Management changes lgtm
This commit: adds the option to disable url checks in navigateToApp, in order for the test to execute removes app registration checks and relies solely on feature flag values
| REPORTING = 'reporting', | ||
| CONNECTORS = 'triggersActionsConnectors', | ||
| RULES = 'triggersActions', | ||
| RULES = 'rules', |
There was a problem hiding this comment.
What is this change about?
| @@ -258,11 +255,6 @@ export const RulesListTable = (props: RulesListTableProps) => { | |||
| const { euiTheme } = useEuiTheme(); | |||
|
|
|||
| // Detect current app to determine the correct path format | |||
There was a problem hiding this comment.
nit: this can also be removed
|
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Async chunks
Page load bundle
History
|
Resolves: elastic/ingest-dev#6716 Adds a `getInAppUrl` definition for the rule saved object, which defines where to view the rule in the UI. This is used by the Saved Objects management view, and the integrations assets view. This relies on the re-routing behavior from `/app/management/insightsAndAlerting/triggersActions` to `/app/rules` controlled by the `unifiedRulesPage` flag as implemented in: #250493
Resolves: elastic/ingest-dev#6716 Adds a `getInAppUrl` definition for the rule saved object, which defines where to view the rule in the UI. This is used by the Saved Objects management view, and the integrations assets view. This relies on the re-routing behavior from `/app/management/insightsAndAlerting/triggersActions` to `/app/rules` controlled by the `unifiedRulesPage` flag as implemented in: elastic#250493
Resolves: elastic/ingest-dev#6716 Adds a `getInAppUrl` definition for the rule saved object, which defines where to view the rule in the UI. This is used by the Saved Objects management view, and the integrations assets view. This relies on the re-routing behavior from `/app/management/insightsAndAlerting/triggersActions` to `/app/rules` controlled by the `unifiedRulesPage` flag as implemented in: elastic#250493
## Release Notes Observability rules and stack management rules experiences have merged into a new interface. Unified rules gives users a place to more easily manage rules. Any existing uses of the legacy rules experiences will be redirected to unified rules. ## Summary Closes elastic/kibana-team#2926 Closes elastic/kibana-team#2939 (final change) This PR: - Removes a feature flag for the unified rules feature, officially letting it replace observability and stack management rules. For the most part, this affects navigation. - Removes outdated/redundant stack management rules tests - Evolves the "view in app" button in stack management rule details view to "view in discover," now that experiences have been merged. (viewInAppRelativeUrl value for alerts will be stripped out in a future PR) - Fixes a discrepancy with the alert summary widget where clicking on alert counts would not reveal the alerts tab in unified rules ## Background Epic: elastic/rna-program#152 In this [PR](#250493), we copied functional tests from stack management to a new directory specifically for testing unified rules flows and paths. The test flows are mostly identical, with only some minor differences to navigation. The new tests also included a feature flag specifically for unified rules. Existing tests did not use this flag. Over time, we implemented redirects to observability and stack management rules apps to take users to the unified rules page when the feature flag is on. ## Testing - Stack and observability rules should appear together at `/app/rules` - searchSource (not ES|QL discover mode-based rules) should render "View in Discover" button on the rule details page, "View in App" will no longer appear on details page header - Stack management rules should redirect to unified rules (always) - Observability rules should redirect to unified rules (always) - All apps that pointed to observability rules should point to unified rules (i.e. synthetics, SLO, etc) ## Out of Scope With few exceptions, most links throughout Kibana to obs & stack rules have not been updated so far, we introduced redirects at the plugin level in previous commits, that acts as catch-alls for incoming traffic. We'll handle updates to links and the remainder of test & story updates in future cleanup PRs. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…258214) ## Release Notes Observability rules and stack management rules experiences have merged into a new interface. Unified rules gives users a place to more easily manage rules. Any existing uses of the legacy rules experiences will be redirected to unified rules. ## Summary Closes elastic/kibana-team#2926 Closes elastic/kibana-team#2939 (final change) This PR: - Removes a feature flag for the unified rules feature, officially letting it replace observability and stack management rules. For the most part, this affects navigation. - Removes outdated/redundant stack management rules tests - Evolves the "view in app" button in stack management rule details view to "view in discover," now that experiences have been merged. (viewInAppRelativeUrl value for alerts will be stripped out in a future PR) - Fixes a discrepancy with the alert summary widget where clicking on alert counts would not reveal the alerts tab in unified rules ## Background Epic: elastic/rna-program#152 In this [PR](elastic#250493), we copied functional tests from stack management to a new directory specifically for testing unified rules flows and paths. The test flows are mostly identical, with only some minor differences to navigation. The new tests also included a feature flag specifically for unified rules. Existing tests did not use this flag. Over time, we implemented redirects to observability and stack management rules apps to take users to the unified rules page when the feature flag is on. ## Testing - Stack and observability rules should appear together at `/app/rules` - searchSource (not ES|QL discover mode-based rules) should render "View in Discover" button on the rule details page, "View in App" will no longer appear on details page header - Stack management rules should redirect to unified rules (always) - Observability rules should redirect to unified rules (always) - All apps that pointed to observability rules should point to unified rules (i.e. synthetics, SLO, etc) ## Out of Scope With few exceptions, most links throughout Kibana to obs & stack rules have not been updated so far, we introduced redirects at the plugin level in previous commits, that acts as catch-alls for incoming traffic. We'll handle updates to links and the remainder of test & story updates in future cleanup PRs. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…258214) ## Release Notes Observability rules and stack management rules experiences have merged into a new interface. Unified rules gives users a place to more easily manage rules. Any existing uses of the legacy rules experiences will be redirected to unified rules. ## Summary Closes elastic/kibana-team#2926 Closes elastic/kibana-team#2939 (final change) This PR: - Removes a feature flag for the unified rules feature, officially letting it replace observability and stack management rules. For the most part, this affects navigation. - Removes outdated/redundant stack management rules tests - Evolves the "view in app" button in stack management rule details view to "view in discover," now that experiences have been merged. (viewInAppRelativeUrl value for alerts will be stripped out in a future PR) - Fixes a discrepancy with the alert summary widget where clicking on alert counts would not reveal the alerts tab in unified rules ## Background Epic: elastic/rna-program#152 In this [PR](elastic#250493), we copied functional tests from stack management to a new directory specifically for testing unified rules flows and paths. The test flows are mostly identical, with only some minor differences to navigation. The new tests also included a feature flag specifically for unified rules. Existing tests did not use this flag. Over time, we implemented redirects to observability and stack management rules apps to take users to the unified rules page when the feature flag is on. ## Testing - Stack and observability rules should appear together at `/app/rules` - searchSource (not ES|QL discover mode-based rules) should render "View in Discover" button on the rule details page, "View in App" will no longer appear on details page header - Stack management rules should redirect to unified rules (always) - Observability rules should redirect to unified rules (always) - All apps that pointed to observability rules should point to unified rules (i.e. synthetics, SLO, etc) ## Out of Scope With few exceptions, most links throughout Kibana to obs & stack rules have not been updated so far, we introduced redirects at the plugin level in previous commits, that acts as catch-alls for incoming traffic. We'll handle updates to links and the remainder of test & story updates in future cleanup PRs. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
Closes #252175
This PR introduces a feature flag-based redirect for the existing triggersAlerts (rules) app (url:
/app/management/insightsAndAlerting/triggersActions). When the flag is enabled, all web traffic is rerouted toapp/rules.Because of this change, a restructure of FTR rules tests was required. Tests for the new app (nearly identical to the old tests, with some small tweaks) will exist in the directory:
x-pack/platform/test/functional_with_es_ssl/apps/rules.Previous PRs modified existing rules tests to utilize the new rules app; these have been partially reverted and the
unifiedRulesPagefeature flag has been removed from the config.# without this, the unified rules UI will not appear, and the redirect will not occur xpack.trigger_actions_ui.enableExperimental: - unifiedRulesPageTesting changes
rulestotriggersActionsto preserve originally intended flowsNotes