1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-18 10:23:52 +00:00
Files
browser/bitwarden_license
Claude 4521262f2b Remove newApplications from OrganizationReportSummary - use derived observable instead
The newApplications field was redundant in the summary type because it can be
calculated from applicationData (where reviewedDate === null). This commit:

1. **Removes newApplications from OrganizationReportSummary type**
   - No longer stored in encrypted summary
   - Reduces encryption overhead

2. **Removes all validation logic for newApplications**
   - Removed from type guards (isOrganizationReportSummary)
   - Removed from validation function (validateOrganizationReportSummary)
   - Removed from allowedKeys list

3. **Removes newApplications from summary calculation**
   - risk-insights-report.service.ts: Removed dummy data generation
   - all-activities.service.ts: Removed from initial state and setter
   - helpers/risk-insights-data-mappers.ts: Removed from createNewSummaryData()

4. **Creates newApplications$ observable in orchestrator**
   - Derives new applications from applicationData
   - Filters where reviewedDate === null
   - Uses distinctUntilChanged and shareReplay for efficiency

5. **Exposes newApplications$ through data service**
   - Added to RiskInsightsDataService
   - Wired up in constructor

6. **Updates component to use the observable**
   - all-activity.component.ts: Subscribe to dataService.newApplications$
   - Removes dependency on summary.newApplications

7. **Removes all newApplications tests**
   - Removed backward compatibility tests (no longer needed)
   - Removed validation tests for newApplications
   - Updated mock data to exclude newApplications
   - Removed from risk-insights-report.service.spec.ts

Benefits:
- Single source of truth (derived from applicationData)
- Eliminates redundant data storage
- Reduces encrypted payload size
- Cleaner architecture (computed vs stored data)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-30 13:08:02 +00:00
..

Bitwarden Licensed Code

All source code under this directory is licensed under the Bitwarden License Agreement.