Nmk power cut off view#3951
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughAdds a new NMK "power cut-off" view: new connectivity types, a flattening helper and column definitions for disconnected power values, hook and component wiring to select and render the view, and English/French translations. ChangesNMK Power Cut-Off View
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/results/securityanalysis/security-analysis-result-utils.ts`:
- Around line 829-845: The new columns created via makeAgGridFloatColumn within
makeAgGridCustomHeaderColumn for 'disconnectedLoadActivePower' and
'disconnectedGenerationActivePower' are missing entries in the query field
mapping used for server-side sort/filter; add mapping entries for these colId
keys in the same mapping object/function that translates AG Grid colIds to
backend field names (the same place other power/energy colIds are mapped) so
sortParams/filterParams send the correct backend field names when
makeAgGridFloatColumn('disconnectedLoadActivePower', ...) and
makeAgGridFloatColumn('disconnectedGenerationActivePower', ...) are used.
In
`@src/components/results/securityanalysis/use-security-analysis-column-defs.tsx`:
- Around line 138-140: The current early return uses only isPowerCutOffView and
can return NMK power-cutoff columns even when resultType is RESULT_TYPE.N;
update the guard to check the result type as well (e.g., require resultType !==
RESULT_TYPE.N or explicitly require resultType === RESULT_TYPE.K/M) before
calling securityAnalysisTableNmKPowerCutOffColumnsDefinition(intl,
filterEnums.nmk, getEnumLabel, tabIndex), so the NMK-specific columns are only
returned for NMK result types while preserving the existing call and arguments.
🪄 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: 93d9bab2-9659-449d-9d6a-5c70550c8011
📒 Files selected for processing (7)
src/components/results/securityanalysis/security-analysis-result-nmk.tsxsrc/components/results/securityanalysis/security-analysis-result-tab.tsxsrc/components/results/securityanalysis/security-analysis-result-utils.tssrc/components/results/securityanalysis/security-analysis.type.tssrc/components/results/securityanalysis/use-security-analysis-column-defs.tsxsrc/translations/en.jsonsrc/translations/fr.json
|



PR Summary
create new view for nmk power cut off