Skip to content

[WIP] add hvdc filter for electronics clusters#1111

Closed
EtienneLt wants to merge 1 commit into
mainfrom
hvdc-for-electronics-clusters
Closed

[WIP] add hvdc filter for electronics clusters#1111
EtienneLt wants to merge 1 commit into
mainfrom
hvdc-for-electronics-clusters

Conversation

@EtienneLt
Copy link
Copy Markdown
Contributor

PR Summary

Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 24, 2026

📝 Walkthrough

Walkthrough

The pull request expands short-circuit ICC cluster functionality to support HVDC equipment types by adding EquipmentType.HVDC_LINE to the column definition filters and introducing HVDC as an additional selection option in the cluster type dropdown.

Changes

Cohort / File(s) Summary
Short-Circuit ICC Cluster Configuration
src/components/parameters/short-circuit/columns-definition.ts, src/components/parameters/short-circuit/short-circuit-icc-cluster-table-cell.tsx
Extended short-circuit ICC cluster filtering and selection to support HVDC equipment type alongside existing GENERATOR type. Added EquipmentType.HVDC_LINE to filter criteria and HVDC option to cluster type selection dropdown.

Suggested reviewers

  • ayolab
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is empty (only template present), providing no information about the changeset or implementation details. Provide a meaningful description explaining what the changes accomplish, why HVDC filters were added, and any relevant context for reviewers.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title '[WIP] add hvdc filter for electronics clusters' is directly related to the changeset, which adds HVDC_LINE equipment type support to short-circuit filter configurations.
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.

@EtienneLt EtienneLt self-assigned this Apr 24, 2026
@sonarqubecloud
Copy link
Copy Markdown

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/parameters/short-circuit/short-circuit-icc-cluster-table-cell.tsx (1)

48-48: Extract cluster type options to typed constants for improved maintainability.

The hardcoded strings ['GENERATOR', 'HVDC'] are already correctly aligned with the backend type definition (type: 'GENERATOR' | 'HVDC' in BasePowerElectronicsCluster). However, extracting these values to a typed constant would improve consistency and reduce duplication across the validation schema and UI component.

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

In
`@src/components/parameters/short-circuit/short-circuit-icc-cluster-table-cell.tsx`
at line 48, Replace the hardcoded array passed to the options prop in
ShortCircuitIccClusterTableCell with a single exported, typed constant (e.g.,
CLUSTER_TYPES) and derive its TS type so UI and validation share the same source
of truth; create something like export const CLUSTER_TYPES =
['GENERATOR','HVDC'] as const and export type ClusterType = typeof
CLUSTER_TYPES[number], then import and use CLUSTER_TYPES in the options prop and
where the BasePowerElectronicsCluster union type is referenced to remove
duplication and keep types consistent.
🤖 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/parameters/short-circuit/short-circuit-icc-cluster-table-cell.tsx`:
- Line 48: Replace the hardcoded array passed to the options prop in
ShortCircuitIccClusterTableCell with a single exported, typed constant (e.g.,
CLUSTER_TYPES) and derive its TS type so UI and validation share the same source
of truth; create something like export const CLUSTER_TYPES =
['GENERATOR','HVDC'] as const and export type ClusterType = typeof
CLUSTER_TYPES[number], then import and use CLUSTER_TYPES in the options prop and
where the BasePowerElectronicsCluster union type is referenced to remove
duplication and keep types consistent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3114c9f0-5cf7-4bba-801c-e59d35a50723

📥 Commits

Reviewing files that changed from the base of the PR and between b57ffa1 and 0dc3f42.

📒 Files selected for processing (2)
  • src/components/parameters/short-circuit/columns-definition.ts
  • src/components/parameters/short-circuit/short-circuit-icc-cluster-table-cell.tsx

@EtienneLt
Copy link
Copy Markdown
Contributor Author

fix in #1130

@EtienneLt EtienneLt closed this May 13, 2026
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.

1 participant