Skip to content

Implement Loading saved JSON files into the frontend configuration wizard #299#305

Merged
CharlieWells13 merged 17 commits intomainfrom
feature/loading-and-saving-mission-configurations
Apr 14, 2026
Merged

Implement Loading saved JSON files into the frontend configuration wizard #299#305
CharlieWells13 merged 17 commits intomainfrom
feature/loading-and-saving-mission-configurations

Conversation

@ahmedbektic
Copy link
Copy Markdown
Collaborator

@ahmedbektic ahmedbektic commented Mar 29, 2026

Linked Issue

Closes #299

Summary

This PR completes the frontend saved-configuration import flow so users can load an existing simulator configuration into the wizard, edit it, and continue through the normal submission flow.

What changed

  • Added a shared import pipeline that normalizes multiple configuration sources into one canonical wizard config shape
  • Added wizard UI for loading:
    • bundled dev-team presets
    • uploaded JSON files from disk
    • browser-saved configurations from /saved-settings
  • Added shared apply logic so imported configs update the same wizard/context state used for normal editing and submission
  • Added browser-private saved configuration history support for generated settings.json plus matching task.json
  • Added /saved-settings actions to:
    • download saved artifacts
    • load saved entries back into the wizard
    • replay saved task payloads for simulation
  • Hardened the wizard so imported environment, mission, monitor, and drone-position state remains editable and persists across step navigation
  • Updated Cypress and frontend tests to cover the new import/load flow and save-before-submit flow

Why

  • Users need to start from either a dev-team preset or a previously saved configuration instead of rebuilding a scenario from scratch
  • Loaded configurations must populate the real wizard state so users can tweak them and create a new setup
  • This is the foundation for richer saved-run history and prepackaged simulator configurations

How

  • Added pure import/normalization utilities under frontend/src/services/configImport/
  • Kept parsing and schema mapping out of React components
  • Normalized supported source types into one canonical wizard config shape:
    • snapshot bundle (settings + task)
    • raw task payload
    • finalized AirSim settings.json
    • dev-team preset config
  • Applied imported configs through shared context/model boundaries rather than ad hoc per-component setters
  • Wired preset import, file upload import, and saved-settings load actions through the same normalization + apply path
  • Added tests for normalization, apply behavior, import UI, saved-settings load behavior, and Cypress end-to-end wizard flows

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation update
  • Code refactoring
  • Test addition/update

Acceptance Criteria Verification (from linked issue)

  • AC1: ability to save the JSON file generated by the simulator
  • AC2: frontend can load in a JSON file via a box where the user can select and import a file
  • AC3: frontend then updates via said file when a button is clicked
  • AC4: all mission config steps are correctly updated when frontend load is initiated
  • AC5: all drones are correctly placed when frontend load is initiated

@CharlieWells13
Copy link
Copy Markdown
Collaborator

Good start Ahmed, I look forward to seeing the completion of this in the coming weeks!

Comment thread .github/workflows/backend-ci.yml Fixed
Comment thread .github/workflows/frontend-ci.yml Fixed
@ahmedbektic ahmedbektic changed the title Progress towards #299 (Implement Loading saved JSON files into the frontend configuration wizard) Implement Loading saved JSON files into the frontend configuration wizard #299 Apr 12, 2026
ahmedbektic and others added 9 commits April 11, 2026 23:13
…ntain permissions'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…ntain permissions'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Collaborator

@CharlieWells13 CharlieWells13 left a comment

Choose a reason for hiding this comment

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

Hello, this is a great start, here's what is good:

  • saving and loading the presets themselves
  • the saved setting page

Big issue:
The presets you have set up are exact copies in name of the names of the mission types on the first page, in both name a description
We will need to have a deeper discussion on how to properly set up these presets and how the program actually functions in class today on how to properly set these up.

Small issue:
Layout is a little too vertical for my liking, not a big deal at all but something small we should fix, i have henry working on it rn

CharlieWells13 and others added 2 commits April 14, 2026 16:43
Kept feature branch routeState/alert pattern and merged in
clearAllDrones() fix from main. Dropped frontend/.env (deleted in main).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@CharlieWells13 CharlieWells13 self-requested a review April 14, 2026 21:49
Copy link
Copy Markdown
Collaborator

@CharlieWells13 CharlieWells13 left a comment

Choose a reason for hiding this comment

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

good now, renamed a bit

CharlieWells13 and others added 2 commits April 14, 2026 16:51
- Update preset name in HorizontalLinearStepper test to match rename
- Only call clearAllDrones when no importedConfig in route state,
  preventing it from wiping drones loaded via SavedSettings

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Cypress test was looking for old preset name after rename.
format:check reverted to format (like main) to unblock merge;
prettier formatting cleanup to follow in a separate PR.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@CharlieWells13 CharlieWells13 merged commit e638477 into main Apr 14, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Implement Loading saved JSON files into the frontend configuration wizard

3 participants