[PR #3838] [MERGED] PM-11224 Add menu to update feature flags with overridden values in real time #61723

Closed
opened 2026-05-12 01:00:47 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/3838
Author: @dseverns-livefront
Created: 8/27/2024
Status: Merged
Merged: 8/29/2024
Merged by: @dseverns-livefront

Base: mainHead: PM-11224/debug-menu


📝 Commits (8)

  • 754090b PM-11224 Add debug overrides and feature flag manager to use in debug menu mode. UI for debug menu and way to open it.
  • 7eb1918 add mvm test
  • 9ca8d96 inline blades rock
  • bdd6a85 cleanup
  • b64d0f8 pr feedback
  • 9f12c62 pr feedback, don't throw
  • 2397400 pr feedback
  • 88c6a4b pr feedback

📊 Changes

29 files changed (+1451 additions, -17 deletions)

View changed files

📝 app/build.gradle.kts (+6 -0)
📝 app/src/main/java/com/x8bit/bitwarden/MainActivity.kt (+30 -15)
📝 app/src/main/java/com/x8bit/bitwarden/MainViewModel.kt (+15 -0)
app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/disk/FeatureFlagOverrideDiskSource.kt (+19 -0)
app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/disk/FeatureFlagOverrideDiskSourceImpl.kt (+37 -0)
📝 app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/disk/di/PlatformDiskModule.kt (+10 -0)
app/src/main/java/com/x8bit/bitwarden/data/platform/manager/DebugMenuFeatureFlagManagerImpl.kt (+37 -0)
📝 app/src/main/java/com/x8bit/bitwarden/data/platform/manager/FeatureFlagManagerImpl.kt (+5 -1)
📝 app/src/main/java/com/x8bit/bitwarden/data/platform/manager/di/PlatformManagerModule.kt (+12 -1)
📝 app/src/main/java/com/x8bit/bitwarden/data/platform/manager/model/FlagKey.kt (+13 -0)
app/src/main/java/com/x8bit/bitwarden/data/platform/repository/DebugMenuRepository.kt (+35 -0)
app/src/main/java/com/x8bit/bitwarden/data/platform/repository/DebugMenuRepositoryImpl.kt (+45 -0)
📝 app/src/main/java/com/x8bit/bitwarden/data/platform/repository/di/PlatformRepositoryModule.kt (+13 -0)
app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/debugmenu/DebugMenuNavigation.kt (+29 -0)
app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/debugmenu/DebugMenuScreen.kt (+135 -0)
app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/debugmenu/DebugMenuViewModel.kt (+126 -0)
app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/debugmenu/components/FeatureFlagListItems.kt (+68 -0)
app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/debugmenu/di/DebugMenuModule.kt (+22 -0)
app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/debugmenu/manager/DebugLaunchManagerImpl.kt (+67 -0)
app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/debugmenu/manager/DebugMenuLaunchManager.kt (+18 -0)

...and 9 more files

📄 Description

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-11224

📔 Objective

  • Allow for a special UI to appear to let a dev/tester/qa have access to changing feature flags states in build marked with special flag in config
  • Add build config flag to enable debug menu
  • If this flag it true use a decorator version of the FeatureFlagManager which uses the saved overridden values
  • Add basic UI to toggle existing feature flag Boolean values to true or false

📸 Screenshots

https://github.com/user-attachments/assets/4453ec47-5ede-4e4d-a873-42cd3153781d

New UI now looks like:
image

Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed
    issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/3838 **Author:** [@dseverns-livefront](https://github.com/dseverns-livefront) **Created:** 8/27/2024 **Status:** ✅ Merged **Merged:** 8/29/2024 **Merged by:** [@dseverns-livefront](https://github.com/dseverns-livefront) **Base:** `main` ← **Head:** `PM-11224/debug-menu` --- ### 📝 Commits (8) - [`754090b`](https://github.com/bitwarden/android/commit/754090bc2ca6aae05a49b0e19518f1a59d18803c) PM-11224 Add debug overrides and feature flag manager to use in debug menu mode. UI for debug menu and way to open it. - [`7eb1918`](https://github.com/bitwarden/android/commit/7eb1918ef98b5eb73b7732636b8b36ac495cb8e7) add mvm test - [`9ca8d96`](https://github.com/bitwarden/android/commit/9ca8d96fd54ca5434501580f5327308711eb872a) inline blades rock - [`bdd6a85`](https://github.com/bitwarden/android/commit/bdd6a855cac17dc67068a98531bd4b9ef4bc6fa5) cleanup - [`b64d0f8`](https://github.com/bitwarden/android/commit/b64d0f8dd1dd18a51f7e68a031f7fe0e2dfa006c) pr feedback - [`9f12c62`](https://github.com/bitwarden/android/commit/9f12c62fac62ff8b113fa08154f7c90a66c57829) pr feedback, don't throw - [`2397400`](https://github.com/bitwarden/android/commit/23974006a07faf365b52336309486326b922cc39) pr feedback - [`88c6a4b`](https://github.com/bitwarden/android/commit/88c6a4ba23fc08e9b1274f496da737be6d6046bb) pr feedback ### 📊 Changes **29 files changed** (+1451 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `app/build.gradle.kts` (+6 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/MainActivity.kt` (+30 -15) 📝 `app/src/main/java/com/x8bit/bitwarden/MainViewModel.kt` (+15 -0) ➕ `app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/disk/FeatureFlagOverrideDiskSource.kt` (+19 -0) ➕ `app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/disk/FeatureFlagOverrideDiskSourceImpl.kt` (+37 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/data/platform/datasource/disk/di/PlatformDiskModule.kt` (+10 -0) ➕ `app/src/main/java/com/x8bit/bitwarden/data/platform/manager/DebugMenuFeatureFlagManagerImpl.kt` (+37 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/data/platform/manager/FeatureFlagManagerImpl.kt` (+5 -1) 📝 `app/src/main/java/com/x8bit/bitwarden/data/platform/manager/di/PlatformManagerModule.kt` (+12 -1) 📝 `app/src/main/java/com/x8bit/bitwarden/data/platform/manager/model/FlagKey.kt` (+13 -0) ➕ `app/src/main/java/com/x8bit/bitwarden/data/platform/repository/DebugMenuRepository.kt` (+35 -0) ➕ `app/src/main/java/com/x8bit/bitwarden/data/platform/repository/DebugMenuRepositoryImpl.kt` (+45 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/data/platform/repository/di/PlatformRepositoryModule.kt` (+13 -0) ➕ `app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/debugmenu/DebugMenuNavigation.kt` (+29 -0) ➕ `app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/debugmenu/DebugMenuScreen.kt` (+135 -0) ➕ `app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/debugmenu/DebugMenuViewModel.kt` (+126 -0) ➕ `app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/debugmenu/components/FeatureFlagListItems.kt` (+68 -0) ➕ `app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/debugmenu/di/DebugMenuModule.kt` (+22 -0) ➕ `app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/debugmenu/manager/DebugLaunchManagerImpl.kt` (+67 -0) ➕ `app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/debugmenu/manager/DebugMenuLaunchManager.kt` (+18 -0) _...and 9 more files_ </details> ### 📄 Description ## 🎟️ Tracking https://bitwarden.atlassian.net/browse/PM-11224 <!-- Paste the link to the Jira or GitHub issue or otherwise describe / point to where this change is coming from. --> ## 📔 Objective - Allow for a special UI to appear to let a dev/tester/qa have access to changing feature flags states in build marked with special flag in config - Add build config flag to enable debug menu - If this flag it true use a decorator version of the `FeatureFlagManager` which uses the saved overridden values - Add basic UI to toggle existing feature flag Boolean values to `true` or `false` <!-- Describe what the purpose of this PR is, for example what bug you're fixing or new feature you're adding. --> ## 📸 Screenshots https://github.com/user-attachments/assets/4453ec47-5ede-4e4d-a873-42cd3153781d *New UI now looks like:* ![image](https://github.com/user-attachments/assets/d94236df-e6c9-48ae-9194-a47b5e1e6e5f) <!-- Required for any UI changes; delete if not applicable. Use fixed width images for better display. --> ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-12 01:00:47 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#61723