feat(ENG-10552): feature flag context and hook#4
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements a feature flag system to control the visibility of the hub link account release functionality. The implementation includes a React context for managing feature flags, a custom hook for checking feature flags, and API integration to fetch feature flag settings from the backend.
- Creates a feature flag system with context provider and custom hook
- Adds API endpoint to fetch feature flag settings from
/hub/settings - Refactors the StackOneHub component to use a new Hub wrapper that provides feature flag context
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/shared/types/featureFlags.ts | Defines the FeatureFlag type with 'hub_link_account_release' flag |
| src/shared/queries.ts | Adds getSettings API function to fetch feature flags from backend |
| src/shared/hooks/useFeatureFlags.ts | Custom hook for checking if a feature flag is enabled |
| src/shared/contexts/featureFlagContext.tsx | React context provider for feature flag state management |
| src/modules/integration-picker/IntegrationPicker.tsx | Uses feature flag hook to conditionally render content |
| src/StackOneHub.tsx | Refactored to use new Hub component wrapper |
| src/Hub.tsx | New wrapper component that fetches settings and provides feature flag context |
jpmiguel
approved these changes
Aug 8, 2025
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.
No description provided.