Skip to content

Add Mission Control Panel widget and mini-widget#2240

Merged
rafaellehmkuhl merged 8 commits into
bluerobotics:masterfrom
ArturoManzoli:2032-set-wp-as-active
Feb 27, 2026
Merged

Add Mission Control Panel widget and mini-widget#2240
rafaellehmkuhl merged 8 commits into
bluerobotics:masterfrom
ArturoManzoli:2032-set-wp-as-active

Conversation

@ArturoManzoli

@ArturoManzoli ArturoManzoli commented Nov 18, 2025

Copy link
Copy Markdown
Contributor
  • Add Mission control panel widget and mini-widget;
  • Add skip to next and previous waypoints via control panel;
  • Add mission play, pause and stop via control panel;
Screenshare.-.2026-01-27.12_14_26.PM.mp4

Close #2119
Partially solves issue #2141

@ES-Alexander

Copy link
Copy Markdown
Contributor

From a quick look through the code (haven't tested yet), it generally looks like it makes sense :-)

I'm curious whether there's any special functionality in the main widget version of the control panel though - if not it should maybe only be available as a mini widget (which should already be able to go into a collapsible container if someone wants it in one)?

In terms of state tracking, it could be nice to differentiate the "visited" waypoints (not just the current target). I'm not sure whether we'd consider it sufficient to just display everything prior to the target as visited, or if we think it's worth actually keeping track of which ones have been reported as visited (and potentially even count how many times)...

I think it could be nice to display the "current target" waypoint as a target icon - possibly just adding an extra ring around it? As I understand it targets are a well-understood symbol, which should make it more immediately obvious what it means for that waypoint to be highlighted/different.

@ArturoManzoli

Copy link
Copy Markdown
Contributor Author

I'm curious whether there's any special functionality in the main widget version of the control panel though - if not it should maybe only be available as a mini widget (which should already be able to go into a collapsible container if someone wants it in one)?

I agree that having both the mini and regular widgets for certain features can feel redundant, but for Mission Planning there are two main reasons to keep both:

  • Some less-experienced users may find it difficult or unintuitive to build a widget using the collapsible container combined with the mini-widget. Since Mission Planning is a core component of Cockpit, providing it in both mini and regular widget formats makes sense.
  • The regular Mission Planning widget is still in an early stage. As discussed earlier, we plan to add many more mission-control features, switches, menus, and monitoring elements that wouldn’t have enough space in a mini-widget.

In terms of state tracking, it could be nice to differentiate the "visited" waypoints (not just the current target). I'm not sure whether we'd consider it sufficient to just display everything prior to the target as visited, or if we think it's worth actually keeping track of which ones have been reported as visited (and potentially even count how many times)...

Agreed; Issue #2246 has been created to implement that.

I think it could be nice to display the "current target" waypoint as a target icon - possibly just adding an extra ring around it? As I understand it targets are a well-understood symbol, which should make it more immediately obvious what it means for that waypoint to be highlighted/different.

“Targets” does refer to a location to go, but it also carries weapon and shooting related meanings, which I think doesn’t really fit the friendly tone we want our products to have.

@rafaellehmkuhl

rafaellehmkuhl commented Jan 13, 2026

Copy link
Copy Markdown
Member

@ArturoManzoli can you rebase this PR? I want to resume its review.

@ArturoManzoli

Copy link
Copy Markdown
Contributor Author

@ArturoManzoli can you rebase this PR? I want to resume its review.

@rafaellehmkuhl Done!

@rafaellehmkuhl rafaellehmkuhl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Very nice addition.
Three things to be worked on:

  1. The current WP indication is overflowing in the mini-widget.
  2. The current WP indication is not present in the regular widget.
  3. Since we are removing the controls from the map widget, I believe we should add a migration that adds the regular mission control widget by default in the views that have map widgets, probably on the bottom-right corner. It should be done only once, so needs a migration flag (something like hasAddedMissionControlWidgetAfterMigration) in the migrations.ts file.
Image

Comment thread src/stores/mission.ts
Comment on lines +350 to +356
/**
*
*/
downloadMissionFromVehicle: () => Promise<void>
/**
*
*/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Missing docs.

@ArturoManzoli ArturoManzoli force-pushed the 2032-set-wp-as-active branch 3 times, most recently from c700775 to 92b9c12 Compare January 27, 2026 15:04
@ArturoManzoli

Copy link
Copy Markdown
Contributor Author
  1. The current WP indication is overflowing in the mini-widget.

Couldn't reproduce here, but added some constrains so it won't happen again anyway. Could have been an issue specific to your OS.

  1. The current WP indication is not present in the regular widget.

Added that now!

  1. Since we are removing the controls from the map widget, I believe we should add a migration that adds the regular mission control widget by default in the views that have map widgets, probably on the bottom-right corner. It should be done only once, so needs a migration flag (something like hasAddedMissionControlWidgetAfterMigration) in the migrations.ts file.

Tried doing the migration inside the migrations.ts file, but it after speaking in private with @rafaellehmkuhl we decided that the best solution was to do the migrations inside the widgetManager store.

@ES-Alexander

ES-Alexander commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

Not a blocker for this PR, but just flagging that we've had a user request to have "live status updates" during missions, like those provided in the stats page during planning.

For example:

  • remaining time / updated ETA
  • percentage of mission completed

If you've got motivation to work on that for this PR then great, otherwise we can raise an issue for it instead :-)

@rafaellehmkuhl

Copy link
Copy Markdown
Member

Not a blocker for this PR, but just flagging that we've had a user request to have "live status updates" during missions, like those provided in the stats page during planning.

For example:

  • remaining time / updated ETA
  • percentage of mission completed

If you've got motivation to work on that for this PR then great, otherwise we can raise an issue for it instead :-)

Awesome feature!

I believe it should be on a separate PR, but Arturo can decide on that.

@ArturoManzoli

Copy link
Copy Markdown
Contributor Author

Not a blocker for this PR, but just flagging that we've had a user request to have "live status updates" during missions, like those provided in the stats page during planning.

For example:

  • remaining time / updated ETA
  • percentage of mission completed

If you've got motivation to work on that for this PR then great, otherwise we can raise an issue for it instead :-)

That would be very nice! And also very fun to implement. We could reuse some of the Mission estimates code, and that would make things quicker to build.
But I'm with @rafaellehmkuhl, we should add those features in a separate PR, because this one already took some time to be merged.

I've created an issue so this feature can be added after the Mission Control Panel is merged

@ArturoManzoli

Copy link
Copy Markdown
Contributor Author

I believe it should be on a separate PR, but Arturo can decide on that.

Indeed, this would require a separate one.

This one is ready to review @rafaellehmkuhl

@ES-Alexander ES-Alexander added the docs-needed Change needs to be documented label Feb 8, 2026
Signed-off-by: Arturo Manzoli <arturomanzoli@gmail.com>
…n functions

Signed-off-by: Arturo Manzoli <arturomanzoli@gmail.com>
…sion functions

Signed-off-by: Arturo Manzoli <arturomanzoli@gmail.com>
Signed-off-by: Arturo Manzoli <arturomanzoli@gmail.com>

@rafaellehmkuhl rafaellehmkuhl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Regarding the code there's only one consideration I've done in the appended comment.

Regarding the functionality itself, its working very very well, and it is super useful.

There's also a bug that needs to be fixed around the menu not being openable after adding the new widgets:

bug-mission-control.mp4

Comment thread src/stores/widgetManager.ts Outdated
Comment on lines +805 to +848
const migrateMissionControlPanelForCurrentUser = (): void => {
const currentUsername = missionStore.username
if (!currentUsername || usersMigratedMissionControlPanel.value.includes(currentUsername)) {
return
}

// Gets the MissionControlPanel widget template from defaults.ts
const missionControlPanelTemplate = widgetProfiles
.flatMap((profile) => profile.views)
.flatMap((view) => view.widgets)
.find((widget) => widget.component === WidgetType.MissionControlPanel)

if (missionControlPanelTemplate) {
let hasChanges = false
savedProfiles.value.forEach((profile) => {
profile.views.forEach((view) => {
const hasMap = view.widgets.some((w) => w.component === WidgetType.Map)
const hasMissionCP = view.widgets.some((w) => w.component === WidgetType.MissionControlPanel)
// Only add the MissionControlPanel widget if there is a Map widget and no MissionControlPanel widget yet
if (hasMap && !hasMissionCP) {
addWidget(
{
component: missionControlPanelTemplate.component,
name: missionControlPanelTemplate.name,
options: missionControlPanelTemplate.options,
icon: '',
},
view
)
const addedWidget = view.widgets[0]
if (addedWidget && addedWidget.component === WidgetType.MissionControlPanel) {
addedWidget.position = missionControlPanelTemplate.position
addedWidget.size = missionControlPanelTemplate.size
}
hasChanges = true
}
})
})

if (hasChanges) {
usersMigratedMissionControlPanel.value.push(currentUsername)
}
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could we move this method to a dedicated file and just call it from here based on the watcher?

It can be a generic method called something like "performWidgetsMigrations(...)", to which the necessary parameters are passed. This is so we don't have an entire migration logic for a specific widget here on the widgets store, which is already kind of bloated and would start to get confusing. Ideally inside this generic performWidgetsMigrations(...) method we have this performMapMissionControlPanelMigration(...). This way it is easily extendable.

This dedicated file can contain Pinia/Vue logic, there's no problem. You can use the setupPostPiniaConnections if you prefer, as we do on some other migration logics.

…widget and mini-widget

Signed-off-by: Arturo Manzoli <arturomanzoli@gmail.com>
Signed-off-by: Arturo Manzoli <arturomanzoli@gmail.com>
Signed-off-by: Arturo Manzoli <arturomanzoli@gmail.com>
@ArturoManzoli

Copy link
Copy Markdown
Contributor Author

There's also a bug that needs to be fixed around the menu not being openable after adding the new widgets:

I wasn't able to reproduce the bug here. Could you try again with this new patch, please?

@rafaellehmkuhl rafaellehmkuhl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

All good!

As discussed in private the "skip to this waypoint" on the context-menu is not appearing, so I will just remove the mentions to this issue from the description before the merge.

@rafaellehmkuhl rafaellehmkuhl merged commit 6c4c2cd into bluerobotics:master Feb 27, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-needed Change needs to be documented

Projects

None yet

Development

Successfully merging this pull request may close these issues.

frontend: Flight mode misses a mission pause and stop buttons

3 participants