Skip to content

Conversation

@agarny
Copy link
Contributor

@agarny agarny commented Jan 28, 2026

Fixes #289.

agarny added 22 commits December 2, 2025 13:10
… 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.
Copilot AI review requested due to automatic review settings January 28, 2026 03:47
Copy link

Copilot AI left a 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.

Copy link

Copilot AI left a 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) {
Copy link

Copilot AI Jan 28, 2026

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.

Suggested change
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) {

Copilot uses AI. Check for mistakes.
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.

Add a Simulation Property Editor component to our SimulationExperimentView component

1 participant