Further improve on the method to retrieve simulation data from outside of OpenCOR#444
Further improve on the method to retrieve simulation data from outside of OpenCOR#444agarny merged 4 commits intoopencor:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates OpenCOR’s external simulation-data API (Fixes #443) by replacing one-off data retrieval with a tracking-based mechanism that emits updated simulation data whenever the interactive simulation refreshes.
Changes:
- Replace the exposed
simulationData()API withtrackSimulationData()/untrackSimulationData()/untrackAllSimulationData()and emitsimulationDataevents on updates. - Propagate a “simulation data changed” signal from
SimulationExperimentViewup toOpenCOR, triggering re-emission of tracked simulation data. - Bump package versions and remove the no-longer-used
HUGE_DELAYconstant.
Reviewed changes
Copilot reviewed 16 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/renderer/src/components/widgets/InputWidget.vue | Minor ordering/formatting change around emits/props. |
| src/renderer/src/components/widgets/InputScientificNumber.vue | Minor formatting (blank line) for consistency. |
| src/renderer/src/components/widgets/GraphPanelWidget.vue | Minor formatting (blank line) for consistency. |
| src/renderer/src/components/views/SimulationExperimentView.vue | Adds simulationData emit to signal that interactive simulation data has refreshed. |
| src/renderer/src/components/propertyEditors/SimulationPropertyEditor.vue | Removes a now-unneeded @ts-expect-error comment. |
| src/renderer/src/components/propertyEditors/PropertyEditor.vue | Reorders columnWidth definition after emits (formatting/structure). |
| src/renderer/src/components/dialogs/YesNoQuestionDialog.vue | Moves defineEmits after defineProps (formatting/structure). |
| src/renderer/src/components/dialogs/OpenRemoteDialog.vue | Minor formatting (blank line) for consistency. |
| src/renderer/src/components/dialogs/OkMessageDialog.vue | Minor formatting (blank line) for consistency. |
| src/renderer/src/components/OpenCOR.vue | Implements tracking/untracking + re-emits updated tracked simulation data to external consumers. |
| src/renderer/src/components/ContentsComponent.vue | Propagates simulationData signal upward; simplifies simulation-only data retrieval retry logic. |
| src/renderer/src/common/constants.ts | Removes HUGE_DELAY constant (no longer used). |
| src/renderer/src/AppWithSimulationData.vue | Updates example usage to track/untrack model parameters and react to simulationData events. |
| src/renderer/package.json | Bumps renderer package version. |
| src/renderer/index.ts | Adds exported TS interfaces for exposed methods and emitted events. |
| src/renderer/index.d.ts | Re-exports new public types. |
| src/renderer/bun.lock | Lockfile update (node-releases). |
| package.json | Bumps root package version. |
| bun.lock | Lockfile update (node-releases). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 19 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Fixes #443.