Make the opening of files deterministic#478
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses issue #474 by making multi-file opens deterministic (e.g., drag & drop), ensuring tabs are opened in the original input order regardless of individual file load times.
Changes:
- Introduces an
openFiles()pipeline that processes files in parallel but opens tabs sequentially in original order. - Refactors file-opening logic into
processFile()and updatesContentsComponent.openFile()to beasyncwith a short UI-initialisation wait between opens. - Adds
waitForNextAnimationFrame()helper and bumps package versions.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/renderer/src/components/OpenCOR.vue | Adds processFile() and openFiles() to enforce deterministic tab opening order. |
| src/renderer/src/components/ContentsComponent.vue | Makes openFile() async and adds a small UI-settle delay to avoid tab/view init issues when opening multiple files. |
| src/renderer/src/common/common.ts | Adds waitForNextAnimationFrame() utility; minor sleep() formatting change. |
| src/renderer/package.json | Version bump. |
| package.json | Version bump. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 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.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 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.
Fixes #474.