Skip to content

Import shared modification#3986

Open
Mathieu-Deharbe wants to merge 38 commits into
mainfrom
import-shared-modification
Open

Import shared modification#3986
Mathieu-Deharbe wants to merge 38 commits into
mainfrom
import-shared-modification

Conversation

@Mathieu-Deharbe

Copy link
Copy Markdown
Contributor

For now to import modification systeml added in #3958 disables the sharing of modification.

This PR adds it, allows to visualize them and handle them (with still a lot of restrictions that will be dealt with later)

SOUISSI Maissa (Externe) and others added 15 commits May 26, 2026 01:00
Signed-off-by: SOUISSI Maissa (Externe) <souissimai@gm0winl878.bureau.si.interne>
Signed-off-by: SOUISSI Maissa (Externe) <souissimai@gm0winl878.bureau.si.interne>
Signed-off-by: SOUISSI Maissa (Externe) <souissimai@gm0winl878.bureau.si.interne>
Signed-off-by: SOUISSI Maissa (Externe) <souissimai@gm0winl878.bureau.si.interne>
Signed-off-by: SOUISSI Maissa (Externe) <souissimai@gm0winl878.bureau.si.interne>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
@Mathieu-Deharbe Mathieu-Deharbe self-assigned this Jun 3, 2026
@coderabbitai

This comment was marked as low quality.

@Mathieu-Deharbe Mathieu-Deharbe marked this pull request as draft June 3, 2026 14:10
@Mathieu-Deharbe Mathieu-Deharbe changed the base branch from main to composite-selection June 3, 2026 14:11
coderabbitai[bot]

This comment was marked as low quality.

coderabbitai[bot]

This comment was marked as low quality.

Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
github-actions[bot]

This comment was marked as resolved.

Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Base automatically changed from composite-selection to main June 9, 2026 12:59
# Conflicts:
#	src/components/dialogs/import-modification-dialog.tsx
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Mathieu-Deharbe and others added 8 commits June 9, 2026 15:58
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
# Conflicts:
#	src/components/dialogs/import-composite/import-modification-dialog.tsx
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
@Mathieu-Deharbe Mathieu-Deharbe marked this pull request as ready for review June 17, 2026 12:04

@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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/components/graph/menus/network-modifications/network-modification-node-editor.tsx (1)

1309-1320: ⚡ Quick win

Align export tooltip with the new shared-selection disable condition.

The button is disabled when selectionContainsShared, but the tooltip only explains nesting-limit disablement. Add a shared-specific tooltip message to avoid ambiguous disabled state.

Also applies to: 1322-1326

🤖 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/components/graph/menus/network-modifications/network-modification-node-editor.tsx`
around lines 1309 - 1320, The Tooltip component in the
network-modification-node-editor.tsx file currently only accounts for the
isCompositeNestingLimitReached condition when displaying the tooltip title, but
the button is also disabled when selectionContainsShared is true. Update the
tooltip's title prop to include an additional conditional check: if
selectionContainsShared is true, display a FormattedMessage with an appropriate
message ID explaining that shared selections cannot be saved to Gridexplore;
otherwise, keep the existing logic that checks isCompositeNestingLimitReached
first, then defaults to the SaveToGridexplore message. This will align the
tooltip explanation with all possible disabled states of the button.
🤖 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.

Inline comments:
In
`@src/components/graph/menus/network-modifications/network-modification-node-editor.tsx`:
- Around line 1143-1147: The defaultSaveModificationName assignment uses
JSON.parse() on selectedNetworkModifications[0]?.messageValues without error
handling, which will crash the component if the JSON is invalid or the value is
not parseable. Wrap the JSON.parse() call in a try-catch block to safely handle
parsing errors, returning null in the catch block so the component continues to
render without breaking.

---

Nitpick comments:
In
`@src/components/graph/menus/network-modifications/network-modification-node-editor.tsx`:
- Around line 1309-1320: The Tooltip component in the
network-modification-node-editor.tsx file currently only accounts for the
isCompositeNestingLimitReached condition when displaying the tooltip title, but
the button is also disabled when selectionContainsShared is true. Update the
tooltip's title prop to include an additional conditional check: if
selectionContainsShared is true, display a FormattedMessage with an appropriate
message ID explaining that shared selections cannot be saved to Gridexplore;
otherwise, keep the existing logic that checks isCompositeNestingLimitReached
first, then defaults to the SaveToGridexplore message. This will align the
tooltip explanation with all possible disabled states of the button.
🪄 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: 5fdce894-52da-436d-9f08-362c46bc92bb

📥 Commits

Reviewing files that changed from the base of the PR and between 7ce4492 and b73aea2.

📒 Files selected for processing (5)
  • src/components/dialogs/import-composite/insert-name-cell.tsx
  • src/components/dialogs/import-modification-dialog.tsx
  • src/components/graph/menus/network-modifications/network-modification-node-editor.tsx
  • src/components/utils/field-constants.ts
  • src/services/study/index.ts
✅ Files skipped from review due to trivial changes (1)
  • src/components/utils/field-constants.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/dialogs/import-modification-dialog.tsx

coderabbitai[bot]

This comment was marked as low quality.

Mathieu-Deharbe and others added 3 commits June 19, 2026 14:32
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
@flomillot flomillot self-requested a review July 2, 2026 14:22
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