mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-08 22:58:01 -05:00
This PR allows us to feature flag on the frontend, this means we can rollout features in stages, hide features, do AB testing etc. ### Changes 🏗️ Added a LaunchDarkly Provider Added a withFeatureFlag component Added two env vars for: - enabling LD - specifying the _public_ client side key Usage: ``` 'use client' import { useFlags } from 'launchdarkly-react-client-sdk' import { withFeatureFlag } from '@/components/feature-flag/with-feature-flag' function TestFlagPage() { const flags = useFlags() return ( <div className="p-4"> <h1>If you can see this, the feature flag is ON</h1> <pre>Current flag value: {JSON.stringify(flags, null, 2)}</pre> </div> ) } export default withFeatureFlag(TestFlagPage, 'test-flag') ``` ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: <!-- Put your test plan here: --> - [ ] ... <details> <summary>Test plan</summary> - Set LD to false - Navigate to a test page, should not be visible - Set LD to true - Navigate to same test page, should be visible </details> #### For configuration changes: - [x] `.env.example` is updated or already compatible with my changes - [x] I have included a list of my configuration changes in the PR description (under **Changes**) - [x] I have updated infra repo <details> <summary>Examples of configuration changes</summary> - Changing ports - Adding new services that need to communicate with each other - Secrets or environment variable changes - New or infrastructure changes such as databases </details> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Bently <tomnoon9@gmail.com> Co-authored-by: SerchioSD <69461657+serchiosd@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Abhimanyu Yadav <122007096+Abhi1992002@users.noreply.github.com> Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co> Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co> Co-authored-by: Reinier van der Leer <pwuts@agpt.co> Co-authored-by: Toran Bruce Richards <toran.richards@gmail.com>
108 lines
3.7 KiB
JSON
108 lines
3.7 KiB
JSON
{
|
|
"name": "frontend",
|
|
"version": "0.3.4",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "next dev",
|
|
"dev:nosentry": "export NODE_ENV=development && export DISABLE_SENTRY=true && next dev",
|
|
"dev:test": "export NODE_ENV=test && next dev",
|
|
"build": "next build",
|
|
"start": "next start",
|
|
"lint": "next lint && prettier --check .",
|
|
"format": "prettier --write .",
|
|
"type-check": "tsc --noEmit",
|
|
"test": "playwright test",
|
|
"test-ui": "playwright test --ui",
|
|
"gentests": "playwright codegen http://localhost:3000",
|
|
"storybook": "storybook dev -p 6006",
|
|
"build-storybook": "storybook build",
|
|
"test-storybook": "test-storybook",
|
|
"test-storybook:ci": "concurrently -k -s first -n \"SB,TEST\" -c \"magenta,blue\" \"npm run build-storybook -- --quiet && npx http-server storybook-static --port 6006 --silent\" \"wait-on tcp:6006 && npm run test-storybook\""
|
|
},
|
|
"browserslist": [
|
|
"defaults"
|
|
],
|
|
"dependencies": {
|
|
"@faker-js/faker": "^9.2.0",
|
|
"@hookform/resolvers": "^3.9.1",
|
|
"@next/third-parties": "^15.0.3",
|
|
"@radix-ui/react-alert-dialog": "^1.1.2",
|
|
"@radix-ui/react-avatar": "^1.1.1",
|
|
"@radix-ui/react-checkbox": "^1.1.2",
|
|
"@radix-ui/react-collapsible": "^1.1.1",
|
|
"@radix-ui/react-context-menu": "^2.2.1",
|
|
"@radix-ui/react-dialog": "^1.1.2",
|
|
"@radix-ui/react-dropdown-menu": "^2.1.2",
|
|
"@radix-ui/react-icons": "^1.3.2",
|
|
"@radix-ui/react-label": "^2.1.0",
|
|
"@radix-ui/react-popover": "^1.1.2",
|
|
"@radix-ui/react-radio-group": "^1.2.1",
|
|
"@radix-ui/react-scroll-area": "^1.2.1",
|
|
"@radix-ui/react-select": "^2.1.2",
|
|
"@radix-ui/react-separator": "^1.1.0",
|
|
"@radix-ui/react-slot": "^1.1.0",
|
|
"@radix-ui/react-switch": "^1.1.1",
|
|
"@radix-ui/react-toast": "^1.2.2",
|
|
"@radix-ui/react-tooltip": "^1.1.4",
|
|
"@sentry/nextjs": "^8",
|
|
"@supabase/ssr": "^0.5.2",
|
|
"@supabase/supabase-js": "^2.46.1",
|
|
"@tanstack/react-table": "^8.20.5",
|
|
"@xyflow/react": "^12.3.5",
|
|
"ajv": "^8.17.1",
|
|
"class-variance-authority": "^0.7.0",
|
|
"clsx": "^2.1.1",
|
|
"cmdk": "1.0.4",
|
|
"cookie": "1.0.2",
|
|
"date-fns": "^4.1.0",
|
|
"dotenv": "^16.4.5",
|
|
"elliptic": "6.6.1",
|
|
"launchdarkly-react-client-sdk": "^3.6.0",
|
|
"lucide-react": "^0.462.0",
|
|
"moment": "^2.30.1",
|
|
"next": "^14.2.13",
|
|
"next-themes": "^0.4.3",
|
|
"react": "^18",
|
|
"react-day-picker": "^9.4.0",
|
|
"react-dom": "^18",
|
|
"react-hook-form": "^7.53.2",
|
|
"react-icons": "^5.3.0",
|
|
"react-markdown": "^9.0.1",
|
|
"react-modal": "^3.16.1",
|
|
"react-shepherd": "^6.1.6",
|
|
"recharts": "^2.13.3",
|
|
"tailwind-merge": "^2.5.5",
|
|
"tailwindcss-animate": "^1.0.7",
|
|
"uuid": "^11.0.3",
|
|
"zod": "^3.23.8"
|
|
},
|
|
"devDependencies": {
|
|
"@chromatic-com/storybook": "^3.2.2",
|
|
"@playwright/test": "^1.49.0",
|
|
"@storybook/addon-essentials": "^8.4.5",
|
|
"@storybook/addon-interactions": "^8.4.5",
|
|
"@storybook/addon-links": "^8.4.5",
|
|
"@storybook/addon-onboarding": "^8.4.5",
|
|
"@storybook/blocks": "^8.4.5",
|
|
"@storybook/nextjs": "^8.4.5",
|
|
"@storybook/react": "^8.3.5",
|
|
"@storybook/test": "^8.3.5",
|
|
"@storybook/test-runner": "^0.19.1",
|
|
"@types/node": "^22.9.3",
|
|
"@types/react": "^18",
|
|
"@types/react-dom": "^18",
|
|
"@types/react-modal": "^3.16.3",
|
|
"concurrently": "^9.1.0",
|
|
"eslint": "^8",
|
|
"eslint-config-next": "15.0.3",
|
|
"eslint-plugin-storybook": "^0.11.1",
|
|
"postcss": "^8",
|
|
"prettier": "^3.3.3",
|
|
"prettier-plugin-tailwindcss": "^0.6.9",
|
|
"storybook": "^8.4.5",
|
|
"tailwindcss": "^3.4.15",
|
|
"typescript": "^5"
|
|
},
|
|
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
|
}
|