Skip to content

feat(ENG-10552): feature flag context and hook#4

Merged
adefreitas merged 2 commits into
mainfrom
ENG-10552/feature-flags
Aug 8, 2025
Merged

feat(ENG-10552): feature flag context and hook#4
adefreitas merged 2 commits into
mainfrom
ENG-10552/feature-flags

Conversation

@adefreitas

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings August 7, 2025 16:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Comment thread src/modules/integration-picker/IntegrationPicker.tsx Outdated
Comment thread src/modules/integration-picker/IntegrationPicker.tsx Outdated
Comment thread src/Hub.tsx Outdated
Comment thread src/shared/contexts/featureFlagContext.tsx
Comment thread src/shared/hooks/useFeatureFlags.ts
@adefreitas adefreitas changed the title [ENG-10552] feat: feature flag context and hook feat(ENG-10552): feature flag context and hook Aug 8, 2025
@adefreitas adefreitas requested a review from jpmiguel August 8, 2025 09:49
@adefreitas adefreitas merged commit 3c08b88 into main Aug 8, 2025
2 of 3 checks passed
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.

3 participants