Skip to content

[PM-19108] Add privileged app management screen #4862

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

Draft
wants to merge 5 commits into
base: innovation-sprint/privileged-apps/trust-dialog
Choose a base branch
from

Conversation

SaintPatrck
Copy link
Contributor

@SaintPatrck SaintPatrck commented Mar 13, 2025

๐ŸŽŸ๏ธ Tracking

PM-19108

๐Ÿ“” Objective

Allow users to manage trusted privileged applications and view
privileged applications that are trusted by external sources.

๐Ÿ“ธ Screenshots

Screen_recording_20250313_161906.mp4

โฐ 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

Copy link

codecov bot commented Mar 13, 2025

Codecov Report

All modified and coverable lines are covered by tests โœ…

Project coverage is 83.05%. Comparing base (9beb3ec) to head (3c1ef13).

Additional details and impacted files
@@                                Coverage Diff                                 @@
##           innovation-sprint/privileged-apps/trust-dialog    #4862      +/-   ##
==================================================================================
- Coverage                                           83.62%   83.05%   -0.57%     
==================================================================================
  Files                                                 623      628       +5     
  Lines                                               48491    48904     +413     
  Branches                                             6722     6758      +36     
==================================================================================
+ Hits                                                40551    40619      +68     
- Misses                                               5668     6011     +343     
- Partials                                             2272     2274       +2     

โ˜” 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.

Copy link
Contributor

github-actions bot commented Mar 13, 2025

Logo
Checkmarx One โ€“ Scan Summary & Details โ€“ 0353ddad-9ae9-49b5-8f77-a1f963a0fb28

Great job, no security vulnerabilities found in this Pull Request

@SaintPatrck SaintPatrck force-pushed the innovation-sprint/privileged-apps/settings-mgmt branch from e26c43a to 15ae542 Compare March 13, 2025 20:26
}

item {
Spacer(modifier = Modifier.height(88.dp))
Copy link
Collaborator

Choose a reason for hiding this comment

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

We usually reserve the 88.dp for screens that have a FAB and 16.dp for the rest of them

}

@Composable
private fun LazyItemScope.PrivilegedAppHeaderItem(
Copy link
Collaborator

Choose a reason for hiding this comment

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

A LazyItemScope should not be composable?

if (canDelete) {
BitwardenStandardIconButton(
vectorIconRes = R.drawable.ic_send_pending_delete,
contentDescription = "",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should have a contentDescription

cardStyle: CardStyle,
modifier: Modifier = Modifier,
) {
Row(
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should already have standard components for this sort of thing already


@Preview
@Composable
private fun PrivilegedAppsListScreenPreview() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we call this function PrivilegedAppsListScreen_preview

Spacer(modifier = Modifier.height(8.dp))
}
itemsIndexed(
key = { _, item -> "communityTrust_${item.packageName}_${item.signature}" },
Copy link
Collaborator

Choose a reason for hiding this comment

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

๐Ÿ‘

cardStyle = state.communityTrustedApps
.toListItemCardStyle(index = index),
modifier = Modifier
.padding(horizontal = 16.dp)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we use the standardHorizontalMargin() function here

modifier = Modifier
.padding(horizontal = 16.dp)
.fillMaxWidth()
.animateItem(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

๐Ÿ‘

data class Fido2TrustState(
val googleTrustedApps: ImmutableList<PrivilegedAppListItem>,
val communityTrustedApps: ImmutableList<PrivilegedAppListItem>,
val userTrustedApps: ImmutableList<PrivilegedAppListItem>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I love that we can put ImmutableLists directly into parcelable classes now ๐Ÿ‘จโ€๐Ÿณ

}

override suspend fun getCommunityTrustedPrivilegedAppsOrNull(): PrivilegedAppAllowListJson? {
return withContext(ioScope.coroutineContext) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need this specifically for the json .decodeFromStringOrNull part?

@SaintPatrck SaintPatrck force-pushed the innovation-sprint/privileged-apps/trust-dialog branch from 465c5ce to 9beb3ec Compare March 19, 2025 20:03
Allow users to manage trusted privileged applications and view
privileged applications that are trusted by external sources.
โ€ฆps list

- Added a new vector graphic file `ic_delete.xml` for the delete icon.
- Updated the delete button icon in the `PrivilegedAppsListScreen` from `ic_send_pending_delete` to `ic_delete`.
- Removed unused string resources: `trusted_by_google_x`, `trusted_by_you_x`, and `trusted_by_the_community_c`.
@SaintPatrck SaintPatrck force-pushed the innovation-sprint/privileged-apps/settings-mgmt branch from 208e972 to 3c1ef13 Compare March 19, 2025 20:10
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.

2 participants