Skip to content

Introduce feature flag system#9

Merged
lukecarr merged 5 commits into
mainfrom
flags
May 20, 2026
Merged

Introduce feature flag system#9
lukecarr merged 5 commits into
mainfrom
flags

Conversation

@lukecarr
Copy link
Copy Markdown
Owner

@lukecarr lukecarr commented May 19, 2026

Adds a feature-flag system so operators can toggle parts of Ember on or off at startup.

What

  • Flag + FlagManager (api): catalog-style declarations with enabledByDefault, resolved via enabledByDefault XOR isSet.
  • Flags catalog + SimpleFlagManager (plugin): single source of truth for declared flags; in-memory manager loaded once from plugins/Ember/flags.txt (lowercased + trimmed, with # comment support).
  • Subcommand abstraction: subcommands can declare a gating flag; the subcommand builder extension skips registration when the flag resolves disabled, so gated features genuinely vanish from tab-completion.
  • /ember flags list / /ember flags get <flag>: read-only inspection of the catalog with hover-rendered descriptions. Gated by the new ember.flags permission.
  • Msg: Caffeine-backed MiniMessage cache (static / keyed / uncached-with-resolvers) so repeated renders skip retokenization.
  • command.version is the first declared flag, gating /ember version.

Docs

  • New server-owners/flags.mdx (conceptual + flags.txt format) and commands/flags.mdx (command reference).
  • permissions.mdx gains ember.flags; configuration.mdx and the server-owners index link out to the flags page.

Signed-off-by: Luke Carr <me@carr.sh>
@lukecarr lukecarr self-assigned this May 19, 2026
@lukecarr lukecarr added the enhancement New feature or request label May 19, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 19, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (c941d2f) to head (2af6565).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##                main        #9    +/-   ##
============================================
  Coverage     100.00%   100.00%            
- Complexity        28        72    +44     
============================================
  Files              5        13     +8     
  Lines             58       169   +111     
  Branches          11        18     +7     
============================================
+ Hits              58       169   +111     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented May 19, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Ember 🟢 Ready View Preview May 19, 2026, 5:47 PM

Signed-off-by: Luke Carr <me@carr.sh>
lukecarr added 2 commits May 20, 2026 14:29
Signed-off-by: Luke Carr <me@carr.sh>
Signed-off-by: Luke Carr <me@carr.sh>
Signed-off-by: Luke Carr <me@carr.sh>
@lukecarr lukecarr marked this pull request as ready for review May 20, 2026 14:31
@lukecarr lukecarr merged commit bc75778 into main May 20, 2026
8 checks passed
@lukecarr lukecarr deleted the flags branch May 20, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants