Skip to content

Display drone connect progress bar on reboot#1035

Merged
Turnlings merged 7 commits intomainfrom
1033-display-drone-connect-progress-bar-on-reboot
Mar 2, 2026
Merged

Display drone connect progress bar on reboot#1035
Turnlings merged 7 commits intomainfrom
1033-display-drone-connect-progress-bar-on-reboot

Conversation

@Turnlings
Copy link
Copy Markdown
Contributor

@Turnlings Turnlings commented Mar 1, 2026

Display the connection progress bar rather than the default loader when connecting on autopilot reboot.

image

Required the backend to pass connecting status.

NOTE: there is an existing issue where the frontend will essentially hang if fgcs loses connection to the drone while rebooting. It individually waits with a timeout for each param it will take ages to reach any fail state.

Copilot AI review requested due to automatic review settings March 1, 2026 14:50
@Turnlings Turnlings linked an issue Mar 1, 2026 that may be closed by this pull request
@Turnlings Turnlings self-assigned this Mar 1, 2026
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 updates the reboot-autopilot flow so the GCS can show the existing connection progress UI (progress bar + status) instead of a generic loader while the autopilot is rebooting and the backend is reconnecting.

Changes:

  • Backend emits a new connecting Socket.IO event during reboot_autopilot reconnect attempts.
  • GCS socket middleware listens for connecting and sets droneConnection.connecting = true.
  • Autopilot reboot modal switches from a <Loader /> to <ConnectionProgress /> while connecting is true.

Reviewed changes

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

File Description
radio/app/endpoints/autopilot.py Emits a new connecting event during reboot reconnect.
gcs/src/redux/middleware/socketMiddleware.js Listens for connecting and attempts to clear connecting on reboot failure.
gcs/src/components/params/autopilotRebootModal.jsx Renders ConnectionProgress in the reboot modal while connecting.
Comments suppressed due to low confidence (1)

gcs/src/redux/middleware/socketMiddleware.js:400

  • The connecting socket handler declares (msg) but never uses it. If eslint/no-unused-vars is enabled, this will fail lint; consider removing the parameter or renaming it to _msg to make the intent explicit.
        socket.socket.on("connecting", (msg) => {
          store.dispatch(setConnecting(true))
        })

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread radio/app/endpoints/autopilot.py Outdated
Comment thread gcs/src/redux/middleware/socketMiddleware.js Outdated
Comment thread gcs/src/components/params/autopilotRebootModal.jsx
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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread gcs/src/redux/middleware/socketMiddleware.js
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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread gcs/src/redux/middleware/socketMiddleware.js
@Turnlings Turnlings requested a review from a team March 1, 2026 15:58
@1Blademaster
Copy link
Copy Markdown
Member

NOTE: there is an existing issue where the frontend will essentially hang if fgcs loses connection to the drone while rebooting. It individually waits with a timeout for each param it will take ages to reach any fail state.

Can we think of a way to fix this? In another ticket; not this one maybe?

Comment thread radio/app/endpoints/autopilot.py Outdated
@Turnlings
Copy link
Copy Markdown
Contributor Author

Turnlings commented Mar 1, 2026

NOTE: there is an existing issue where the frontend will essentially hang if fgcs loses connection to the drone while rebooting. It individually waits with a timeout for each param it will take ages to reach any fail state.

Can we think of a way to fix this? In another ticket; not this one maybe?

I think the loop for checking the params might just need a check to see if the drone it is trying to fetch the params from is still "active", else it should return early and fail.

If thats awkward maybe only do it when fetching a param fails

@Turnlings Turnlings requested a review from 1Blademaster March 1, 2026 19:02
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.

Code looks good, can't test atm will do later. Maybe you can also take a look at #980 as well?

@Turnlings Turnlings merged commit a2536f7 into main Mar 2, 2026
8 checks passed
@Turnlings Turnlings deleted the 1033-display-drone-connect-progress-bar-on-reboot branch March 2, 2026 12:42
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.

Display drone connect progress bar on reboot

3 participants