Fix config states being incorrectly set#1002
Merged
1Blademaster merged 3 commits intomainfrom Feb 25, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes an issue where config states were being incorrectly set as a generic "config" state instead of specific sub-states for individual config pages. The changes implement a more granular state management system using dot notation (e.g., "config.gripper", "config.ftp") to properly track which specific config page the user is on.
Changes:
- Backend endpoints now enforce specific config sub-states (e.g., "config.gripper") instead of accepting a generic "config" state
- Frontend layout component now skips setting state for the generic "config" page, allowing individual config components to set their own specific states
- Tests updated to use the new specific config sub-states
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| radio/app/endpoints/params.py | Changed set_multiple_params to only accept "params" state, removed "config" from valid states |
| radio/app/endpoints/gripper.py | Removed state check from getGripperEnabled (called before entering page), kept "config.gripper" check for actual operations |
| gcs/src/components/layout.jsx | Skip emitting state for "config" page since individual config components handle it |
| gcs/src/components/config/gripper.jsx | Set state to "config.gripper" on mount, fixed useEffect dependencies |
| gcs/src/components/config/ftp.jsx | Set state to "config.ftp" on mount with proper useEffect dependencies |
| radio/tests/test_params.py | Removed test for setting params in "config" state (no longer valid) |
| radio/tests/test_gripper.py | Updated state from "config" to "config.gripper" |
| radio/tests/test_ftp.py | Updated state from "config" to "config.ftp" |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ProgramPhantom
added a commit
that referenced
this pull request
Feb 23, 2026
…eware - Moved error result from endpoint to controller - Formatted - Added check to be on config.gripper. I'll test this once #1002 is merged
Kwash67
approved these changes
Feb 24, 2026
ProgramPhantom
added a commit
that referenced
this pull request
Feb 27, 2026
* Added enable gripper button * Created separate gripper enable button and removed the deactivation of the gripper tab * Added emitRefreshParams to toggleGripperEnabled * - Added endpoints for enabling and disabling gripper - Added controllers for setting GRIP_ENABLE - Think I've wired everything up * Update gcs/src/components/config/gripper.jsx Co-authored-by: Kush Makkapati <kush.makkapati@icloud.com> * Update gcs/src/components/config/gripper.jsx Co-authored-by: Kush Makkapati <kush.makkapati@icloud.com> * Update gcs/src/components/config/gripper.jsx Co-authored-by: Kush Makkapati <kush.makkapati@icloud.com> * - Changed socket emit names to end in _result - Added the return of appropriate error message from endpoints and handling in middleware * - Added tests and formatted. First time doing these tests * - Moved gripper config refresh to be triggered automatically by middleware - Moved error result from endpoint to controller - Formatted - Added check to be on config.gripper. I'll test this once #1002 is merged * Fixed ruff formatting * Try to fix python tests * Fix tests again * Added success notifications * Fixed fetch error of gripper params * Alternative fix * - Removed random getGripperEnabled - Added extra check to only fetch params if gripper enabled * Turned off initial fetch of gripper config so it only fires if gripper enabled. * Added getGripperEnabled to dependency list * - Removed get gripper config from set gripper disabled - Dispatched emitGetGripperEnabled when gripper page is opened --------- Co-authored-by: Kush Makkapati <kush.makkapati@icloud.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.
No description provided.