Skip to content

Fix temporary limits modification type in tabular limit sets#3916

Merged
flomillot merged 7 commits into
mainfrom
fix/limit-sets-temporary-limits-modification-type
May 19, 2026
Merged

Fix temporary limits modification type in tabular limit sets#3916
flomillot merged 7 commits into
mainfrom
fix/limit-sets-temporary-limits-modification-type

Conversation

@flomillot
Copy link
Copy Markdown
Contributor

@flomillot flomillot commented Apr 23, 2026

Summary

Respect the modification type provided in the CSV column instead of
forcing ADD when the outer modification is not of MODIFY type, and no
longer skip temporary limits whose name is empty.

Signed-off-by: Florent MILLOT <75525996+flomillot@users.noreply.github.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 23, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2e9de86f-5fab-4ee7-95b3-ce2a3ae5d9c4

📥 Commits

Reviewing files that changed from the base of the PR and between 551e801 and 1238876.

📒 Files selected for processing (3)
  • src/components/dialogs/limits/limits-pane-utils.ts
  • src/components/dialogs/network-modifications/tabular/tabular-modification-utils.ts
  • src/components/utils/field-constants.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/components/dialogs/limits/limits-pane-utils.ts
  • src/components/utils/field-constants.ts
  • src/components/dialogs/network-modifications/tabular/tabular-modification-utils.ts

📝 Walkthrough

Walkthrough

Removed LIMIT_SETS_MODIFICATION_TYPE and consolidated modification-type usage to OPERATIONAL_LIMITS_GROUPS_MODIFICATION_TYPE (extended with ADD, MODIFY_OR_ADD, DELETE). formatTemporaryLimitsFrontToBack now always emits all temporary-limit entries and reads modificationType directly from input; imports updated accordingly.

Changes

Modification-type consolidation and temporary-limits change

Layer / File(s) Summary
Field constants update
src/components/utils/field-constants.ts
Removed exported LIMIT_SETS_MODIFICATION_TYPE and extended OPERATIONAL_LIMITS_GROUPS_MODIFICATION_TYPE to include ADD, MODIFY_OR_ADD, and DELETE.
Import updates in limits pane and tabular utils
src/components/dialogs/limits/limits-pane-utils.ts, src/components/dialogs/network-modifications/tabular/tabular-modification-utils.ts
Replaced imports/usages of LIMIT_SETS_MODIFICATION_TYPE with OPERATIONAL_LIMITS_GROUPS_MODIFICATION_TYPE; updated deletion filtering, assignment of modificationType, and fixed-field enum options accordingly.
Temporary limits generation change
src/components/dialogs/network-modifications/limit-sets/limit-sets-tabular-modification-utils.ts
formatTemporaryLimitsFrontToBack now emits temporaryLimits entries for every index 1..amountMaxTemporaryLimits and sets modificationType from modification[TEMPORARY_LIMITS_MODIFICATION_TYPE]; removed unused imports related to prior constants.

Suggested reviewers

  • Meklo
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: fixing how modification types are handled for temporary limits in tabular limit sets.
Description check ✅ Passed The description clearly relates to the changeset, explaining the two key improvements: respecting CSV-provided modification types and including empty-named temporary limits.
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.


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.

@flomillot flomillot requested a review from Meklo April 23, 2026 13:31
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@src/components/dialogs/network-modifications/limit-sets/limit-sets-tabular-modification-utils.ts`:
- Around line 95-100: The current push into temporaryLimits unconditionally adds
placeholders even when name, value, and acceptableDuration are all empty; change
the logic in limit-sets-tabular-modification-utils so you first compute name =
toModificationOperation(modification[TEMPORARY_LIMIT_NAME + i]), value =
toModificationOperation(modification[TEMPORARY_LIMIT_VALUE + i]), and
acceptableDuration =
toModificationOperation(modification[TEMPORARY_LIMIT_DURATION + i]) and only
push the object into temporaryLimits when at least one of name, value, or
acceptableDuration is non-empty (allowing name to be empty if others exist);
still include modificationType from
modification[TEMPORARY_LIMITS_MODIFICATION_TYPE] when pushing.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ec135146-9d4b-4ae0-b61d-977499ef6b56

📥 Commits

Reviewing files that changed from the base of the PR and between 3fb76d3 and 9734916.

📒 Files selected for processing (1)
  • src/components/dialogs/network-modifications/limit-sets/limit-sets-tabular-modification-utils.ts

Signed-off-by: Florent MILLOT <75525996+flomillot@users.noreply.github.com>
…S_MODIFICATION_TYPE` and remove unused `LIMIT_SETS_MODIFICATION_TYPE` constants

Signed-off-by: Florent MILLOT <75525996+flomillot@users.noreply.github.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/components/utils/field-constants.ts (1)

221-230: Inline comments grouping no longer matches member list.

With ADD inserted above the "Modification types for Tabular modifications" comment and DELETE inserted after the "Modification type for simple form modifications" comment, the categorization comments no longer accurately describe which members belong to each group. Consider re-organizing or updating the comments so ADD/DELETE are explicitly classified (tabular vs. simple form), otherwise future readers may be misled about where each value is valid.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/utils/field-constants.ts` around lines 221 - 230, The inline
comments for OPERATIONAL_LIMITS_GROUPS_MODIFICATION_TYPE no longer match the
grouped members; update the comments or reorder members so each value is
explicitly classified. Specifically, edit the block containing
OPERATIONAL_LIMITS_GROUPS_MODIFICATION_TYPE and either move the ADD and DELETE
declarations into the correct commented sections or change the comment lines to
state which of ADD, MODIFY, MODIFY_OR_ADD, REPLACE, DELETE belong to "Tabular
modifications" vs "simple form modifications" so the categorization for ADD and
DELETE is unambiguous when reading the constant.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/components/utils/field-constants.ts`:
- Around line 221-230: The inline comments for
OPERATIONAL_LIMITS_GROUPS_MODIFICATION_TYPE no longer match the grouped members;
update the comments or reorder members so each value is explicitly classified.
Specifically, edit the block containing
OPERATIONAL_LIMITS_GROUPS_MODIFICATION_TYPE and either move the ADD and DELETE
declarations into the correct commented sections or change the comment lines to
state which of ADD, MODIFY, MODIFY_OR_ADD, REPLACE, DELETE belong to "Tabular
modifications" vs "simple form modifications" so the categorization for ADD and
DELETE is unambiguous when reading the constant.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 84850d89-ab4d-4f34-b315-33a0e65ddeaa

📥 Commits

Reviewing files that changed from the base of the PR and between 9734916 and 551e801.

📒 Files selected for processing (4)
  • src/components/dialogs/limits/limits-pane-utils.ts
  • src/components/dialogs/network-modifications/limit-sets/limit-sets-tabular-modification-utils.ts
  • src/components/dialogs/network-modifications/tabular/tabular-modification-utils.ts
  • src/components/utils/field-constants.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/dialogs/network-modifications/limit-sets/limit-sets-tabular-modification-utils.ts

@sonarqubecloud
Copy link
Copy Markdown

@flomillot flomillot merged commit 3f8403b into main May 19, 2026
5 checks passed
@flomillot flomillot deleted the fix/limit-sets-temporary-limits-modification-type branch May 19, 2026 16:15
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