Skip to content

Rearchitecture app crate#120

Draft
afilini wants to merge 1 commit intoPortalTechnologiesInc:masterfrom
afilini:feat/rearchitecture-lib
Draft

Rearchitecture app crate#120
afilini wants to merge 1 commit intoPortalTechnologiesInc:masterfrom
afilini:feat/rearchitecture-lib

Conversation

@afilini
Copy link
Member

@afilini afilini commented Nov 17, 2025

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.

@afilini afilini force-pushed the feat/rearchitecture-lib branch from d72b099 to 2c81a96 Compare November 17, 2025 15:38
@afilini afilini force-pushed the feat/rearchitecture-lib branch from 2c81a96 to 8143144 Compare November 24, 2025 16:57
@afilini
Copy link
Member Author

afilini commented Nov 25, 2025

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
@denmeh denmeh added the app app crate label Dec 10, 2025
@afilini afilini force-pushed the feat/rearchitecture-lib branch 2 times, most recently from 76cebb7 to 8143144 Compare January 7, 2026 09:57
@denmeh denmeh force-pushed the master branch 4 times, most recently from 0526c98 to cb88384 Compare February 12, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app app crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants