Skip to content

Fix stuck one-bus SC loader on workspace switch#3952

Open
ayolab wants to merge 4 commits into
mainfrom
ayolab/fix-stuck-one-bus-sc-loader-on-workspace-switch
Open

Fix stuck one-bus SC loader on workspace switch#3952
ayolab wants to merge 4 commits into
mainfrom
ayolab/fix-stuck-one-bus-sc-loader-on-workspace-switch

Conversation

@ayolab
Copy link
Copy Markdown
Contributor

@ayolab ayolab commented May 19, 2026

No description provided.

Signed-off-by: Ayoub LABIDI <ayoub.labidi@protonmail.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 19, 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: ce4f4b14-f032-426a-83e5-5347c170085e

📥 Commits

Reviewing files that changed from the base of the PR and between e43c102 and 4d87ab7.

📒 Files selected for processing (7)
  • src/components/grid-layout/cards/diagrams/singleLineDiagram/hooks/use-one-bus-shortcircuit-analysis-loader.tsx
  • src/components/grid-layout/cards/diagrams/singleLineDiagram/single-line-diagram-content.tsx
  • src/components/workspace/panel-contents/diagrams/sld/substation-panel-content.tsx
  • src/components/workspace/panel-contents/diagrams/sld/voltage-level-panel-content.tsx
  • src/redux/actions.ts
  • src/redux/reducer.ts
  • src/redux/reducer.type.ts
💤 Files with no reviewable changes (3)
  • src/components/grid-layout/cards/diagrams/singleLineDiagram/hooks/use-one-bus-shortcircuit-analysis-loader.tsx
  • src/components/workspace/panel-contents/diagrams/sld/voltage-level-panel-content.tsx
  • src/components/workspace/panel-contents/diagrams/sld/substation-panel-content.tsx

📝 Walkthrough

Walkthrough

The PR refactors one-bus short-circuit analysis state management from hook-based dispatch to Redux context. Redux types are updated to use OneBusShortCircuitAnalysisContext with equipment and layout fields. SingleLineDiagramContent removes the panelId prop, computes running state from Redux context matching, and dispatches context before analysis. Caller components stop passing panelId.

Changes

One-Bus Short-Circuit Analysis Refactor

Layer / File(s) Summary
Redux infrastructure: types, actions, and reducer
src/redux/reducer.type.ts, src/redux/actions.ts, src/redux/reducer.ts
Introduces OneBusShortCircuitAnalysisContext type with equipment and diagram identifiers; adds SET_ONE_BUS_SHORTCIRCUIT_ANALYSIS_CONTEXT action and action creator; removes diagram-based actions and updates reducer initial state and handler to manage context directly.
SingleLineDiagramContent component refactor
src/components/grid-layout/cards/diagrams/singleLineDiagram/single-line-diagram-content.tsx
Removes panelId from props interface, adds theme and localization imports for styled loader UI, computes equipmentId from diagram parameters, derives isOneBusScRunning selector by matching Redux context, updates analysis start handler to dispatch new context action before starting analysis, and renders progress chip based on running state.
Update component callers
src/components/workspace/panel-contents/diagrams/sld/substation-panel-content.tsx, src/components/workspace/panel-contents/diagrams/sld/voltage-level-panel-content.tsx
Remove panelId prop from SingleLineDiagramContent to align with updated component interface.

Suggested reviewers

  • Meklo
  • sBouzols
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided by the author. The description field is empty, making it impossible to assess relevance to the changeset. Add a pull request description explaining the motivation, approach, and impact of the changes made to fix the stuck loader issue.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix stuck one-bus SC loader on workspace switch' directly and specifically summarizes the main change: fixing an issue where the one-bus short-circuit loader gets stuck during workspace switches.
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.

@sonarqubecloud
Copy link
Copy Markdown

@souissimai souissimai self-requested a review May 26, 2026 08:44
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