Convert navbar to redux#627
Merged
NexInfinite merged 17 commits intorelease-alpha-0.1.10from Aug 19, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
Converting the navbar component from local state management to Redux, centralizing all drone connection state and making it persistent across the application. This involves migrating connection parameters, states, and socket event handling from component-level hooks to Redux actions and selectors.
- Migrated navbar component from useState/useLocalStorage/useSessionStorage to Redux state management
- Updated all components to use Redux selectors instead of session/local storage for connection state
- Consolidated duplicate localStorage subscription logic into the main store configuration
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| gcs/src/redux/subscribers/localStorageSubscriber.js | Removed deprecation comments and updated property names to match Redux state |
| gcs/src/redux/store.js | Added state persistence logic and Redux action imports for initialization |
| gcs/src/redux/slices/droneConnectionSlice.js | Added setWireless action and selectWireless selector |
| gcs/src/redux/middleware/socketMiddleware.js | Reorganized socket event handlers and added connection status handling |
| gcs/src/params.jsx | Replaced useSessionStorage with Redux selector for connection state |
| gcs/src/missions.jsx | Replaced session/local storage hooks with Redux selectors |
| gcs/src/graphs.jsx | Replaced useSessionStorage with Redux selector for connection state |
| gcs/src/config.jsx | Replaced useSessionStorage with Redux selector for connection state |
| gcs/src/components/navbar.jsx | Complete migration from local state to Redux for all connection-related state |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…thub.com/project-Falcon/FGCS into alpha-0.1.10/620-convert-navbar-to-redux
1Blademaster
approved these changes
Aug 19, 2025
1Blademaster
pushed a commit
that referenced
this pull request
Sep 28, 2025
* Moved over some initial things and com ports * Finished conversions * kept things persistent * Changed to useSelector for connected everywhere now :D * formatted * AI suggestions * fixed wireless * null vs undefined :DDD * Replaced session storage * All use session storages converted over * Revert "Replaced session storage" This reverts commit ade054e. * Revert "All use session storages converted over" This reverts commit 7798b80. * Actually fixed that mantine issue * Added todo
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.

Moving Navbar.jsx into redux, this means editing how connection works everywhere that uses it and keeping things persistent.