Skip to content

Convert navbar to redux#627

Merged
NexInfinite merged 17 commits intorelease-alpha-0.1.10from
alpha-0.1.10/620-convert-navbar-to-redux
Aug 19, 2025
Merged

Convert navbar to redux#627
NexInfinite merged 17 commits intorelease-alpha-0.1.10from
alpha-0.1.10/620-convert-navbar-to-redux

Conversation

@NexInfinite
Copy link
Copy Markdown
Contributor

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

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

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.

Comment thread gcs/src/redux/store.js Outdated
Comment thread gcs/src/redux/store.js
Comment thread gcs/src/redux/slices/droneConnectionSlice.js Outdated
Comment thread gcs/src/redux/middleware/socketMiddleware.js Outdated
Copy link
Copy Markdown
Member

@1Blademaster 1Blademaster left a comment

Choose a reason for hiding this comment

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

Also got this error to fix

Image

Comment thread gcs/src/redux/store.js Outdated
@NexInfinite NexInfinite merged commit 4e7d39c into release-alpha-0.1.10 Aug 19, 2025
7 checks passed
@NexInfinite NexInfinite deleted the alpha-0.1.10/620-convert-navbar-to-redux branch August 19, 2025 21:35
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
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.

3 participants