With disable_enterprise_features: true, the Alerting sidebar entry and "Create Alert Rule" page were still rendered (just grayed out), inconsistent with other enterprise features that are fully hidden under this flag.
Changes
src/app/navigation.tsx: Gate sidebarAlerting behind !env?.flags.disableEnterpriseFeatures, matching the existing pattern for sidebarApprovals, access logs, etc.
src/components/AlertingRulesTable.tsx: Pass onAdd={undefined} when enterprise features are disabled, suppressing the "+ Create Alert" button.
src/app/[orgId]/settings/alerting/create/page.tsx: Guard the create page — renders null and calls router.replace back to the rules list if enterprise features are disabled, preventing direct URL access.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/fosrl/pangolin/pull/3011
**Author:** [@Copilot](https://github.com/apps/copilot-swe-agent)
**Created:** 5/6/2026
**Status:** 🔄 Open
**Base:** `main` ← **Head:** `copilot/fix-create-alert-visibility`
---
### 📝 Commits (3)
- [`0c643e9`](https://github.com/fosrl/pangolin/commit/0c643e91a6c39a50219ed63310a30ba6fa5dddc7) Initial plan
- [`1b183d3`](https://github.com/fosrl/pangolin/commit/1b183d32c0bd2875a7d17274a77a09e9c42e3589) Hide alerting features when disable_enterprise_features is set
- [`3ac315b`](https://github.com/fosrl/pangolin/commit/3ac315b52ed7ced3841c23095e21a46d5cfffb48) Fix useEffect dependency array in create alert page
### 📊 Changes
**3 files changed** (+37 additions, -10 deletions)
<details>
<summary>View changed files</summary>
📝 `src/app/[orgId]/settings/alerting/create/page.tsx` (+16 -1)
📝 `src/app/navigation.tsx` (+9 -5)
📝 `src/components/AlertingRulesTable.tsx` (+12 -4)
</details>
### 📄 Description
With `disable_enterprise_features: true`, the Alerting sidebar entry and "Create Alert Rule" page were still rendered (just grayed out), inconsistent with other enterprise features that are fully hidden under this flag.
## Changes
- **`src/app/navigation.tsx`**: Gate `sidebarAlerting` behind `!env?.flags.disableEnterpriseFeatures`, matching the existing pattern for `sidebarApprovals`, access logs, etc.
- **`src/components/AlertingRulesTable.tsx`**: Pass `onAdd={undefined}` when enterprise features are disabled, suppressing the "+ Create Alert" button.
- **`src/app/[orgId]/settings/alerting/create/page.tsx`**: Guard the create page — renders `null` and calls `router.replace` back to the rules list if enterprise features are disabled, preventing direct URL access.
```tsx
// create/page.tsx
const disableEnterpriseFeatures = env.flags.disableEnterpriseFeatures;
useEffect(() => {
if (disableEnterpriseFeatures) {
router.replace(`/${orgId}/settings/alerting/rules`);
}
}, [disableEnterpriseFeatures, orgId, router]);
if (disableEnterpriseFeatures) return null;
```
Fixes #3009
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/fosrl/pangolin/pull/3011
Author: @Copilot
Created: 5/6/2026
Status: 🔄 Open
Base:
main← Head:copilot/fix-create-alert-visibility📝 Commits (3)
0c643e9Initial plan1b183d3Hide alerting features when disable_enterprise_features is set3ac315bFix useEffect dependency array in create alert page📊 Changes
3 files changed (+37 additions, -10 deletions)
View changed files
📝
src/app/[orgId]/settings/alerting/create/page.tsx(+16 -1)📝
src/app/navigation.tsx(+9 -5)📝
src/components/AlertingRulesTable.tsx(+12 -4)📄 Description
With
disable_enterprise_features: true, the Alerting sidebar entry and "Create Alert Rule" page were still rendered (just grayed out), inconsistent with other enterprise features that are fully hidden under this flag.Changes
src/app/navigation.tsx: GatesidebarAlertingbehind!env?.flags.disableEnterpriseFeatures, matching the existing pattern forsidebarApprovals, access logs, etc.src/components/AlertingRulesTable.tsx: PassonAdd={undefined}when enterprise features are disabled, suppressing the "+ Create Alert" button.src/app/[orgId]/settings/alerting/create/page.tsx: Guard the create page — rendersnulland callsrouter.replaceback to the rules list if enterprise features are disabled, preventing direct URL access.Fixes #3009
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.