Repository navigation
Conversation
Add REACT_APP_DEFAULT_MONITOR_ALL (default false) to check the "Monitor All" box in the home page results table after each search and page change. It is shown on the Services page and only applies when PVWS is enabled. Fixes #147. Fix monitor all monitoring the wrong PVs when the table is sorted or filtered. It used the pagination text and row positions in the unsorted results, so after sorting none of the visible PVs were monitored. It now uses the grid's visible page row ids, and while checked it follows sort and filter changes. Fix PVWS subscriptions leaking when the table is sorted or filtered while monitoring. ValueCheckbox now clears its subscription when its row is removed. Add tests for monitor all in QueryResults.test.jsx. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
There was a problem hiding this comment.
🟡 Changes recommended
Filter-driven pagination resets can disrupt Monitor All, and hiding Actions can silently stop live updates.
2 open issues
What changed in this PR
Adds opt-in automatic monitoring for search results and updates Monitor All to use sorted, filtered page rows.
Changes:
- Adds and displays the default-monitoring setting.
- Updates page monitoring and subscription cleanup.
- Adds regression tests for Monitor All behavior.
| File | Description |
|---|---|
src/config.js |
Parses the new monitoring setting. |
src/components/services/Services.jsx |
Displays the configured default. |
src/components/home/queryresults/valuecheckbox/ValueCheckbox.jsx |
Clears subscriptions on unmount. |
src/components/home/queryresults/QueryResults.test.jsx |
Tests monitoring and pagination behavior. |
src/components/home/queryresults/QueryResults.jsx |
Monitors visible page IDs and handles grid changes. |
.env |
Documents the opt-in setting. |
Review effort: Balanced
| onPaginationModelChange={(newPaginationModel) => { | ||
| setPaginationModel(newPaginationModel); | ||
| clearMonitoring(); | ||
| monitorAllOnNewPage(config.DEFAULT_MONITOR_ALL); |
Comment on lines
+49
to
+52
| useEffect(() => { | ||
| return () => { | ||
| if (isSubscribed.current) { | ||
| sendJsonMessage({ "type": "clear", "pvs": [props.pvName] }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Add REACT_APP_DEFAULT_MONITOR_ALL (default false) to check the "Monitor All" box in the home page results table after each search and page change. It is shown on the Services page and only applies when PVWS is enabled.
Fix monitor all monitoring the wrong PVs when the table is sorted or filtered. It used the pagination text and row positions in the unsorted results, so after sorting none of the visible PVs were monitored. It now uses the grid's visible page row ids, and while checked it follows sort and filter changes.
Fix PVWS subscriptions leaking when the table is sorted or filtered while monitoring. ValueCheckbox now clears its subscription when its row is removed.
Add tests for monitor all in QueryResults.test.jsx.
This fixes #147 but needs testing