Add some file-related events to let users know about a file having been opened, closed, etc.#492
Merged
agarny merged 7 commits intoopencor:mainfrom Apr 15, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds file lifecycle events to the OpenCOR Vue component API so consumers can react to files being opened/closed (and to open failures), alongside some related event-payload refactoring and version/dependency bumps.
Changes:
- Emit
fileOpened/fileClosedfromContentsComponentand forward them as a publicfileevent fromOpenCOR.vue(plus emitfileissue events on open failures). - Refactor
externalDataandsimulationDataevent payloads into discriminated unions with atypefield; update example apps accordingly. - Bump package versions and update
postcss(and lockfiles).
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/renderer/src/components/views/SimulationExperimentView.vue | Returns typed externalData/simulationData result events (added/updated vs issue). |
| src/renderer/src/components/OpenCOR.vue | Wires fileOpened/fileClosed into a new public file event; emits file issue events from processFile failures; updates issue payloads for other events. |
| src/renderer/src/components/ContentsComponent.vue | Adds and emits fileOpened/fileClosed component events; updates returned event payloads to include type. |
| src/renderer/src/AppWithSimulationData.vue | Updates example handler to switch on event.type. |
| src/renderer/src/AppWithExternalData.vue | Updates example handler to switch on event.type. |
| src/renderer/package.json | Bumps renderer package version and postcss. |
| src/renderer/index.ts | Adds new file event type and refactors event payload types into discriminated unions. |
| src/renderer/bun.lock | Lockfile updates for renderer dependency bump(s). |
| package.json | Bumps root package version and postcss. |
| bun.lock | Root lockfile updates for dependency bump(s). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
... to account for our new event data structure.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #491.