-
Notifications
You must be signed in to change notification settings - Fork 4
Add a Simulation Property Editor component to our SimulationExperimentView component #368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… peer dependencies. They were originally here so that we could easily find out when a new version of them is available (since we "manually" import them), but it's not good to have things under `peerDependencies` unless actually needed. So, removing them... which means that we will need to "manually" check whether a new version of `mathjs` and/or `plotly.js-gl2d-dist-min` is available.
… the toolbar. The objective is for the center template to always in the same place.
…igonometric operators.
…to show a context menu.
…to the settings. Maybe temporary... or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds a comprehensive Simulation Property Editor component to the SimulationExperimentView, enabling users to configure simulation parameters, solver settings, and interactive UI JSON through a dedicated settings dialog.
Changes:
- Refactored C++ API to better organize SED-ML related functions by entity type (SedModel, SedOneStep, SedUniformTimeCourse, SolverCvode)
- Added a new SimulationExperimentViewSettingsDialog component with tabs for simulation, solvers, interactive, and miscellaneous settings
- Redesigned IssuesView component with improved visual design showing issue counts and severity indicators
- Enhanced interactive mode with improved run tracking, color selection, and live update controls
Reviewed changes
Copilot reviewed 27 out of 29 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/renderer/src/libopencor/src/sed.h | Reorganized function declarations by entity type (SedModel, SedOneStep, SedUniformTimeCourse, SolverCvode) |
| src/renderer/src/libopencor/src/sed.cpp | Renamed and reorganized functions, added SolverCvode API for accessing CVODE's maximum step |
| src/renderer/src/libopencor/src/main.cpp | Updated exports to match renamed functions |
| src/renderer/src/libopencor/locSedApi.ts | Renamed simulation classes (e.g., SedSimulationUniformTimeCourse → SedUniformTimeCourse), added SolverCvode class |
| src/renderer/src/libopencor/locUiJsonApi.ts | Renamed uiJsonIssues to validateUiJson, added removeNulls utility, improved null checking |
| src/renderer/src/libopencor/locLoggerApi.ts | Added INFORMATION issue type to enum |
| src/renderer/src/libopencor/locApi.ts | Updated exports for renamed classes and validation function |
| src/renderer/src/components/widgets/GraphPanelWidgetPalette.ts | Changed palette structure from array to Record for color name lookups |
| src/renderer/src/components/views/SimulationExperimentView.vue | Major updates: added settings dialog integration, improved run tracking UI, enhanced interactive controls |
| src/renderer/src/components/views/IssuesView.vue | Complete redesign with header, severity badges, and improved visual layout |
| src/renderer/src/components/dialogs/SimulationExperimentViewSettingsDialog.vue | New 1359-line component providing comprehensive simulation and UI JSON configuration |
| src/renderer/src/components/dialogs/BaseDialog.vue | Added isDialogActive export for checking if any dialog is open |
| src/renderer/src/common/common.ts | Added isDivisible and downloadFile utility functions |
| package.json | Updated dependencies and version to 0.20260128.0 |
| src/preload/index.ts | Updated API exports to match renamed functions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…E's maximum step.
… model parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 27 out of 29 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| function removeTrace(plotIndex: number, traceIndex: number) { | ||
| const plot = localSettings.value.interactive.uiJson.output.plots[plotIndex]; | ||
| if (plot?.additionalTraces && plot.additionalTraces.length > 0) { |
Copilot
AI
Jan 28, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The removeTrace function is called with traceIndex = -1 for the main trace (line 458), but the function implementation at line 991-996 only handles positive indices for additionalTraces. When traceIndex is -1, the function will try to splice at index -1, which will remove the last element from additionalTraces instead of removing the main trace. This could lead to unexpected behavior when trying to delete the main trace.
| if (plot?.additionalTraces && plot.additionalTraces.length > 0) { | |
| // traceIndex === -1 is used for the main trace; clear its values instead of | |
| // splicing additionalTraces (which would remove the last element for -1). | |
| if (!plot) { | |
| return; | |
| } | |
| if (traceIndex === -1) { | |
| // Remove/clear the main trace for this plot. | |
| // Keep the plot itself and any additional traces intact. | |
| if (Object.prototype.hasOwnProperty.call(plot, 'xValue')) { | |
| // @ts-ignore – plot is a loosely-typed object from uiJson | |
| plot.xValue = ''; | |
| } | |
| if (Object.prototype.hasOwnProperty.call(plot, 'yValue')) { | |
| // @ts-ignore – plot is a loosely-typed object from uiJson | |
| plot.yValue = ''; | |
| } | |
| return; | |
| } | |
| if (traceIndex >= 0 && plot.additionalTraces && plot.additionalTraces.length > 0) { |
Fixes #289.