HIGH story-organization-scoped-feature-flags-peer-mentor-002 5 pts
5
Story Points
High
Priority
Organization-scoped Feature Flags
Feature

User Story

As a Peer Mentor (Likeperson)
I want to toggle individual feature flags on or off for my organization with a confirmation step
So that I can safely activate or deactivate capabilities such as driver honorarium, mileage reimbursement, or proxy registration without risking accidental changes

Acceptance Criteria

  • Given I am viewing the feature flag admin screen, when I tap the toggle for a flag, then a confirmation dialog appears showing the flag name, the proposed new state, and a plain-language description of the impact
  • Given the confirmation dialog is shown, when I confirm the change, then the flag state is updated in the repository and the feature-flag-cache is invalidated
  • Given I confirm enabling a flag, when the update succeeds, then a success toast is shown and the toggle reflects the new enabled state immediately
  • Given I confirm disabling a flag, when the update succeeds, then the corresponding feature-gate-widget across the app hides the related UI for all users in the organization
  • Given the repository update fails due to a network error, when the save attempt completes, then the toggle reverts to its previous state and an error message is displayed
  • Given I tap the toggle and the confirmation dialog appears, when I tap Cancel, then no change is made and the toggle remains in its original state

Business Value

Safe toggling with confirmation prevents administrators from accidentally enabling premature features or disabling active ones used by hundreds of peer mentors. The confirmation-and-rollback pattern is critical because disabling a flag mid-workflow (e.g., during an active mileage claim submission) could cause data loss or user confusion, directly impacting volunteer retention and reporting quality.