Skip to content

Dashboard.jsx change for redux#617

Merged
NexInfinite merged 18 commits intorelease-alpha-0.1.10from
alpha-0.1.10/615-add-example-redux-conversion-file
Aug 18, 2025
Merged

Dashboard.jsx change for redux#617
NexInfinite merged 18 commits intorelease-alpha-0.1.10from
alpha-0.1.10/615-add-example-redux-conversion-file

Conversation

@NexInfinite
Copy link
Copy Markdown
Contributor

@NexInfinite NexInfinite commented Aug 17, 2025

ITS TIME TO REDUX!!!

@NexInfinite NexInfinite requested review from 1Blademaster and Copilot and removed request for Copilot August 17, 2025 19:32
@NexInfinite NexInfinite requested review from 1Blademaster and removed request for 1Blademaster August 17, 2025 21:22
@1Blademaster 1Blademaster requested a review from Copilot August 17, 2025 21:31

This comment was marked as outdated.

1Blademaster
1Blademaster previously approved these changes Aug 18, 2025
@1Blademaster 1Blademaster self-requested a review August 18, 2025 15:25
@1Blademaster 1Blademaster dismissed their stale review August 18, 2025 16:23

Need to re-review

@1Blademaster 1Blademaster requested a review from Copilot August 18, 2025 18:22
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 implements Redux state management throughout the dashboard component, replacing local state management with centralized Redux stores. The changes migrate from component-level state to Redux slices for drone telemetry, mission data, and connection status management.

Key changes:

  • Replaces local state with Redux selectors and actions across dashboard components
  • Updates socket event handling to dispatch Redux actions instead of setting local state
  • Modifies data flow from prop drilling to Redux-based state selection

Reviewed Changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
gcs/src/redux/subscribers/localStorageSubscriber.js Uncomments store subscription logic for localStorage persistence
gcs/src/redux/slices/statusTextSlice.js Changes message ordering from push to unshift
gcs/src/redux/slices/missionSlice.js Updates property names from camelCase to snake_case and adds undefined checks
gcs/src/redux/slices/droneInfoSlice.js Adds new selectors, updates property access patterns, and removes commented code
gcs/src/redux/slices/droneConnectionSlice.js Updates socket emission calls and console messages
gcs/src/redux/middleware/socketMiddleware.js Adds new socket event handlers and updates message processing logic
gcs/src/dashboard.jsx Major refactor replacing local state with Redux selectors and actions
gcs/src/components/dashboard/*.jsx Updates components to use Redux selectors instead of props
gcs/src/components/layout.jsx Adds Redux integration for page state management
gcs/src/main.jsx Wraps application with Redux Provider

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread gcs/src/redux/slices/statusTextSlice.js
Comment thread gcs/src/redux/slices/droneInfoSlice.js
Comment thread gcs/src/redux/slices/droneInfoSlice.js
Comment thread gcs/src/redux/slices/droneInfoSlice.js
Comment thread gcs/src/redux/middleware/socketMiddleware.js
Comment thread gcs/src/redux/middleware/socketMiddleware.js
Comment thread gcs/src/redux/middleware/socketMiddleware.js
Comment thread gcs/src/dashboard.jsx
Comment thread gcs/src/dashboard.jsx
Comment thread gcs/src/components/dashboard/map.jsx
Comment thread gcs/src/components/layout.jsx
Comment thread gcs/src/components/navbar.jsx
Comment thread gcs/src/redux/middleware/socketMiddleware.js
Comment thread gcs/src/redux/middleware/socketMiddleware.js
Comment thread gcs/src/redux/middleware/socketMiddleware.js
Comment thread gcs/src/redux/subscribers/localStorageSubscriber.js
Comment thread gcs/src/dashboard.jsx
Comment thread gcs/src/dashboard.jsx
Comment thread gcs/src/dashboard.jsx 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.

Let's hope this works smoothly 😅

@NexInfinite
Copy link
Copy Markdown
Contributor Author

FUCK IT WE BALL

@NexInfinite NexInfinite merged commit 6e2434f into release-alpha-0.1.10 Aug 18, 2025
7 checks passed
@NexInfinite NexInfinite deleted the alpha-0.1.10/615-add-example-redux-conversion-file branch August 18, 2025 22:13
1Blademaster pushed a commit that referenced this pull request Aug 19, 2025
* Fixed store, setup sockets, and started on dashboard

* Dashboard basically done

* Fixed map and refactored

* Cleaned up code and fixed mission items

* Fixes

* fixed linting

* AI Fixes

* Moved gps out and fixed messages - more to move still

* Updated messages

* More moving of variables/cleaning up

* Moved more things around :D

* formatted D:

* Fixed drone connection issues and states

* formatted

* FIXED IT WOOO

* formatted

* Kush fixes
1Blademaster added a commit that referenced this pull request Aug 19, 2025
…ut not written to the drone yet (#629)

* Attempt to add warning for unwritten changes

* Add mission tests (#616)

* Clean up mission tests

* Fix bug with max slope gradient in missionStatistics

* Add tests for getting specific missions

* Add upload mission tests

* Add unit tests for MissionController functionality

* Address copilot review comments

* Dashboard.jsx change for redux (#617)

* Fixed store, setup sockets, and started on dashboard

* Dashboard basically done

* Fixed map and refactored

* Cleaned up code and fixed mission items

* Fixes

* fixed linting

* AI Fixes

* Moved gps out and fixed messages - more to move still

* Updated messages

* More moving of variables/cleaning up

* Moved more things around :D

* formatted D:

* Fixed drone connection issues and states

* formatted

* FIXED IT WOOO

* formatted

* Kush fixes

* Fix activeTab state not updating bug (#625)

* Fix activeTab state not updating bug

* Move getFrameName function into dataFormatters file

* Attempt to add warning for unwritten changes

* Remove unused code

* Remove mission_type from write_mission_result

* Fix equality comparision statements

---------

Co-authored-by: Julian Jones <37962677+NexInfinite@users.noreply.github.com>
1Blademaster pushed a commit that referenced this pull request Sep 28, 2025
* Fixed store, setup sockets, and started on dashboard

* Dashboard basically done

* Fixed map and refactored

* Cleaned up code and fixed mission items

* Fixes

* fixed linting

* AI Fixes

* Moved gps out and fixed messages - more to move still

* Updated messages

* More moving of variables/cleaning up

* Moved more things around :D

* formatted D:

* Fixed drone connection issues and states

* formatted

* FIXED IT WOOO

* formatted

* Kush fixes
1Blademaster added a commit that referenced this pull request Sep 28, 2025
…ut not written to the drone yet (#629)

* Attempt to add warning for unwritten changes

* Add mission tests (#616)

* Clean up mission tests

* Fix bug with max slope gradient in missionStatistics

* Add tests for getting specific missions

* Add upload mission tests

* Add unit tests for MissionController functionality

* Address copilot review comments

* Dashboard.jsx change for redux (#617)

* Fixed store, setup sockets, and started on dashboard

* Dashboard basically done

* Fixed map and refactored

* Cleaned up code and fixed mission items

* Fixes

* fixed linting

* AI Fixes

* Moved gps out and fixed messages - more to move still

* Updated messages

* More moving of variables/cleaning up

* Moved more things around :D

* formatted D:

* Fixed drone connection issues and states

* formatted

* FIXED IT WOOO

* formatted

* Kush fixes

* Fix activeTab state not updating bug (#625)

* Fix activeTab state not updating bug

* Move getFrameName function into dataFormatters file

* Attempt to add warning for unwritten changes

* Remove unused code

* Remove mission_type from write_mission_result

* Fix equality comparision statements

---------

Co-authored-by: Julian Jones <37962677+NexInfinite@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants