Mission Planning: Add mission library with save, load and import/export#2795
Mission Planning: Add mission library with save, load and import/export#2795ArturoManzoli wants to merge 2 commits into
Conversation
Automated PR Review (Claude)0. SummaryVerdict: MINOR SUGGESTIONS Critical items to address: 1.1 This PR adds a Mission Library feature to the mission-planning view: a modal to browse, save, load, delete, import, and export missions. Missions are persisted under 1. Correctness & Implementation Bugs1.1
1.2
1.3
2. AGENTS.md Adherence2.1
2.2 3. Security — ✅4. Performance4.1 5. UI / UX — ✅6. Code Quality & Style6.1 6.2 7. Commit Hygiene — ✅Commits are well-scoped, one logical change each, with clear conventional-commit-style subjects. No noise commits or leftover fixups. 8. Tests — ✅9. Documentation — ✅10. Nitpicks / Optional10.1 10.2 Generated by Claude. This is advisory; a human reviewer must still approve. |
3c568f1 to
9640c81
Compare
|
/review |
Automated PR Re-review 2 (Claude)Comparing The incremental diff included the full PR content (consistent with a rebase/force-push that rewrote the branch), so re-checking was performed against the complete Previous findings status
New findings0. SummaryVerdict: MINOR SUGGESTIONS The three new commits since the last review ( 1. Correctness & Implementation Bugs — ✅2. AGENTS.md Adherence — ✅3. Security — ✅4. Performance — ✅5. UI / UX — ✅6. Code Quality & Style — ✅7. Commit Hygiene7.1 8. Tests — ✅9. Documentation — ✅10. Nitpicks / Optional — ✅Generated by Claude. This is advisory; a human reviewer must still approve. |
Will be done on the second PR on this sequence. For this one, adding a composable for "open the modal, hand it to a handler, call loadDraftMission" is over-engineering for a single call site. |
There was a problem hiding this comment.
I will continue the review later, but one point here to have in mind: I believe the automation in the commit creation ended up separating logical changes in more commits than it should. Here it ended up separating a lot of changes that should be together, increasing the review burden as one needs to go back and fourth between commits that are just doing the same logical change.
| @@ -128,6 +129,7 @@ export const useAppInterfaceStore = defineStore('responsive', { | |||
| }, | |||
| isConfigModalVisible: (state) => state.configModalVisibility, | |||
| isVideoLibraryVisible: (state) => state.videoLibraryVisibility, | |||
| isMissionLibraryVisible: (state) => state.missionLibraryVisibility, | |||
There was a problem hiding this comment.
There's no need to have this kind of code change in a separate commit. It has no purpose without the mission library itself.
| const homeMarkerPosition = ref<WaypointCoordinates | undefined>(undefined) | ||
|
|
||
| // Fallback vehicle type used by vehicle-specific planning features when no vehicle is connected. | ||
| const plannedVehicleType = useBlueOsStorage<MavType | undefined>('cockpit-planned-vehicle-type', undefined) |
There was a problem hiding this comment.
This is a strange resource. Does it make sense to save the vehicle type inside a vehicle settings?
| import { MavType } from '@/libs/connection/m2r/messages/mavlink2rest-enum' | ||
| import { useAppInterfaceStore } from '@/stores/appInterface' | ||
| import { useMainVehicleStore } from '@/stores/mainVehicle' | ||
| import { useMissionStore } from '@/stores/mission' |
There was a problem hiding this comment.
If we keep the "planned vehicle type" feature, this kind of change should be on the same commit.
9640c81 to
d304c01
Compare
As discussed in private, I have reorganized the commit structure to better reflect the logical changes |
Add a "Planning for" selector (Surface Boat, Submarine, UAV, Ground Rover) to the planner sidebar that users can pick while no vehicle is connected, backed by a new `plannedVehicleType` store field (persisted under `cockpit-planned-vehicle-type`) and an `effectiveVehicleType` reader that prefers the connected vehicle's real type and falls back to the planned one. Mission estimates and vehicle-specific UI cues now consume `effectiveVehicleType` so they keep working offline, and the Surface Boat options gear is hidden when no vehicle is online since its tweaks never reach the generic offline estimator anyway.
Replace the toolbar's separate save/load buttons with a single bookshelf entry that opens a new MissionLibraryModal — a grid of preview cards (thumbnail, name, date, vehicle type, stats pills) for the user's saved missions, with save and detail dialogs and an "Open in Google Earth" link. Entries are persisted under `cockpit-mission-library` (BlueOS-synced when available) and captured at save time with a baked SVG thumbnail and a precomputed `MissionEstimatesSnapshot`, so summaries render without recomputing against the currently planned mission. Loads go through a placement-choice dialog where "Keep original location" replays the saved settings via loadDraftMission — the repositioning path arrives in a follow-up PR.
d304c01 to
6c78b01
Compare
|
/review |
Automated PR Re-review 3 (Claude)Comparing The branch was force-pushed/rebased since the last review (the incremental diff includes unrelated changes to The commit history was reorganized from 8 commits down to 2 clean logical commits ( Previous findings status
Discussion since last review
New findings0. SummaryVerdict: MINOR SUGGESTIONS This PR adds a mission library feature with save, load, import/export of 1. Correctness & Implementation Bugs — ✅2. AGENTS.md Adherence — ✅3. Security — ✅4. Performance — ✅5. UI / UX5.1
Per AGENTS.md, every discrete user interaction should produce a 6. Code Quality & Style6.1 7. Commit Hygiene — ✅8. Tests — ✅9. Documentation — ✅10. Nitpicks / Optional10.1 Generated by Claude. This is advisory; a human reviewer must still approve. |
|
@ArturoManzoli let me know if this is ready for review or you still plan on doing changes. |
It's ready to review, now! Thanks |
.cmpfiles.cockpit-mission-libraryandcockpit-mission-library-thumbnails, keyed by stable mission id.First of two sequential PRs splitting #2654 — the follow-up lands on top of this one:
mission-library-free-placement— free-placement workflow to drop, drag/scale/rotate and append a library mission before commit, plus a context-menu library submenu, endpoint-biased inserts for waypoint/survey/path/library actions, and orange highlight of the mission's first and last waypoints.