feat: add e2ei expiration control in debug tools and shake routing by flavor [WPB-24275]#4773
Conversation
Codecov Report❌ Patch coverage is
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
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
| value = expirationInput, | ||
| onValueChange = { input -> |
There was a problem hiding this comment.
You could also use TextFieldState instead, so that we use more recent textfields v2 if possible
| 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 | ||
| } | ||
| } |
There was a problem hiding this comment.
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?
|



https://wearezeta.atlassian.net/browse/WPB-24275
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764The PR Description
What's new in this PR?
Issues
Solutions
6 min(360s).