Rearchitecture app crate#120
Draft
afilini wants to merge 1 commit intoPortalTechnologiesInc:masterfrom
Draft
Conversation
d72b099 to
2c81a96
Compare
2c81a96 to
8143144
Compare
Member
Author
|
Also note that this is a big API change, I will follow this up with another PR in the app repo to update the code accordingly. |
afilini
added a commit
to PortalTechnologiesInc/portal-app
that referenced
this pull request
Nov 26, 2025
This new API will be available after PortalTechnologiesInc/lib#120 is merged
76cebb7 to
8143144
Compare
0526c98 to
cb88384
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Instead of getting a callback from the app to call with each incoming request, we split each function in a "pull" and "push" methods: one is used to get the next request, and can be called as many times as needed even in parallel. The other method is used to send a reply once it's available.
This effectively allows replying to requests that were received in a previous run of the app, as long as we persist the request id somewhere in the app. We can for example receive a request before the user closes the app, and then the next time it's opened we re-present the pending request (as long as it's not expired yet) and through the "push" method we can later reply.
This should also fix a few weird issues we encountered with react stuff not being updated inside the listeners. I believe this was caused by the interaction between rust, the bindings and react native. This should all be fixed now.