Fix/blacklevel synchronisation#279
Merged
Merged
Conversation
…ove notification handling for stream settings
… remove unused components
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the frontend’s robustness and UI consistency around live stream controls and detector parameter inputs, mainly by adding global notifications for backend failures and tightening black level input handling.
Changes:
- Added notification-based user feedback for stream settings load/submit failures (replacing inline submit alerts).
- Updated detector black level updates to use the backend’s
blackLevelquery parameter and prevent negative values in the UI. - Refined stream control overlay layout/scrolling and cleaned up unused imports/UI elements.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
frontend/src/components/StreamControls.js |
Removes dialog title around the stream settings overlay dialog. |
frontend/src/components/StreamControlOverlay.js |
Adds notification dispatching on backend errors, adjusts overlay layout/scroll behavior, and refactors some UI elements. |
frontend/src/components/DetectorParameters.js |
Fixes black level API query parameter name and adds clamping/empty-input handling for black level edits. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
184
to
189
| dispatch(setStreamSettings(loadedSettings)); | ||
|
|
||
| // Sync per-detector settings from backend | ||
| if (response.per_detector) { | ||
| dispatch(setPerDetectorSettings(response.per_detector)); | ||
| } |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Franzili
pushed a commit
that referenced
this pull request
May 30, 2026
This pull request improves robustness and user feedback for stream and detector parameter controls in the frontend, with a focus on error handling, input validation, and UI consistency. The main changes include better notification handling for backend errors, stricter validation for detector black level input, and several UI/UX refinements. **Input validation and API correctness:** * Improved validation for the `blacklevel` detector parameter: negative values are now prevented, and empty input is handled gracefully. Also corrected the API parameter name from `blacklevel` to `blackLevel` for backend compatibility. [[1]](diffhunk://#diff-25d76cc3b9cc2197b98a1b074830e1546d58a9e97c2bca8a6237a479c042e918L138-R137) [[2]](diffhunk://#diff-25d76cc3b9cc2197b98a1b074830e1546d58a9e97c2bca8a6237a479c042e918L211-R226) [[3]](diffhunk://#diff-25d76cc3b9cc2197b98a1b074830e1546d58a9e97c2bca8a6237a479c042e918L476-R493) **UI/UX refinements:** * Adjusted overflow handling and scrolling behavior for the stream control overlay for better layout consistency and usability. [[1]](diffhunk://#diff-064fb804a25591ddf485bad6b26f788038dbe818cd2580bcd028a228e5790cc4L440-R461) [[2]](diffhunk://#diff-064fb804a25591ddf485bad6b26f788038dbe818cd2580bcd028a228e5790cc4R583) * Improved formatting and clarity of crop size controls and tab labels, including better handling of max values and label wrapping. [[1]](diffhunk://#diff-064fb804a25591ddf485bad6b26f788038dbe818cd2580bcd028a228e5790cc4L551-R573) [[2]](diffhunk://#diff-064fb804a25591ddf485bad6b26f788038dbe818cd2580bcd028a228e5790cc4L681-R699) [[3]](diffhunk://#diff-064fb804a25591ddf485bad6b26f788038dbe818cd2580bcd028a228e5790cc4L691-R726) [[4]](diffhunk://#diff-064fb804a25591ddf485bad6b26f788038dbe818cd2580bcd028a228e5790cc4L709-R737) * Cleaned up imports by removing unused components and icons for maintainability. [[1]](diffhunk://#diff-25d76cc3b9cc2197b98a1b074830e1546d58a9e97c2bca8a6237a479c042e918L14) [[2]](diffhunk://#diff-064fb804a25591ddf485bad6b26f788038dbe818cd2580bcd028a228e5790cc4L1-R1) [[3]](diffhunk://#diff-064fb804a25591ddf485bad6b26f788038dbe818cd2580bcd028a228e5790cc4L18-L31) --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
This pull request improves robustness and user feedback for stream and detector parameter controls in the frontend, with a focus on error handling, input validation, and UI consistency. The main changes include better notification handling for backend errors, stricter validation for detector black level input, and several UI/UX refinements.
Input validation and API correctness:
blackleveldetector parameter: negative values are now prevented, and empty input is handled gracefully. Also corrected the API parameter name fromblackleveltoblackLevelfor backend compatibility. [1] [2] [3]UI/UX refinements: