Added feature flags system#803
Merged
Merged
Conversation
|
@danditomaso is attempting to deploy a commit to the Meshtastic Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a feature flag system to enable controlled feature rollouts without affecting users. The system uses environment variables validated with Zod and provides React hooks for easy integration.
- Implements a FeatureFlags class with subscription-based updates and override capabilities
- Adds React hooks (useFeatureFlags, useFeatureFlag) for consuming feature flags in components
- Creates a development override system that automatically enables certain flags in dev mode
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/web/src/core/services/featureFlags.ts | Core feature flag service with Zod validation and subscription system |
| packages/web/src/core/services/dev-overrides.ts | Development environment overrides for feature flags |
| packages/web/src/core/hooks/useFeatureFlags.ts | React hooks for accessing feature flags with automatic re-renders |
| packages/web/src/components/UI/Footer.tsx | Refactors environment variable access to use memoized values |
| packages/web/src/App.tsx | Imports dev overrides and removes commented code |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
3375580 to
440dcc4
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces a feature flag system to the code base, this enables us to add new features to our main branch, without concern of effecting users and can roll out a more throughly tested feature at a later date.
Related Issues
This was added so we can merge a persisted node PR to the main branch, and disable the persistence piece for users.
Changes Made
Testing Done
It works
Checklist
CONTRIBUTING_I18N_DEVELOPER_GUIDE.md for more details)