Skip to content

Allow rescorings to same category again#467

Merged
zkdev merged 2 commits into
open-component-model:masterfrom
zkdev:master
Jun 17, 2026
Merged

Allow rescorings to same category again#467
zkdev merged 2 commits into
open-component-model:masterfrom
zkdev:master

Conversation

@zkdev

@zkdev zkdev commented Jun 16, 2026

Copy link
Copy Markdown
Member

What this PR does / why we need it:
Useful to allow commenting on rescorings, without actually applying a re-rating.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Release note:

Rescorings can now be rescored to the very same category, allowing "comment-only" rescorings.

Useful to allow commenting on findings without re-rating.

Signed-off-by: Philipp Heil (zkdev) <philipp.heil@sap.com>
@zkdev zkdev requested a review from a team as a code owner June 16, 2026 14:29
@zkdev zkdev self-assigned this Jun 16, 2026
@zkdev zkdev added kind/task small task, normally part of feature or epic area/ipcei Important Project of Common European Interest labels Jun 16, 2026
@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@zkdev, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 59 minutes and 8 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d5b674a9-f938-41cf-b837-9e30759cffb9

📥 Commits

Reviewing files that changed from the base of the PR and between 63a974a and 258cf64.

📒 Files selected for processing (1)
  • src/rescoring.js
📝 Walkthrough

Walkthrough

rescoringNeedsComment in src/rescoring.js gains an isSelected parameter (default true), replacing the prior severity/due-date divergence check with a selection-state check under the CUSTOM_RESCORING rule. All three callsites are updated accordingly, and the allowedRescorings filter condition is replaced.

Changes

Custom rescoring comment requirement refactor

Layer / File(s) Summary
rescoringNeedsComment signature and allowedRescorings filter
src/rescoring.js
rescoringNeedsComment accepts a new isSelected flag (default true) and evaluates comment requirement based on selection state under CUSTOM_RESCORING; allowedRescorings filter replaces the prior rescoring.severity / rescoring.due_date inequality block with a new condition.
UI callsites: TextField error and Apply Rescoring gating
src/rescoring.js
The Comment TextField error prop computes isSelected from selectedRescorings and passes it to rescoringNeedsComment; the customRescoringsWithoutComment gating call passes true explicitly.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 A flag called isSelected hops into place,
No more checking severity's face!
The comment is needed when chosen, you see,
The gating now flows with selection-state glee.
🥕 Small diff, big meaning — the rabbit approves!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main feature: allowing rescorings to the same category, which is the primary change enabling comment-only rescorings.
Description check ✅ Passed The description covers the main purpose and includes a properly formatted release note, though the issue reference is incomplete and special notes section is empty.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@zkdev zkdev linked an issue Jun 16, 2026 that may be closed by this pull request

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/rescoring.js (1)

3659-3661: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update stale filtering text to match selection-based submission.

allowedRescorings now filters by explicit selection, but the inline comment and footer tooltip still describe the old “categorisation did not change” rule. That is misleading now that same-category/comment-only rescorings are valid.

Suggested copy update
-  // only rescorings are allowed iff their severity has changed OR they allow a custom due date
-  // input and the due date has changed
+  // only selected rescorings that are still visible after filtering are submitted
   return (
     selectedRescorings.find((r) => rescoringIdentity(r) === rescoringIdentity(rescoring))
   )
-                `${filteredOutRescoringsLength} ${pluralise('rescoring', filteredOutRescoringsLength, 'is', 'are')}
-                filtered out or the categorisation did not change`
+                `${filteredOutRescoringsLength} ${pluralise('rescoring', filteredOutRescoringsLength, 'is', 'are')}
+                currently filtered out`

Also applies to: 3857-3861

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/rescoring.js` around lines 3659 - 3661, The inline comment at
src/rescoring.js lines 3659-3661 and the footer tooltip at src/rescoring.js
lines 3857-3861 both describe an outdated filtering rule about categorization
changes. Since allowedRescorings now filters by explicit user selection rather
than automatically excluding unchanged-category rescorings, update both the
inline comment and footer tooltip text to accurately reflect that the filtering
is selection-based and that same-category or comment-only rescorings are valid
when explicitly selected by the user.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/rescoring.js`:
- Around line 3659-3661: The inline comment at src/rescoring.js lines 3659-3661
and the footer tooltip at src/rescoring.js lines 3857-3861 both describe an
outdated filtering rule about categorization changes. Since allowedRescorings
now filters by explicit user selection rather than automatically excluding
unchanged-category rescorings, update both the inline comment and footer tooltip
text to accurately reflect that the filtering is selection-based and that
same-category or comment-only rescorings are valid when explicitly selected by
the user.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 05f45a11-b4b3-45d5-a537-e42c94ad0bc2

📥 Commits

Reviewing files that changed from the base of the PR and between b6b50b3 and 63a974a.

📒 Files selected for processing (1)
  • src/rescoring.js

8R0WNI3
8R0WNI3 previously approved these changes Jun 17, 2026

@8R0WNI3 8R0WNI3 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

Comment thread src/rescoring.js Outdated
Comment thread src/rescoring.js
Comment thread src/rescoring.js Outdated
Now that rescorings to the very same category are allowed again, we
cannot rely on the severity-did-change semantic any longer to control
validation. Instead, only validate those which are selected and intended
to be sent to backend.

Signed-off-by: Philipp Heil (zkdev) <philipp.heil@sap.com>

@8R0WNI3 8R0WNI3 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@zkdev zkdev merged commit 7de68d8 into open-component-model:master Jun 17, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ipcei Important Project of Common European Interest kind/task small task, normally part of feature or epic

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Unable to Add New Comments Without Changing Rescoring Status

2 participants