Skip to content

Remove feature flag: registerFrontendClient #10023

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

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

Conversation

sastromskis
Copy link
Contributor

Feature Flag Removal: registerFrontendClient

This PR removes the registerFrontendClient feature flag from the codebase. The changes have been automatically applied using Henry, our automated flag removal assistant.

Flag Value: kept

The feature flag registerFrontendClient has been removed from the codebase. The
feature it controlled, which pertains to how frontend client SDKs register
themselves and report metrics, has been permanently enabled.

What was removed:

• The registerFrontendClient flag checks using useUiFlag in
frontend/src/component/application/ApplicationChart.tsx.
• The registerFrontendClient flag checks using this.flagResolver.isEnabled()
in:
• src/lib/features/frontend-api/frontend-api-service.ts
• src/lib/features/metrics/instance/metrics.ts
• The flag definition from src/lib/types/experimental.ts (both IFlagKey and the
flags object).
• The flag definition from frontend/src/interfaces/uiConfig.ts (UiFlags
interface).
• The flag from experimental configurations in:
• src/server-dev.ts
• src/test/e2e/api/admin/applications.e2e.test.ts
• src/lib/features/metrics/instance/metrics.test.ts
• An unused import for useUiFlag in
frontend/src/component/application/ApplicationChart.tsx.
• The registerFrontendClientEnabled variable in
frontend/src/component/application/ApplicationChart.tsx.

What was kept:

• The code paths that were executed when registerFrontendClient was true are
now the default behavior:
• In frontend/src/component/application/ApplicationChart.tsx, the logic to
display "Backend SDK" and "Frontend SDK" sections (if data exists) is now
always active, while the generic "SDK" section (previously shown when the
flag was false) has been removed.
• In src/lib/features/frontend-api/frontend-api-service.ts, frontend client
registration via clientInstanceService.registerFrontendClient() will occur
if metrics.instanceId and sdkVersion are present.
• In src/lib/features/metrics/instance/metrics.ts, frontend client
registration via clientInstanceService.registerFrontendClient() will occur
for applications with sdkType === 'frontend' and a valid sdkVersion.

Why these changes were made:

The registerFrontendClient feature has been deemed stable and beneficial, so the
decision was made to make it a permanent part of the application. Removing the
feature flag simplifies the codebase by eliminating conditional logic and dead
code paths associated with the "off" state of the flag. This improves
maintainability and readability.

Tokens: 46k sent, 2.9k received. Cost: $0.09 message, $0.09 session.
Applied edit to src/test/e2e/api/admin/applications.e2e.test.ts
Applied edit to src/server-dev.ts
Applied edit to src/lib/types/experimental.ts
Applied edit to frontend/src/component/application/ApplicationChart.tsx
Applied edit to src/lib/features/frontend-api/frontend-api-service.ts
Applied edit to frontend/src/interfaces/uiConfig.ts
Applied edit to src/lib/features/metrics/instance/metrics.ts
Applied edit to src/lib/features/metrics/instance/metrics.test.ts
Commit 4106a3a chore: remove registerFrontendClient flag, keep feature

Copy link

vercel bot commented May 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview May 21, 2025 5:34pm

Copy link
Contributor

@sastromskis, core features have been modified in this pull request. Please review carefully!

Copy link
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@coveralls
Copy link

Coverage Status

coverage: 91.247% (+0.01%) from 91.235%
when pulling 4106a3a on chore-remove-flag-registerFrontendClient-20250521173203
into 76b201e on main.

@chriswk chriswk moved this from New to In Progress in Issues and PRs May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants