Display drone connect progress bar on reboot#1035
Conversation
There was a problem hiding this comment.
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
connectingSocket.IO event duringreboot_autopilotreconnect attempts. - GCS socket middleware listens for
connectingand setsdroneConnection.connecting = true. - Autopilot reboot modal switches from a
<Loader />to<ConnectionProgress />whileconnectingis 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
connectingsocket 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_msgto 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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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 |
1Blademaster
left a comment
There was a problem hiding this comment.
Code looks good, can't test atm will do later. Maybe you can also take a look at #980 as well?
Display the connection progress bar rather than the default loader when connecting on autopilot reboot.
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.