Skip to content

Conversation

@nick-livefront
Copy link
Collaborator

@nick-livefront nick-livefront commented Oct 21, 2025

🎟️ Tracking

PM-26513

📔 Objective

Adds premium badge to the archive filter for non-premium users.

  • When a user has archive items but has lost their premium membership - they will still be able to see archived items.
  • The right click menu only supports text, when a non-premium user clicks "Archive" the premium modal will show.

📸 Screenshots

Archive from Menu No archive Items Past Archive Items
archive-from-menu.mov
no-archive-items.mov
past-archive-items.mov

🦮 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

claude bot commented Oct 21, 2025

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


Code Review Complete

Overall Assessment: This PR successfully implements premium badge functionality for the archive filter. The implementation is solid with good test coverage. I found one minor issue that should be addressed and one inquiry for consideration.


Summary of Findings

Finding 1: Template reference variable #badge is unused and should be removed (⚠️ minor)

Finding 2: Observable subscriptions in template could cause multiple re-subscriptions (💭 inquiry)

See inline comments for details and recommendations.


Positive Observations

✓ Well-structured test coverage with all three scenarios tested
✓ Correct use of combineLatest to wait for both observables before making decisions
✓ Proper event handling with event parameter passed through to premium prompt
✓ Appropriate use of viewChild signal for accessing the badge component
✓ Good separation of concerns between filter visibility and premium upgrade prompts
✓ Tailwind classes correctly use the tw- prefix
✓ Follows Observable Data Services pattern (ADR-0003)
✓ Uses modern control flow syntax (@if)


PR Title & Description

✓ Clear title with Jira reference
✓ Comprehensive description with clear objective
✓ Excellent video demonstrations covering all scenarios
✓ Proper Jira tracking link


Test Coverage

Codecov reports 76.92% patch coverage. The new test file provides good coverage of the core logic in status-filter.component.ts with three well-structured test cases covering all code paths.


@github-actions
Copy link
Contributor

github-actions bot commented Oct 21, 2025

Logo
Checkmarx One – Scan Summary & Details96af042a-8a80-45fc-af9b-212404de6074

New Issues (1)

Checkmarx found the following issues in this Pull Request

Severity Issue Source File / Package Checkmarx Insight
MEDIUM CVE-2025-8129 Npm-koa-2.16.1
detailsRecommended version: 2.16.3
Description: A vulnerability, which was classified as problematic, was found in KoaJS Koa versions through 2.16.1 and versions 3.0.0-alpha0 through 3.0.0. Affec...
Attack Vector: NETWORK
Attack Complexity: LOW

ID: bhY9e1FN5vmOKkQtrmSzWVlr0r1EV%2FCg9E99ufSVVgg%3D
Vulnerable Package

@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

❌ Patch coverage is 77.77778% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 41.27%. Comparing base (6d1c474) to head (195ba3d).
⚠️ Report is 9 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
.../desktop/src/vault/app/vault/vault-v2.component.ts 0.00% 4 Missing ⚠️
...ault/app/vault/vault-filter/vault-filter.module.ts 0.00% 1 Missing ⚠️
.../vault-filter/components/vault-filter.component.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16964      +/-   ##
==========================================
+ Coverage   41.20%   41.27%   +0.07%     
==========================================
  Files        3543     3546       +3     
  Lines      101912   102061     +149     
  Branches    15282    15310      +28     
==========================================
+ Hits        41991    42125     +134     
- Misses      58155    58172      +17     
+ Partials     1766     1764       -2     

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sonarqubecloud
Copy link

@nick-livefront nick-livefront marked this pull request as ready for review November 19, 2025 20:32
@nick-livefront nick-livefront requested a review from a team as a code owner November 19, 2025 20:32
</button>
</span>
@if (!(canArchive$ | async)) {
<app-premium-badge #badge></app-premium-badge>
Copy link

Choose a reason for hiding this comment

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

⚠️ The template reference variable #badge is unused. Consider removing it:

Suggested change
<app-premium-badge #badge></app-premium-badge>
<app-premium-badge></app-premium-badge>

private readonly premiumBadgeComponent = viewChild(PremiumBadgeComponent);

private userId$ = this.accountService.activeAccount$.pipe(getUserId);
protected canArchive$ = this.userId$.pipe(
Copy link

Choose a reason for hiding this comment

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

💭 The canArchive$ observable is used with the async pipe in the template. While this follows the existing codebase pattern (ADR-0003), be aware that without OnPush change detection, this could create multiple subscriptions on re-renders.

This is acceptable for now given the FIXME comment about migrating to OnPush change detection, but worth keeping in mind for the future migration.

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