Skip to content

Early Review: Settings re-arch#1861

Open
kumulynja wants to merge 2 commits into
developfrom
rearch-settings
Open

Early Review: Settings re-arch#1861
kumulynja wants to merge 2 commits into
developfrom
rearch-settings

Conversation

@kumulynja
Copy link
Copy Markdown
Contributor

@kumulynja kumulynja commented Feb 3, 2026

Note
Opening this PR for early feedback before finalising.

This PR does a re-arch of the current settings feature that has code split between core and features and that doesn't have a clear API for other features to use and so different features import different layers of the current settings code which leads to dependency problems.

The current settings feature also doesn't have a clear distinction between general, app-wide settings (AppSettings) and settings for specific features or capabilities like Tor or Error Reporting. This leads to the Settings feature needing to know how to initialise Tor or how to get the Tor proxy port or how to initialise Sentry for example. Those things and their settings should move to their own features/capabilities. Since this PR focuses on the general App Settings, we will keep Tor and Error reporting settings in the current settings feature still, while migrating all general app settings to a newly defined domain that keeps things simple and limited to managing basic app settings which are simple to set and retrieve.

  • Domain definitions
  • Application ports and usecases
  • Frameworks layer with drift table, mappers and migration
  • Public API (Facade) for other features to use
  • Errors per layer to avoid leaking lower layer errors.
  • Repository adapter implementation
  • Applying the migration to the table
  • Removing/updating current settings code that is taken care of by the new App Settings now.
  • Integrate facade in depending features port adapters
  • Wire everything up in service locator
  • Unit/integration tests

How to test:

  • Make sure the app settings menu still works
  • Make sure changing every setting in app settings has the desired effect on the rest of the app. E.g.:
    • changing fiat currency should update the equivalent amount on home and in the pricer
    • changing the language effectively changes the language
    • changing to test mode effectively switches to your test wallets and also exchange test account
    • ...

Warning
Not ready to merge.

@kumulynja kumulynja changed the title WIP: Settings re-arch Early Review: Settings re-arch Feb 4, 2026
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