Skip to content

Comments

Remove fully rolled-out feature flags#7925

Open
dglazkov wants to merge 2 commits intomainfrom
remove-unused-flags
Open

Remove fully rolled-out feature flags#7925
dglazkov wants to merge 2 commits intomainfrom
remove-unused-flags

Conversation

@dglazkov
Copy link
Collaborator

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

## 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
@github-actions
Copy link

📊 Coverage Report

Metric PR Main Delta
Lines 98.37% 98.39% 🔴 -0.02%
Functions 99.57% 99.58% 🔴 -0.01%
Branches 94.65% 94.61% 🟢 +0.04%
🔴 2 files with reduced line coverage
File PR Main Delta
router-controller.ts 97.14% 98.57% 🔴 -1.43%
flag-controller.ts 99.64% 99.73% 🔴 -0.09%

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.

1 participant