User Interface medium complexity mobile
2
Dependencies
0
Dependents
2
Entities
0
Integrations

Description

An administrative screen accessible to organization admins that displays all available feature flags for the current organization and their enabled/disabled states. Supports toggling flags and configuring phase-based rollout conditions such as minimum app version or activation date.

Feature: Organization-scoped Feature Flags

feature-flag-admin-screen

Summaries

The Feature Flag Admin Screen gives organization administrators direct, real-time control over which capabilities are active for their users, without requiring engineering involvement for routine flag changes. This operational capability is a significant value-add for enterprise customers who need to manage their own rollout cadence, comply with internal change-management policies, or quickly disable a feature that is causing confusion. The support for phase-based rollout conditions — such as minimum app version gates and scheduled activation dates — enables sophisticated deployment strategies that reduce risk and align feature availability with user readiness. Providing this control directly in the product reduces support ticket volume and strengthens the case for the platform as a self-service, enterprise-grade solution.

This is a medium-complexity screen with two direct dependencies: the feature flag provider (shared with FeatureGate) and the feature flag repository (which handles persistence and backend synchronization). Authorization logic — ensuring only organization admins access this screen — must be agreed upon and implemented before the screen can be considered complete; confirm whether this is handled at the navigation layer or within the screen itself. The rollout condition UI (minimum version, activation date) adds non-trivial form validation and state management work relative to the simpler toggle-only case. Plan for a dedicated security review of the admin authorization path, and include end-to-end tests covering the scenario where a non-admin user attempts to access the screen.

Coordinate with backend teams early on the RolloutCondition data contract.

This screen is a `ConsumerStatefulWidget` with two provider dependencies: `featureFlagProvider` for reading current flag states and `featureFlagRepositoryProvider` for write operations. `onFlagToggle(flagKey, enabled)` calls the repository's update method and invalidates the relevant provider on success; optimistic UI updates are optional but improve perceived responsiveness. `onRolloutConditionUpdate(flagKey, condition)` serializes a `RolloutCondition` object (containing optional `minAppVersion` semver string and `activationDate` DateTime) to the repository. `navigateToFlagDetail(flagKey)` pushes a detail route for per-flag configuration.

The screen should guard all write actions behind an admin role check sourced from the auth provider. The flag list is driven by `featureFlagRepositoryProvider.getAllFlags()` which should return all flags registered for the active organization — ensure this includes flags that are not yet explicitly set (defaulting to disabled). Pagination may be needed for organizations with large flag sets.

Responsibilities

  • List all feature flags with their current enabled state for the active organization
  • Allow authorized admins to toggle flags and configure rollout conditions
  • Display phase rollout metadata (minimum version, activation date) per flag

Interfaces

build(BuildContext context)
onFlagToggle(String flagKey, bool enabled)
onRolloutConditionUpdate(String flagKey, RolloutCondition condition)
navigateToFlagDetail(String flagKey)

Relationships

Dependencies (2)

Components this component depends on

Related Data Entities (2)

Data entities managed by this component