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

Show Encryption Authenticity warnings on messages in the timeline. #3051

Merged
merged 3 commits into from
Aug 5, 2024

Conversation

BillCarsonFr
Copy link
Member

@BillCarsonFr BillCarsonFr commented Jul 17, 2024

This PR adds warnings to the timeline items in encrypted rooms when the authenticity can't be validated. It is behind a feature flag and doesn't surface the error message, only an icon. The icons are subject to change.

Not guaranteed Media Unencrypted
Simulator Screenshot - iPhone 15 Pro - 2024-08-05 at 10 08 01 Simulator Screenshot - iPhone 15 Pro - 2024-08-05 at 10 08 08 Simulator Screenshot - iPhone 15 Pro - 2024-08-05 at 10 07 49
Original Adds message shields (lax mode) Depends on SDK change https://github.com/matrix-org/matrix-rust-sdk/pull/3679

Design: https://www.figma.com/design/2aqj9A5WRvGY3tcdTrBek4/Unencrypted-message-warning-in-Timeline?node-id=910-77038&t=pF5GGduo3EsrFG2Q-0

image image

Note for reviewer / Open questions

  • I am not familiar wth swift UI so looking for feedback on how to do that design correctly
  • I need to add a new Icon to the Compound Icons (plain shield OFF mode - strike through)
  • How to handle a11y?
  • The preview looks sometimes different than what I see on device, not sure how to cover all cases

@BillCarsonFr BillCarsonFr requested a review from pixlwave July 17, 2024 08:40
Copy link

github-actions bot commented Jul 17, 2024

Warnings
⚠️ Some of the commits are missing ticket numbers. Please consider squashing all commits that don't have a tracking number.
⚠️ Please add a sign-off to either the PR description or to the commits themselves.
⚠️ You seem to have made changes to views. Please consider adding screenshots.

Generated by 🚫 Danger Swift against 93c1330

Copy link
Member

@pixlwave pixlwave left a comment

Choose a reason for hiding this comment

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

A few thoughts about the data below. Will take a look at the views separately.

@BillCarsonFr BillCarsonFr force-pushed the valere/e2ee_message_shields branch from affbad7 to fde64d4 Compare July 17, 2024 15:56
Copy link

@BillCarsonFr BillCarsonFr added the pr-feature for a new feature label Jul 18, 2024
@BillCarsonFr BillCarsonFr marked this pull request as ready for review July 18, 2024 15:23
@BillCarsonFr BillCarsonFr requested a review from a team as a code owner July 18, 2024 15:23
@BillCarsonFr BillCarsonFr requested review from Velin92 and removed request for a team July 18, 2024 15:23
@pixlwave pixlwave force-pushed the valere/e2ee_message_shields branch 2 times, most recently from 314a763 to aefe0bb Compare July 31, 2024 10:23
@pixlwave pixlwave force-pushed the valere/e2ee_message_shields branch from aefe0bb to b8306fd Compare August 1, 2024 16:36
@pixlwave pixlwave changed the title Add message shields while transitioning to Invisible Crypto Show Encryption Authenticity warnings on messages in the timeline. Aug 5, 2024
@pixlwave pixlwave added pr-wip for anything that isn't ready to ship and will be enabled at a later date and removed pr-feature for a new feature labels Aug 5, 2024
@pixlwave pixlwave force-pushed the valere/e2ee_message_shields branch from b8306fd to 60918a1 Compare August 5, 2024 09:29
@pixlwave pixlwave force-pushed the valere/e2ee_message_shields branch from 60918a1 to 9d67e4f Compare August 5, 2024 10:01
Copy link

codecov bot commented Aug 5, 2024

Codecov Report

Attention: Patch coverage is 69.23077% with 60 lines in your changes missing coverage. Please review.

Project coverage is 77.78%. Comparing base (cdaa88e) to head (9d67e4f).

Files Patch % Lines
...e/TimelineItemContent/EncryptionAuthenticity.swift 31.57% 26 Missing ⚠️
...meline/TimelineItems/RoomTimelineItemFactory.swift 3.70% 26 Missing ⚠️
...perOptionsScreen/View/DeveloperOptionsScreen.swift 0.00% 7 Missing ⚠️
...Sources/FlowCoordinators/RoomFlowCoordinator.swift 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3051      +/-   ##
===========================================
- Coverage    77.80%   77.78%   -0.02%     
===========================================
  Files          713      714       +1     
  Lines        54994    55162     +168     
===========================================
+ Hits         42786    42906     +120     
- Misses       12208    12256      +48     
Flag Coverage Δ
unittests 68.32% <69.23%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Member

@stefanceriu stefanceriu left a comment

Choose a reason for hiding this comment

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

Very nice, lgtm! 👍

@pixlwave pixlwave force-pushed the valere/e2ee_message_shields branch from 9d67e4f to 93c1330 Compare August 5, 2024 10:54
Copy link

sonarqubecloud bot commented Aug 5, 2024

@pixlwave pixlwave enabled auto-merge (squash) August 5, 2024 11:03
@pixlwave pixlwave merged commit a11faeb into develop Aug 5, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-wip for anything that isn't ready to ship and will be enabled at a later date
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants