Skip to content

fix(webapp): don't allow toggling prod environment production status#5812

Merged
kaposke merged 1 commit intomasterfrom
gui/NAN-5229/fix-block-toggling-prod-production-status
Apr 9, 2026
Merged

fix(webapp): don't allow toggling prod environment production status#5812
kaposke merged 1 commit intomasterfrom
gui/NAN-5229/fix-block-toggling-prod-production-status

Conversation

@kaposke
Copy link
Copy Markdown
Contributor

@kaposke kaposke commented Apr 8, 2026

prod is a special environment that can't be renamed, deleted, and is always is_production = true. But the latter was not correctly reflected in the UI.
After change:
image


Disable prod Production Status Toggle in Environment Settings UI

This PR fixes a UI behavior in packages/webapp/src/pages/Environment/Settings/General.tsx so the special prod environment can no longer have its production status toggled. The production switch is now explicitly disabled when env === PROD_ENVIRONMENT_NAME, aligning frontend behavior with the existing rule that prod is always production.

It also improves UX by wrapping the switch in ConditionalTooltip to explain why the control is disabled for prod. Existing permission-based gating via PermissionGate and toggle confirmation flow remain in place for non-prod environments.


This summary was automatically generated by @propel-code-bot

@kaposke kaposke requested a review from a team April 8, 2026 16:04
@linear
Copy link
Copy Markdown

linear bot commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

@propel-code-bot propel-code-bot bot left a comment

Choose a reason for hiding this comment

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

Review found no issues; the UI change correctly enforces immutable production status for prod and aligns behavior with existing environment rules.

Status: No Issues Found | Risk: Low

Review Details

📁 1 files reviewed | 💬 0 comments

Instruction Files
└── .claude/
    ├── agents/
    │   └── nango-docs-migrator.md
    └── skills

@kaposke kaposke added this pull request to the merge queue Apr 9, 2026
Merged via the queue into master with commit 3b4d587 Apr 9, 2026
26 checks passed
@kaposke kaposke deleted the gui/NAN-5229/fix-block-toggling-prod-production-status branch April 9, 2026 17:57
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