Skip to content

Conversation

@david-livefront
Copy link
Collaborator

@david-livefront david-livefront commented Oct 23, 2025

🎟️ Tracking

N/A

📔 Objective

This PR updates the AccountSecurityScreen in anticipation of more changes for the updates Vault Timeout Policy.

All of these changes are non-function but there are some visual UI changes:

  • The Session Timeout Action row is fully disabled when to avoid confusion when changing the action is not allowed.
  • When the Session Timeout has supporting text, it is broken out into it's own card.
  • The Policy Info card has been replaced with supporting text.

📸 Screenshots

Before After

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

SessionTimeoutActionRow(
isEnabled = state.hasUnlockMechanism,
vaultTimeoutPolicyAction = state.vaultTimeoutPolicyAction,
isEnabled = state.isSessionTimeoutActionEnabled,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a functional change. We now disable the action row when there is an action set by the admin that cannot be overridden by the user.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 23, 2025

Logo
Checkmarx One – Scan Summary & Details0c90845a-4ff8-4324-8ef9-2de957c996df

Great job! No new security vulnerabilities introduced in this pull request

@codecov
Copy link

codecov bot commented Oct 23, 2025

Codecov Report

❌ Patch coverage is 61.76471% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.77%. Comparing base (7d7951d) to head (84082b6).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ttings/accountsecurity/AccountSecurityViewModel.kt 43.58% 15 Missing and 7 partials ⚠️
.../settings/accountsecurity/AccountSecurityScreen.kt 86.20% 0 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6076      +/-   ##
==========================================
- Coverage   84.79%   84.77%   -0.03%     
==========================================
  Files         721      721              
  Lines       52800    52820      +20     
  Branches     7660     7668       +8     
==========================================
+ Hits        44773    44779       +6     
- Misses       5342     5355      +13     
- Partials     2685     2686       +1     

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

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

@david-livefront david-livefront force-pushed the account-security-clean-up branch 2 times, most recently from e98a53c to b0abea4 Compare October 24, 2025 15:06
@david-livefront david-livefront force-pushed the account-security-clean-up branch from b0abea4 to 84082b6 Compare October 24, 2025 15:13
}

@Composable
private fun rememberSessionTimeoutOptions(
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@david-livefront
Copy link
Collaborator Author

Thanks @SaintPatrck

@david-livefront david-livefront added this pull request to the merge queue Oct 24, 2025
Merged via the queue into main with commit 51c23ec Oct 24, 2025
9 checks passed
@david-livefront david-livefront deleted the account-security-clean-up branch October 24, 2025 16:30
Comment on lines +500 to +502
<string name="vault_timeout_policy_in_effect_both_plural">Your organization has set the maximum session timeout to %1$d hours and %2$d minutes.</string>
<string name="vault_timeout_policy_in_effect_hours_plural">Your organization has set the maximum session timeout to %1$d hours and %2$d minute.</string>
<string name="vault_timeout_policy_in_effect_minutes_plural">Your organization has set the maximum session timeout to %1$d hour and %2$d minutes.</string>
Copy link
Contributor

Choose a reason for hiding this comment

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

🚨 @david-livefront @SaintPatrck Why you don't use plural function here? This is incorrect for my langauages.

Many languages have more than 1 version of plural
Example in Polish 2 hours, 5 hours is 2 godziny, 5 godzin

Copy link
Collaborator Author

@david-livefront david-livefront Oct 24, 2025

Choose a reason for hiding this comment

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

You cannot have multiple plurals in a singular plural string... Using a plural here would mean that both minutes and hours would need to be plural together or not plural together.

Copy link
Contributor

Choose a reason for hiding this comment

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

I understand it, but our requirements should be more important. Can we prepare something like
<string comment="Your organization has set the maximum session timeout to X hours and Y minutes." name="vault_timeout_policy_in_effect_both_plural">Your organization has set the maximum session timeout to %1$d and %2$d.</string>

and 2 plural strings

<plurals comment="Your organization has set the maximum session timeout to X hours and Y minutes." name="vault_timeout_hours_plural">
        <item quantity="one">%d hour</item>
        <item quantity="other">%d hours</item>
    </plurals>
    <plurals comment="Your organization has set the maximum session timeout to X hours and Y minutes." name="vault_timeout_minutes_plural">
        <item quantity="one">%d minute</item>
        <item quantity="other">%d minutes</item>
    </plurals>

and required changes in Kotlin?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We did consider that approach as well but injecting translated plural strings into other translated strings will also cause incorrect translations in since the rest of the string will be unaware of context.

Copy link
Contributor

Choose a reason for hiding this comment

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

I also think about it. That's why I insert comment inside string and plural tag.
This comment will be visible for translators in Crowdin to these strings! :)

See also comment info https://store.crowdin.com/android-xml

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.

4 participants