Skip to content

feat: add global filters to state estimation measurements - #4274

Open
KoloMenek wants to merge 7 commits into
mainfrom
feat/global-filters-estimation-measurements
Open

KoloMenek wants to merge 7 commits into
mainfrom
feat/global-filters-estimation-measurements

Conversation

@KoloMenek

@KoloMenek KoloMenek commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

PR Summary — gridstudy-app

· feat: add global filters to state estimation measurements

State estimation Measurements tab now supports global filters: the user picks
criteria (countries, voltage ranges, substation properties, saved site/post
filters) and the table shows only matching measurements, fetched from the new
GET …/state-estimation/measurements?globalFilters=<json> endpoint (204 →
empty table). Selections are persisted per study. Column filtering/sorting stay
client-side; the old /result call is unchanged.

  • New StateEstimationMeasurements component (1 s debounce, stale responses ignored, rows hidden until status SUCCEED/FAILED)
  • New fetchStateEstimationMeasurements service + GlobalFilterSelector wiring in the result tab
  • Tests: service encoding/204/rejection, component concurrency, tab persistence

Cross-repo: study-server + state-estimation server PRs.
Linked PR: gridsuite/study-server#1148

@KoloMenek KoloMenek self-assigned this Oct 23, 2026
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b41e3ecb-9b0c-4ce5-b15f-13212d39a376
Commits

Reviewing files that changed from the base of the PR and between 322b62e and 61da7c0.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review.

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ad169384-624b-4b06-8823-f4b88809777c
📥 Commits

Reviewing files that changed from the base of the PR and between 97cae57 and 322b62e.

📒 Files selected for processing: 5
  • src/components/results/stateestimation/state-estimation-measurements.test.tsx
  • src/components/results/stateestimation/state-estimation-measurements.tsx
  • src/components/results/stateestimation/state-estimation-result-table.test.tsx
  • src/services/study/state-estimation.test.ts
  • src/services/study/state-estimation.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The state-estimation measurements tab now supports global-filter criteria and fetches measurement rows for the current study, node, and root network. The result table accepts those rows, while tests cover request behavior, query state, filter integration, and table rendering.

Changes: State-estimation measurements

Layer / File(s) Summary
Measurement fetch API
src/services/study/state-estimation.ts, src/services/study/state-estimation.test.ts
Adds a measurements request for a study, node, and root network. When filters are provided, the service encodes them as a globalFilters query parameter. Tests cover request URLs, responses, and failures.
Measurement table rows
src/components/results/stateestimation/state-estimation-result.type.ts, src/components/results/stateestimation/state-estimation-result-table.tsx, src/components/results/stateestimation/state-estimation-result-table.test.tsx
Adds optional measurementRows input. The table uses supplied rows, falls back to rows in the full result, and returns empty arrays when applicable result data is absent. Tests cover row selection and grid behavior.
Query-aware display and tab integration
src/components/results/stateestimation/state-estimation-measurements.tsx, src/components/results/stateestimation/state-estimation-result-tab.tsx, src/components/results/stateestimation/state-estimation-measurements.test.tsx
Adds query identity, loading, and stale-response handling for measurement requests. The result tab supplies global filters and shows the filter selector on the measurements tab. Tests cover query changes, saved filters, and tab behavior.

Sequence Diagram(s)

sequenceDiagram
  participant StateEstimationResultTab
  participant StateEstimationMeasurements
  participant fetchStateEstimationMeasurements
  participant StateEstimationResultTable
  StateEstimationResultTab->>StateEstimationMeasurements: Pass study, node, root network, and global filters
  StateEstimationMeasurements->>fetchStateEstimationMeasurements: Request measurements for current criteria
  fetchStateEstimationMeasurements-->>StateEstimationMeasurements: Return measurement rows
  StateEstimationMeasurements->>StateEstimationResultTable: Supply rows for the current query
Loading

Suggested reviewers: meklo

Priority: Normal

Merge Risk: Minimal · up to 322b6

No specific issue is established that would prevent merging after the normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 8 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: adding global filters to state-estimation measurements.
Description check Passed The description directly explains the global-filter behavior, new endpoint, component changes, persistence, client-side sorting and filtering, and test coverage.
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.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

No deployments
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