Skip to content

feat: gate network selection behind advanced features - #145

Merged
jvsena42 merged 1 commit into
mainfrom
feat/gate-network-selection-advanced
Jul 23, 2026
Merged

feat: gate network selection behind advanced features#145
jvsena42 merged 1 commit into
mainfrom
feat/gate-network-selection-advanced

Conversation

@jvsena42

Copy link
Copy Markdown
Owner

What

Hides the Network section in Settings behind the existing Advanced features switch, and makes that switch default to on in debug builds / off in release builds.

Why

Switching networks restarts the node onto a chain most users never want, so it belongs with the other advanced-only sections (peer country flags, developer tools). Defaulting the flag on outside release builds means development and journey-test builds surface the gated sections without a manual opt-in on every fresh install.

Changes

  • New domain/settings/AdvancedFeaturesSetting.kt: ADVANCED_FEATURES_ENABLED_BY_DEFAULT = BuildConfig.DEBUG plus a shared PreferencesDataSource.isAdvancedFeaturesEnabled() — same shape as the existing PeerFlagsSetting, so no screen can disagree about the default.
  • SettingsViewModel / NodeViewModel read the preference through that helper; SettingsUiState / NodeUiState use the same constant as their initial value.
  • ScreenSettings.kt: the Network SectionCard is wrapped in if (uiState.enableAdvancedFeatures).
  • strings.xml: the advanced-features subtitle is now generic ("Show extra settings and tools for advanced users") instead of naming only the log viewer.
  • journeys/README.md: documents that toggle_advanced_features now gates Network too, and the debug-on/release-off default.
  • journeys/switch_network.xml: turns the advanced-features switch on before expanding Network (the preference persists, so a previous run may have left it off).

Verification

./gradlew assembleDebug detekt lintDebug — all green.

🤖 Generated with Claude Code

The network selector restarts the node onto a chain most users never
want, so it now sits behind the advanced-features switch alongside peer
country flags and developer tools.

Advanced features default to on in debug builds and off in release, so
development builds surface the gated sections without a manual opt-in on
every fresh install. The default and the preference read now live in a
single shared helper, mirroring PeerFlagsSetting.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jvsena42
jvsena42 merged commit 86e8feb into main Jul 23, 2026
2 checks passed
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