Skip to content

feat: add proper feature flag system (replace env var hacks) #358

Description

@ryanmagoon

Problem

We're using GAMELORD_HW_SAVE_STATES=1 as an env var to toggle experimental features, which is clunky:

  • Utility processes don't inherit shell env vars (had to plumb it through init commands)
  • No UI for toggling — requires restarting the app
  • No persistence — have to set it every time
  • Doesn't scale as we add more experimental features

Proposal

Add a proper feature flag system. Options to evaluate:

  • Vercel Flags SDK — designed for this, integrates with the Vercel ecosystem
  • Simple local flags — JSON file in userData with a Settings > Experimental panel to toggle flags
  • LaunchDarkly / Statsig — overkill for a desktop app but worth noting

Current flags that would benefit

Requirements

  • Flags accessible from main process, worker processes, and renderer
  • Persistent across sessions
  • Toggleable from the UI (Settings > Experimental or similar)
  • No restart required (ideally)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions