Skip to content

feat: add e2ei expiration control in debug tools and shake routing by flavor [WPB-24275]#4773

Merged
Garzas merged 11 commits into
developfrom
feat/e2ei-debug-expiration-tools
May 4, 2026
Merged

feat: add e2ei expiration control in debug tools and shake routing by flavor [WPB-24275]#4773
Garzas merged 11 commits into
developfrom
feat/e2ei-debug-expiration-tools

Conversation

@Garzas
Copy link
Copy Markdown
Contributor

@Garzas Garzas commented Apr 29, 2026

https://wearezeta.atlassian.net/browse/WPB-24275


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

  • No usable debug UI for short E2EI certificate TTL testing.
  • Shake shortcut behavior was not flavor-aware.

Solutions

  • Added E2EI TTL controls in Developer Tools (minutes + enroll), wired to debug API.
  • Enforced UI minimum of 6 min (360s).
  • Improved section UI consistency and added TTL scope hint for enroll/update.
  • Updated shake routing:
    • private + debug-screen-enabled builds -> Debug Settings,
    • other builds -> Log Management.

@Garzas Garzas self-assigned this Apr 29, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

❌ Patch coverage is 73.33333% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.05%. Comparing base (27fd364) to head (b1d183c).
⚠️ Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
...wire/android/ui/debug/DebugDataOptionsViewModel.kt 72.72% 10 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4773      +/-   ##
===========================================
+ Coverage    51.00%   51.05%   +0.04%     
===========================================
  Files          605      605              
  Lines        20996    21041      +45     
  Branches      3388     3393       +5     
===========================================
+ Hits         10709    10742      +33     
- Misses        9281     9291      +10     
- Partials      1006     1008       +2     
Files with missing lines Coverage Δ
...rc/main/kotlin/com/wire/android/ui/WireActivity.kt 0.00% <ø> (ø)
...com/wire/android/ui/debug/DebugDataOptionsState.kt 100.00% <100.00%> (ø)
...wire/android/ui/debug/DebugDataOptionsViewModel.kt 54.78% <72.72%> (+5.48%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 27fd364...b1d183c. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread app/src/main/kotlin/com/wire/android/ui/debug/DebugDataOptions.kt Outdated
Comment thread app/src/main/kotlin/com/wire/android/ui/debug/DebugDataOptions.kt Outdated
Comment thread app/src/main/kotlin/com/wire/android/ui/debug/DebugDataOptionsViewModel.kt Outdated
Comment thread app/src/main/kotlin/com/wire/android/ui/debug/DebugDataOptions.kt Outdated
@Garzas Garzas requested a review from saleniuk April 30, 2026 10:24
Comment thread app/src/main/kotlin/com/wire/android/ui/debug/DebugDataOptions.kt Outdated
Comment thread app/src/main/kotlin/com/wire/android/ui/debug/DebugDataOptions.kt Outdated
Comment on lines +298 to +299
value = expirationInput,
onValueChange = { input ->
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You could also use TextFieldState instead, so that we use more recent textfields v2 if possible

Comment on lines +266 to +276
val minExpirationMinutes = MIN_DEBUG_E2EI_CERTIFICATE_EXPIRATION_SECONDS / 60
val expirationMinutes = expirationSeconds / 60
var expirationInput by remember { mutableStateOf(expirationMinutes.toString()) }
val isInputBelowMinimum = expirationInput.toLongOrNull()?.let { it < minExpirationMinutes } == true

LaunchedEffect(expirationSeconds) {
val minutesFromState = (expirationSeconds / 60).toString()
if (expirationInput != minutesFromState) {
expirationInput = minutesFromState
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This feels a little bit too complex, it could definitely be simpler 😄
If you pass expirationSeconds state already then why do we need another expirationInput state here instead of just using the one that's passed?
Also, it's being reduced so that the input shows only full minutes, so when expirationSeconds is 90 seconds, then input will show 1 minute, which is not correct, right?

Comment thread app/src/main/kotlin/com/wire/android/ui/debug/DebugDataOptions.kt Outdated
Comment thread app/src/main/kotlin/com/wire/android/ui/debug/DebugDataOptions.kt Outdated
@Garzas Garzas requested a review from saleniuk May 4, 2026 07:50
@Garzas Garzas enabled auto-merge May 4, 2026 08:17
@Garzas Garzas added this pull request to the merge queue May 4, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch May 4, 2026
@Garzas Garzas enabled auto-merge May 4, 2026 09:59
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 4, 2026

@Garzas Garzas added this pull request to the merge queue May 4, 2026
Merged via the queue into develop with commit 7754677 May 4, 2026
15 checks passed
@Garzas Garzas deleted the feat/e2ei-debug-expiration-tools branch May 4, 2026 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants