Skip to content

Sync user data from Radiance in Flutter#8447

Open
atavism wants to merge 17 commits intomainfrom
atavism/issue-2944
Open

Sync user data from Radiance in Flutter#8447
atavism wants to merge 17 commits intomainfrom
atavism/issue-2944

Conversation

@atavism
Copy link
Contributor

@atavism atavism commented Feb 5, 2026

Resolves https://github.com/getlantern/engineering/issues/2944

This PR replaces Flutter local DB/local storage reads for user, plans, split-tunneling, private servers, and selected server location with Riverpod providers backed by lantern-core/Radiance APIs (with Go-side on-disk caching)

@jigar-f
Copy link
Contributor

jigar-f commented Feb 5, 2026

@atavism I think this pretty big change, did we remove obejctbox completly? I thought we were just removing private server stuff.

  • With this change, now every time we need adda new local state, we need to add an ffi method and a platform channel against it, before we just did with object box, only one method.
  • With this, now it goes to flutter->ffi/platfomchannel-> go aginest flutter->done

Correct if I'm wrong, I have not looked in detail.

@atavism
Copy link
Contributor Author

atavism commented Feb 5, 2026

@jigar-f Yes, I went ahead and fully removed ObjectBox in this PR. If Radiance is our source of truth for persistent state (user, selected server, split tunneling, etc.), I think we’re better off not keeping a separate Flutter DB. I get the concern about extra FFI/platform-channel calls, but we can keep the surface area small with a few get/set endpoints (and core caching) instead of duplicating state...Does that sound reasonable?

@atavism
Copy link
Contributor Author

atavism commented Feb 5, 2026

For instance, we could expose getAppState / updateAppState instead of one API per field

@jigar-f
Copy link
Contributor

jigar-f commented Feb 6, 2026

Agreed, Radiance should definitely be the source for VPN-related functionality. That said, I don’t think Radiance needs to care whether a user has a plan or not, or whether the user is shown an intro, etc. That logic can probably live elsewhere — though I don’t have a strong opinion against it.

I think we should take the time to test everything thoroughly and make sure all flows are working as expected before merging.
Did you get a chance to test all flows, especially auth and purchase?

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.

3 participants