Skip to content

Conversation

@david-livefront
Copy link
Collaborator

@david-livefront david-livefront commented Nov 3, 2025

🎟️ Tracking

PM-27755

📔 Objective

This PR adds a common LocalQrCodeAnalyzer to be used across both apps.

⏰ 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

@claude
Copy link
Contributor

claude bot commented Nov 3, 2025

Claude finished @david-livefront's task —— View job


Code Review Complete

I've reviewed this PR that creates a common LocalQrCodeAnalyzer for both the main app and authenticator. Overall, this is a clean refactoring that properly consolidates shared composition locals. The changes follow the project's architecture patterns and code style guidelines.

Summary

Type: Refactoring
Complexity: Low
Architectural Impact: Minimal - moves composition local to shared :ui module

Key Changes

  • Renamed LocalIntentManagerProvider.ktLocalProviders.kt in :ui module
  • Added LocalQrCodeAnalyzer composition local to the shared file
  • Updated both :app and :authenticator LocalManagerProvider functions to provide LocalQrCodeAnalyzer
  • Updated QrCodeScanScreen in both apps to use composition local instead of direct instantiation
  • Updated test infrastructure to properly provide mocked QrCodeAnalyzer

Findings

✅ Strengths

  1. Proper module organization: Moving LocalQrCodeAnalyzer to the :ui module is architecturally correct since it's a shared UI concern
  2. Consistent patterns: Follows the existing pattern established by LocalIntentManager
  3. Test coverage maintained: All test files properly updated to provide the analyzer via composition locals
  4. Default value handling: Both LocalManagerProvider functions provide sensible defaults (QrCodeAnalyzerImpl())
  5. File naming: Renaming to LocalProviders.kt better reflects the file's purpose now that it contains multiple providers

📝 Observations

  1. File rename: The rename from LocalIntentManagerProvider.kt to LocalProviders.kt is appropriate and follows good naming conventions as the file now contains multiple composition locals

  2. Import changes: Both apps now correctly import LocalQrCodeAnalyzer from the shared :ui module instead of directly importing QrCodeAnalyzerImpl

  3. Test pattern consistency: The changes properly follow the established test pattern where composition locals are provided at the setContent level rather than passed directly to screens

  4. CI Status: Lint workflow has passed ✓. Test and scan workflows are still in progress.


Architecture Compliance

Module boundaries respected: :ui module is the correct location for shared UI composition locals
Dependency injection pattern: Follows Hilt DI patterns with composition locals for UI layer
Testing approach: MockK usage and test infrastructure updates are consistent with project standards
MVVM pattern: No impact on ViewModels or state management


Code Quality

Style guidelines: Code follows Kotlin and Android code style conventions
Documentation: Existing KDoc comments preserved and appropriate
Naming conventions: Clear, descriptive names throughout
No code duplication: Successfully consolidates duplicated composition local definitions


Recommendations

No issues found. This PR is ready to merge pending CI completion.


@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

Logo
Checkmarx One – Scan Summary & Details4d080951-edb5-4cb6-a93f-2242e7798168

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

@david-livefront
Copy link
Collaborator Author

Thanks @SaintPatrck

@david-livefront david-livefront added this pull request to the merge queue Nov 3, 2025
@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 84.90%. Comparing base (a631d68) to head (6e28119).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...itwarden/ui/platform/composition/LocalProviders.kt 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6115   +/-   ##
=======================================
  Coverage   84.90%   84.90%           
=======================================
  Files         724      724           
  Lines       52768    52770    +2     
  Branches     7665     7665           
=======================================
+ Hits        44802    44805    +3     
+ Misses       5277     5276    -1     
  Partials     2689     2689           

☔ 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.

Merged via the queue into main with commit 1f24ca7 Nov 3, 2025
13 checks passed
@david-livefront david-livefront deleted the PM-27755-common-local-qr-code-analyzer branch November 3, 2025 20:43
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.

3 participants