Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor feature flags #1100

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Refactor feature flags #1100

wants to merge 1 commit into from

Conversation

paustint
Copy link
Contributor

@paustint paustint commented Dec 1, 2024

Feature flags were sprinkled around but unused, so all of that has been removed.

Also added placeholder in the database and on user profile for feature flags

Feature flags were sprinkled around but unused, so all of that has been removed.
Also added placeholder in the database and on user profile for feature flags
@paustint paustint requested a review from Copilot December 1, 2024 17:32
Copy link

Report too large to display inline

View full report↗︎

Choose a reason for hiding this comment

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

Copilot reviewed 6 out of 21 changed files in this pull request and generated no suggestions.

Files not reviewed (15)
  • .eslintignore: Language not supported
  • .eslintrc.json: Language not supported
  • package.json: Language not supported
  • prisma/schema.prisma: Language not supported
  • libs/features/load-records/src/LoadRecords.tsx: Evaluated as low risk
  • libs/features/load-records-multi-object/src/LoadRecordsMultiObject.tsx: Evaluated as low risk
  • apps/jetstream-web-extension/src/pages/app/App.tsx: Evaluated as low risk
  • apps/api/src/main.ts: Evaluated as low risk
  • libs/auth/server/src/lib/auth.db.service.ts: Evaluated as low risk
  • apps/jetstream/src/app/app.tsx: Evaluated as low risk
  • scripts/generate.env.mjs: Evaluated as low risk
  • libs/features/load-records/src/steps/SelectObjectAndFile.tsx: Evaluated as low risk
  • apps/jetstream/src/app/components/core/NotificationsRequestModal.tsx: Evaluated as low risk
  • libs/shared/ui-core/src/app/NotificationsRequestModal.tsx: Evaluated as low risk
  • libs/shared/constants/src/lib/shared-constants.ts: Evaluated as low risk
Comments skipped due to low confidence (3)

libs/types/src/lib/types.ts:119

  • The transformation function in FeatureFlagsSchema might lead to unexpected behavior if the input is not properly sanitized. Consider removing the transformation and ensuring that the input is always a boolean.
.transform((val) => val === 'true' || val === true)

apps/api/src/app/db/user.db.ts:94

  • The hasFeatureFlagAccess function should ensure that the flagName is correctly checked within the featureFlags object. Please verify the correctness of this implementation.
export const hasFeatureFlagAccess = async ({ userId, flagName }: { userId: string; flagName: keyof FeatureFlags }): Promise<boolean> => {

apps/api/src/app/db/user.db.ts:89

  • The findIdByUserIdUserFacing function should ensure that the UserProfileSchema.parse correctly parses the user profile. Please verify the correctness of this implementation.
export const findIdByUserIdUserFacing = async ({ userId }: { userId: string }): Promise<UserProfileUi> => {
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.

1 participant