Skip to content

feat(features): Type frontend gates with scoped contracts - #129484

Draft
natemoo-re wants to merge 1 commit into
nm/features/retired-gatesfrom
feat/typed-feature-flags
Draft

natemoo-re wants to merge 1 commit into
nm/features/retired-gatesfrom
feat/typed-feature-flags

Conversation

@natemoo-re

@natemoo-re natemoo-re commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Type organization, project, and global feature checks so typos and surviving consumers of removed public registrations fail typecheck. Public names come from #129478; private names already used by the public frontend stay in a small, manually maintained declaration.

Backend changes regenerate the public types before checking consumers. Ordinary frontend changes use the committed snapshot. Private flag removal remains a manual cleanup step, and local developer overrides continue to accept arbitrary names while validating stored boolean values.

Review the scoped types and override boundary first. Most remaining edits preserve literal types in wrappers and fixtures. Retired-feature behavior changes are in #129514, which this PR builds on.

@github-actions github-actions Bot added Scope: Frontend Automatically applied to PRs that change frontend components Scope: Backend Automatically applied to PRs that change backend components labels Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

🚨 Warning: This pull request contains Frontend and Backend changes!

It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently.

Have questions? Please ask in the #discuss-dev-infra channel.

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Story previews

Preview the stories changed in this PR on the Vercel deployment:

Preview deployment: https://sentry-nffwa0hr5.sentry.dev

@natemoo-re
natemoo-re force-pushed the feat/typed-feature-flags branch from 10a0f5c to 034a0e4 Compare November 2, 2026 17:40
@natemoo-re natemoo-re changed the title feat(features): Type frontend gates from Python registration feat(features): Type gates from application registries Nov 2, 2026
@sentry

sentry Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Sentry Snapshot Testing

Name Added Removed Changed Renamed Unchanged Skipped Status
sentry-frontend
sentry-frontend
0 0 0 0 780 0 ✅ Unchanged

⚙️ sentry-frontend Snapshot Settings

@natemoo-re
natemoo-re added this pull request to stack #129501 November 2, 2026 17:42
@natemoo-re
natemoo-re force-pushed the feat/typed-feature-flags branch from 034a0e4 to d4e7587 Compare November 2, 2026 18:26
@natemoo-re natemoo-re changed the title feat(features): Type gates from application registries feat(features): Type frontend gates with scoped contracts Nov 2, 2026
@natemoo-re
natemoo-re removed this pull request from stack #129501 November 2, 2026 18:28
@natemoo-re
natemoo-re changed the base branch from feat/typed-feature-flags-backend to nm/features/retired-gates November 2, 2026 18:28
@natemoo-re
natemoo-re added this pull request to stack #129516 November 2, 2026 18:28
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

Metric Before After Delta
Coverage 95.86% 95.86% ±0%
Typed 142,767 142,776 🟢 +9
Untyped 6,163 6,164 🔴 +1
🔍 1 new type safety issue introduced

Type assertions (as) (1 new)

File Line Detail
static/app/utils/featureFlagOverrides.ts 79 as OrganizationFeature[] — Array.from(enabled) as OrganizationFeature[]

This is informational only and does not block the PR.

This branch was successfully deployed

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

Labels

Scope: Backend Automatically applied to PRs that change backend components Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant