Skip to content

feat(shared): migrate feature toggles from Unleash to Vercel Flags - #796

Merged
LucasSantana-Dev merged 3 commits into
mainfrom
feature/vercel-flags
May 3, 2026
Merged

LucasSantana-Dev merged 3 commits into
mainfrom
feature/vercel-flags

Conversation

@LucasSantana-Dev

Copy link
Copy Markdown
Owner

Summary

  • Replaces the Unleash SDK with @vercel/flags-core for global feature flag evaluation
  • Deletes packages/shared/src/config/unleash.ts; adds packages/shared/src/config/vercelFlags.ts with a lazy-cached FlagsClient driven by a FLAGS env var
  • FeatureToggleService now resolves flags via Vercel Flags → DB guild override → config default, in that priority order
  • Frontend featuresStore, FeatureCard, and GlobalTogglesSection updated to consume the new toggle shape
  • Adds useFeatures hook; updates integration tests and adds FeatureToggleService.spec.ts coverage
  • Regenerated package-lock.json to restore discord.js hoisting that was broken by the new dep tree

Test plan

  • CI/CD Pipeline green on this branch (confirmed — all checks pass)
  • FeatureToggleService.spec.ts covers Vercel path, DB-override path, and fallback path
  • Integration tests for toggles.ts route pass
  • FLAGS env var absent → service falls back to DB/config defaults silently

🤖 Generated with Claude Code

@vercel

vercel Bot commented May 3, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lucky Ready Ready Preview, Comment May 3, 2026 8:52pm

Request Review

@github-actions github-actions Bot added dependencies Pull requests that update a dependency file backend frontend shared labels May 3, 2026
@coderabbitai

coderabbitai Bot commented May 3, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7625c8d3-6037-4903-ae51-9ec2c1bd4c6e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/vercel-flags

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Rebase regenerated package-lock.json with discord.js nested under
packages/bot/node_modules/, breaking the shared workspace tsc build
(services and utils import discord.js types). Restored hoisting by
resetting to main's lockfile and re-resolving with new top-level deps.
…olution

Using main's lockfile since it already includes @vercel/flags-core and preserves
the discord.js dependency hoisting needed for TypeScript type inference in GuildService.
@sonarqubecloud

sonarqubecloud Bot commented May 3, 2026

Copy link
Copy Markdown

@LucasSantana-Dev
LucasSantana-Dev merged commit 58e70f8 into main May 3, 2026
12 checks passed
@LucasSantana-Dev
LucasSantana-Dev deleted the feature/vercel-flags branch May 3, 2026 20:57
LucasSantana-Dev added a commit that referenced this pull request May 13, 2026
)

* feat: use vercel feature flags

* chore: regenerate lockfile to restore discord.js hoisting

Rebase regenerated package-lock.json with discord.js nested under
packages/bot/node_modules/, breaking the shared workspace tsc build
(services and utils import discord.js types). Restored hoisting by
resetting to main's lockfile and re-resolving with new top-level deps.

* chore: restore lockfile hoisting from main to fix discord.js type resolution

Using main's lockfile since it already includes @vercel/flags-core and preserves
the discord.js dependency hoisting needed for TypeScript type inference in GuildService.

This branch was successfully deployed

1 active deployment
Preview — 997df887 Deployed May 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file size/xs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant