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

App: UISI AutoReporting #5743

Merged
merged 10 commits into from
Mar 24, 2022
Merged

App: UISI AutoReporting #5743

merged 10 commits into from
Mar 24, 2022

Conversation

langleyd
Copy link
Member

@langleyd langleyd commented Mar 3, 2022

Accompanies SDK PR matrix-org/matrix-ios-sdk#1386
Resolves #5017

What's in this PR

  • Similar to the web implementation this checks all decryption attempts(excluding during initial sync) and if it fails it then allows a grace period before triggering a report if it has not succeeded since the initial attempt. I used the grace period set on android of 30 seconds, possibly more suitable for mobile vs the 5 seconds on web.
  • Similar to the android implementation it creates a UISI detector that detects the reports and a separate auto-reporter that reports them, avoiding duplicates(based on sessionId) and spacing out requests(I used the web value of 60 seconds)

TODO

@langleyd langleyd self-assigned this Mar 3, 2022
@langleyd langleyd changed the title Add UISIDetector App: UISI AutoReporting Mar 3, 2022
@github-actions
Copy link

github-actions bot commented Mar 3, 2022

📱 Scan the QR code below to install the build for this PR.
🔒 This build is for internal testing purpose. Only devices listed in the ad-hoc provisioning profile can install Element Alpha.

QR code

If you can't scan the QR code you can install the build via this link: https://i.diawi.com/9psZWV

@langleyd langleyd marked this pull request as ready for review March 16, 2022 21:46
@langleyd langleyd requested a review from duxovni March 17, 2022 09:19
import MatrixSDK
import GBDeviceInfo

extension MXBugReportRestClient {
Copy link
Member Author

Choose a reason for hiding this comment

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

@pixlwave I extracted the common common code for sending reports from the app in case it's useful for your needs.

Copy link
Contributor

@gileluard gileluard left a comment

Choose a reason for hiding this comment

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

Nice work!

Podfile Outdated Show resolved Hide resolved
Podfile.lock Outdated Show resolved Hide resolved
Riot/Categories/MXBugReportRestClient+Riot.swift Outdated Show resolved Hide resolved
Riot/Managers/Settings/RiotSettings.swift Outdated Show resolved Hide resolved
RiotSwiftUI/Modules/Common/Mock/MockAppScreens.swift Outdated Show resolved Hide resolved
Copy link

@duxovni duxovni left a comment

Choose a reason for hiding this comment

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

Otherwise looks good to me in terms of interoperability with web and android. I'm not clear on how most of these UI changes relate to this PR, is that separate work that accidentally got added to this branch?

).jsonString ?? ""

self.bugReporter.vc_sendBugReport(
description: "Auto-reporting decryption error",
Copy link

Choose a reason for hiding this comment

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

One thing that'd be good to add here: if the description field contains the recipient_rageshake URL on a second line, it'll show up linkified in the github issue body so it's a lot easier to cross-reference sender and recipient rageshakes. See https://github.com/matrix-org/matrix-react-sdk/blob/develop/src/stores/AutoRageshakeStore.ts#L149

@langleyd
Copy link
Member Author

Thanks for both of the reviews, really helpful! updated based on comments.

Copy link
Contributor

@gileluard gileluard left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@langleyd langleyd merged commit 0f89eb0 into develop Mar 24, 2022
@langleyd langleyd deleted the langleyd/5017_uisi_autoreporter branch March 24, 2022 14:58
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.

[EI] Implement opt-in lab auto rageshake UISIs
3 participants