Skip to content

change: set capability favorites to false, for unadjusted clients#2731

Open
AlexAndBear wants to merge 2 commits into
mainfrom
issues/2682
Open

change: set capability favorites to false, for unadjusted clients#2731
AlexAndBear wants to merge 2 commits into
mainfrom
issues/2682

Conversation

@AlexAndBear
Copy link
Copy Markdown
Member

Description

Related Issue

Motivation and Context

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation added

@AlexAndBear AlexAndBear requested a review from aduffeck May 11, 2026 08:25
@AlexAndBear AlexAndBear added the Type:Maintenance E.g. technical debt, packaging, etc. label May 11, 2026
@AlexAndBear AlexAndBear changed the title change: introduce new capability favorites_v2 change: set capability favorites to false, for unadjusted clients May 11, 2026
@sonarqubecloud
Copy link
Copy Markdown

@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 13 complexity · 5 duplication

Metric Results
Complexity 13
Duplication 5

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

Copy link
Copy Markdown

@codacy-production codacy-production Bot left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

The PR implements a global hardcoded change to the 'favorites' capability, setting it to false. While the title suggests this is for 'unadjusted clients', the implementation affects all clients, which constitutes a potential breaking change and a major logic contradiction.

Although Codacy marks the PR as 'Up to Standards', the modified file services/frontend/pkg/revaconfig/config.go is flagged as an uncovered complex file with a significant complexity increase (+13). The lack of unit tests and an empty PR description are major concerns that prevent a safe merge. This configuration change should be made configurable and verified with tests before proceeding.

About this PR

  • The PR description is almost entirely empty (Motivation and Context, testing details, and checklists are incomplete). Furthermore, no unit tests were added to ensure this configuration change propagates correctly.
1 comment outside of the diff
services/frontend/pkg/revaconfig/config.go

line 390-446 🟡 MEDIUM RISK
This 56-line block of configuration logic is identical to logic in services/sharing/pkg/revaconfig/config.go. Large duplications like this should be refactored into a shared utility to reduce maintenance burden and prevent configuration drift.

Test suggestions

  • Verify that the generated frontend configuration explicitly sets the favorites capability to false
  • Generate unit tests for the revaconfig package to cover the configuration mapping logic
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify that the generated frontend configuration explicitly sets the favorites capability to false
2. Generate unit tests for the `revaconfig` package to cover the configuration mapping logic

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

"archivers": archivers,
"app_providers": appProviders,
"favorites": true,
"favorites": false,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 MEDIUM RISK

The favorites capability is now hardcoded to false for all clients, contradicting the PR title's suggestion that this is targeted only at 'unadjusted' clients. If some clients still need this feature enabled, this global change will break it. Additionally, this file's complexity has increased (+13) without any test coverage, making this change fragile. Consider adding a Favorites boolean field to the Config struct to allow for better control and generate unit tests to cover the mapping logic.

See Complexity in Codacy
See Coverage in Codacy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type:Maintenance E.g. technical debt, packaging, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants