Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incoming session verification #3733

Merged
merged 6 commits into from
Oct 29, 2024
Merged

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Oct 24, 2024

Here is a quick demo of the feature:

  • Element Web at top left, requesting the verification.
  • Bottom left, another instance of Element Web, with a verified session
  • On the right, EXA running the code from this PR
IncomingVerification.mp4

@bmarty bmarty added the PR-Feature For a new feature label Oct 24, 2024
@bmarty bmarty force-pushed the feature/bma/incomingVerification branch from ebd865f to 31f171f Compare October 24, 2024 13:36
@bmarty bmarty changed the base branch from develop to feature/valere/bump_rust_sdk_0.2.57 October 24, 2024 13:37
@BillCarsonFr BillCarsonFr force-pushed the feature/valere/bump_rust_sdk_0.2.57 branch from adf4442 to 4ef231c Compare October 24, 2024 14:17
Base automatically changed from feature/valere/bump_rust_sdk_0.2.57 to develop October 24, 2024 14:45
An error occurred while trying to automatically change base from feature/valere/bump_rust_sdk_0.2.57 to develop October 24, 2024 14:45
@bmarty bmarty force-pushed the feature/bma/incomingVerification branch from 31f171f to e554f84 Compare October 25, 2024 08:12
@bmarty bmarty added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Oct 25, 2024
@github-actions github-actions bot removed the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Oct 25, 2024
Copy link
Contributor

github-actions bot commented Oct 25, 2024

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/HzXNig

@bmarty bmarty added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Oct 25, 2024
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Oct 25, 2024
Copy link

codecov bot commented Oct 25, 2024

Codecov Report

Attention: Patch coverage is 90.00000% with 62 lines in your changes missing coverage. Please review.

Project coverage is 83.09%. Comparing base (e329370) to head (f03a432).
Report is 16 commits behind head on develop.

Files with missing lines Patch % Lines
.../impl/incoming/IncomingVerificationStateMachine.kt 74.28% 16 Missing and 2 partials ⚠️
...ion/impl/incoming/IncomingVerificationPresenter.kt 85.71% 5 Missing and 7 partials ⚠️
...rifysession/impl/outgoing/VerifySelfSessionView.kt 79.66% 0 Missing and 12 partials ⚠️
.../incoming/DefaultIncomingVerificationEntryPoint.kt 0.00% 8 Missing ⚠️
...erifysession/api/IncomingVerificationEntryPoint.kt 0.00% 2 Missing ⚠️
...atures/verifysession/impl/util/StateMachineUtil.kt 66.66% 2 Missing ⚠️
.../verification/SessionVerificationRequestDetails.kt 75.00% 2 Missing ⚠️
...est/verification/FakeSessionVerificationService.kt 90.90% 2 Missing ⚠️
...ession/impl/outgoing/VerifySelfSessionPresenter.kt 96.77% 0 Missing and 1 partial ⚠️
...es/verifysession/impl/ui/VerificationBottomMenu.kt 85.71% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3733      +/-   ##
===========================================
+ Coverage    83.05%   83.09%   +0.04%     
===========================================
  Files         1754     1770      +16     
  Lines        43994    44378     +384     
  Branches      5142     5202      +60     
===========================================
+ Hits         36539    36878     +339     
- Misses        5632     5669      +37     
- Partials      1823     1831       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Add more log to the state machines
Ensure the block cannot be cancelled, else if the Rust SDK emit a new state during the API execution, the state machine may cancel the api call.
Let VerificationFlowState values match the SDK api for code clarity.
Rename sub interface for clarity.
Migrate tests to the new FakeVerificationService.
@bmarty bmarty force-pushed the feature/bma/incomingVerification branch from 7b65832 to b8b3820 Compare October 29, 2024 08:45
@bmarty bmarty added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Oct 29, 2024
@github-actions github-actions bot removed the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Oct 29, 2024
@bmarty bmarty marked this pull request as ready for review October 29, 2024 10:51
@bmarty bmarty requested a review from a team as a code owner October 29, 2024 10:51
@bmarty bmarty requested review from ganfra and removed request for a team October 29, 2024 10:51
Copy link
Member

@ganfra ganfra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work, thanks! Just some minor naming remarks


package io.element.android.features.verifysession.impl.incoming

fun interface IncomingVerificationNavigator {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should find another name than Navigator, as onFinish is not really a navigation event?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes... But it will lead to a navigation. Do you have a suggestion for better name?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On iOS they're using the Coordinator name, but not sure it's better :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a very iOS-y name, but it kind of works here.

@bmarty bmarty merged commit 666cedd into develop Oct 29, 2024
21 checks passed
@bmarty bmarty deleted the feature/bma/incomingVerification branch October 29, 2024 17:03
Copy link

sonarcloud bot commented Oct 29, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Feature For a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants