Skip to content

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
agarny:issue491
Apr 15, 2026
Merged

Add some file-related events to let users know about a file having been opened, closed, etc.#492
agarny merged 7 commits intoopencor:mainfrom
agarny:issue491

Conversation

@agarny
Copy link
Copy Markdown
Contributor

@agarny agarny commented Apr 15, 2026

Fixes #491.

Copilot AI review requested due to automatic review settings April 15, 2026 23:00
Copy link
Copy Markdown

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

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/fileClosed from ContentsComponent and forward them as a public file event from OpenCOR.vue (plus emit file issue events on open failures).
  • Refactor externalData and simulationData event payloads into discriminated unions with a type field; 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.

Comment thread src/renderer/index.ts
Comment thread src/renderer/index.ts
Comment thread src/renderer/src/components/OpenCOR.vue Outdated
Comment thread src/renderer/src/components/views/SimulationExperimentView.vue Outdated
@agarny agarny merged commit 10b3adf into opencor:main Apr 15, 2026
9 checks passed
@agarny agarny deleted the issue491 branch April 15, 2026 23:22
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 some file-related events to let users know about a file having been opened, closed, etc.

2 participants