Skip to content

[Enhancement]: Create a new API route for updating simulation and connect to the details page #36

@tomvothecoder

Description

@tomvothecoder

Is your feature request related to a problem?

No. This enhancement implements planned functionality to support editing and maintaining simulation metadata over time.

Describe the solution you'd like

  • Add a new API route to update an existing simulation by ID (e.g. PATCH /api/simulations/{simulation_id}).

  • The route should:

    • Support partial updates (PATCH semantics).
    • Validate input using FastAPI request/response schemas.
    • Update audit fields such as last_updated_at and last_updated_by.
  • Update the Simulation Details page to:

    • Enable editing of selected simulation fields.
    • Submit changes to the new update endpoint.
    • Display success/error feedback and refresh the displayed data after updates.
  • Ensure changes are consistently reflected across:

    • FastAPI schemas (create/update vs. read models as needed)
    • SQLAlchemy models (including constraints and types)
    • TypeScript interfaces/types used by the frontend API layer and UI components

Describe alternatives you've considered

  • Deferring edit functionality and keeping simulations immutable after creation.
  • Limiting updates to backend-only or admin-only workflows.

Additional context

  • This feature completes the CRUD lifecycle for simulations.
  • It enables iterative refinement of metadata and supports future enhancements such as change history, permissions, and role-based access control.
  • Special care should be taken to keep backend and frontend models in sync to avoid type drift.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions