Skip to content

Strip the CLINICAL_FEATURES_ENABLED feature flag #633

@bencap

Description

@bencap

Summary

The CLINICAL_FEATURES_ENABLED feature flag was introduced to gate MaveMD clinical features during development. Clinical features are now enabled in all environments (dev, staging, preview, prodapi, live) and the flag is permanently true. It should be removed so that the gated code runs unconditionally.

What to remove

Configuration layer

  • src/config.js — Remove the CLINICAL_FEATURES_ENABLED property
  • src/config.d.ts — Remove the type declaration
  • .env.dev, .env.staging, .env.preview, .env.prodapi, .env.live — Remove the VITE_CLINICAL_FEATURES_ENABLED line from each

Router (src/router/index.ts)

Three route groups are conditionally spread behind the flag. Make them unconditional:

  • /mavemd route (lines ~54–57)
  • /variants/:clingenAlleleId route (lines ~171–182)
  • /variant-measurements/:urn route (lines ~183–192)

Toolbar (src/components/layout/Toolbar.vue)

  • Remove the conditional spread around the MaveMD menu item (lines ~100–106) and include it unconditionally.

ScoreSetHistogram (src/components/ScoreSetHistogram.vue)

Six references to the flag:

  • scoreSetHasCalibrations initialization (line ~280) — remove the config.CLINICAL_FEATURES_ENABLED && guard
  • clinicalControlsEnabled data property (line ~299) — remove or set to true unconditionally
  • hasTabBar computed (line ~599) — remove the flag check
  • scoreSet watcher clinical controls loading (line ~881) — remove the if guard
  • Clinical significance classification options watcher (line ~989) — remove the if guard
  • renderShader call for calibrations (line ~1125) — remove the flag check

ScoreSetView (src/components/screens/ScoreSetView.vue)

Four references:

  • v-if="config.CLINICAL_FEATURES_ENABLED" on the clinical mode control container (line ~65) — remove the v-if
  • :show-protein-structure-button binding (line ~135) — remove the config.CLINICAL_FEATURES_ENABLED condition
  • v-if="config.CLINICAL_FEATURES_ENABLED" on the assay fact sheet container (line ~161) — remove the v-if
  • clinicalMode data initialization (line ~521) — set to true unconditionally

Instruction files

  • .github/instructions/copilot-instructions.md — Remove the VITE_CLINICAL_FEATURES_ENABLED env var entry (line 67) and the feature flag architectural note (line 87)
  • .github/instructions/routing-and-auth.instructions.md — Remove the "Conditional" row from the route categories table (line 15), remove the "Feature-flagged routes" section (lines 49–55), and update any surrounding text

Acceptance criteria

  • All clinical features render unconditionally — no runtime checks for the flag
  • The VITE_CLINICAL_FEATURES_ENABLED environment variable is not referenced anywhere
  • config.CLINICAL_FEATURES_ENABLED is not referenced anywhere
  • Instruction/documentation files are updated to remove references to the flag
  • Application builds without errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    app: frontendTask implementation touches the frontendtype: maintenanceMaintaining this project

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions