Open
Conversation
## What Remove 7 feature flags that are always `true` across all environments, along with their dead code paths and legacy fallbacks. ## Why These flags have been fully rolled out and no longer gate any behavior. Removing them simplifies the codebase and eliminates unreachable code. ## Changes ### Type definitions (`packages/types`) - Remove `enableDrivePickerInLiteMode`, `requireConsentForGetWebpage`, `requireConsentForOpenWebpage`, `streamGenWebpage`, `streamPlanner` from `RuntimeFlags` - Remove `ENABLE_NEW_URL_SCHEME`, `ENABLE_EMAIL_OPT_IN` from `ClientDeploymentConfiguration` ### Server (`packages/unified-server`) - Remove 7 env-var exports from `flags.ts` - Remove corresponding mappings in `config.ts` ### Visual Editor (`packages/visual-editor`) - **FlagController**: Remove field accessors, getters, switch cases, and constructor `#set` calls for 5 flags - **html-generator.ts**: Delete `callGenWebpageLegacy` function (~100 lines); always use streaming - **flow-generator.ts**: Always use `#streamOneShot` (remove `streamPlanner` gate) - **urls.ts**: Remove `enableNewUrlScheme` parameter; old URL scheme branches removed. Fix landing page redirect to explicitly encode `flow`/`mode` as search params - **board-actions.ts**: Consent check now unconditional (remove `requireConsentForGetWebpage` gate) - **floating-input.ts**: Drive picker always shown in lite mode - **global-settings.ts / main-base.ts**: Email opt-in always active ### Tests - Update `flag-controller.test.ts`, `board-route-actions.test.ts`, `router-controller.test.ts`, `urls.test.ts`, and `default-flags.ts` ## Testing - `npm run build:tsc` passes across all three packages
📊 Coverage Report
🔴 2 files with reduced line coverage
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Remove 7 feature flags that are always
trueacross all environments, alongwith their dead code paths and legacy fallbacks.
Why
These flags have been fully rolled out and no longer gate any behavior. Removing
them simplifies the codebase and eliminates unreachable code.
Changes
Type definitions (
packages/types)enableDrivePickerInLiteMode,requireConsentForGetWebpage,requireConsentForOpenWebpage,streamGenWebpage,streamPlannerfromRuntimeFlagsENABLE_NEW_URL_SCHEME,ENABLE_EMAIL_OPT_INfromClientDeploymentConfigurationServer (
packages/unified-server)flags.tsconfig.tsVisual Editor (
packages/visual-editor)constructor
#setcalls for 5 flagscallGenWebpageLegacyfunction (~100 lines);always use streaming
#streamOneShot(removestreamPlannergate)
enableNewUrlSchemeparameter; old URL scheme branchesremoved. Fix landing page redirect to explicitly encode
flow/modeassearch params
requireConsentForGetWebpagegate)Tests
flag-controller.test.ts,board-route-actions.test.ts,router-controller.test.ts,urls.test.ts, anddefault-flags.tsTesting
npm run build:tscpasses across all three packages