Skip to content

Conversation

@pranjal-jately-ld
Copy link
Contributor

@pranjal-jately-ld pranjal-jately-ld commented Nov 12, 2025

Description

This PR adds support for an internal LaunchDarkly client within the toolbar package, enabling toolbar-specific feature flags and analytics tracking. The internal client is separate from the user's application client and can be optionally configured via environment variables.

What does this PR do?

  • Adds InternalClientProvider component to manage the toolbar's internal LaunchDarkly client
  • Implements createToolbarFlagFunction for type-safe access to toolbar feature flags
  • Adds support for configurable LaunchDarkly service URLs (base, stream, events) via environment variables
  • Updates build configuration to inject environment variables at build time
  • Adds comprehensive documentation for setting up the internal client configuration
  • Includes unit tests for the new provider and flag function

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation (changes to documentation only)
  • 🔧 Refactor (code change that neither fixes a bug nor adds a feature)
  • 🎨 Style (formatting, missing semicolons, etc; no production code change)
  • Performance (code change that improves performance)
  • Test (adding missing tests, refactoring tests; no production code change)
  • 🔨 Chore (updating grunt tasks, build process, etc; no production code change)

Screenshots/Videos


- Introduced InternalClientProvider to manage the internal LaunchDarkly
client for toolbar features and analytics.
- Added support for loading environment variables with the TOOLBAR_
prefix in the toolbar configuration files.
- Introduced a new vite-env.d.ts file to define environment variable
types for better TypeScript support.
…ternal client

- Added support for TOOLBAR_INTERNAL_BASE_URL, TOOLBAR_INTERNAL_STREAM_URL,
and TOOLBAR_INTERNAL_EVENTS_URL in the toolbar configuration.
@pranjal-jately-ld pranjal-jately-ld marked this pull request as ready for review November 14, 2025 16:51
@pranjal-jately-ld pranjal-jately-ld requested a review from a team as a code owner November 14, 2025 16:51
Copy link
Contributor

@cspath1 cspath1 left a comment

Choose a reason for hiding this comment

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

This is great!! I do think we will want to add env variables (probably via terraform) for where the toolbar env variables will come from during the CI/CD process. Other than that, this is such an exciting update that opens the door for a whole lot of awesome features moving forward!

@@ -0,0 +1,129 @@
import { describe, test, expect, vi, beforeEach } from 'vitest';
Copy link
Contributor

Choose a reason for hiding this comment

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

should we move this into the tests folder?

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