Skip to content

Fix/blacklevel synchronisation#279

Merged
gokugiant merged 7 commits into
masterfrom
fix/blacklevel_synchronisation
May 26, 2026
Merged

Fix/blacklevel synchronisation#279
gokugiant merged 7 commits into
masterfrom
fix/blacklevel_synchronisation

Conversation

@gokugiant
Copy link
Copy Markdown
Contributor

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] [2] [3]

UI/UX refinements:

  • Adjusted overflow handling and scrolling behavior for the stream control overlay for better layout consistency and usability. [1] [2]
  • Improved formatting and clarity of crop size controls and tab labels, including better handling of max values and label wrapping. [1] [2] [3] [4]
  • Cleaned up imports by removing unused components and icons for maintainability. [1] [2] [3]

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 blackLevel query 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 thread frontend/src/components/StreamControls.js
Comment thread frontend/src/components/StreamControlOverlay.js Outdated
Comment thread frontend/src/components/StreamControlOverlay.js Outdated
Comment on lines 184 to 189
dispatch(setStreamSettings(loadedSettings));

// Sync per-detector settings from backend
if (response.per_detector) {
dispatch(setPerDetectorSettings(response.per_detector));
}
gokugiant and others added 2 commits May 26, 2026 18:23
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>
@gokugiant gokugiant enabled auto-merge May 26, 2026 16:25
@gokugiant gokugiant added this pull request to the merge queue May 26, 2026
Merged via the queue into master with commit 7812e7e May 26, 2026
14 checks passed
@gokugiant gokugiant deleted the fix/blacklevel_synchronisation branch May 26, 2026 16:39
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>
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