-
Notifications
You must be signed in to change notification settings - Fork 4
Cleaning up #406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleaning up #406
Conversation
There was a problem hiding this 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 PR is a broad cleanup/refactor across the Electron main process and renderer code, primarily standardizing function definitions (moving from function foo() to const foo = () => {}) and doing small organization tidy-ups.
Changes:
- Standardize many helper/handler functions to
constarrow functions across TS/Vue files. - Minor refactor in
GraphPanelWidget.vue(moveresizenext todefineExpose) and inContentsComponent.vue(group methods/watchers and relocatedefineExpose). - Simplify interactive UI JSON initialization in
SimulationExperimentView.vueby inlining the priorinitialUiJson()helper.
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/renderer/src/libopencor/locVersionApi.ts | Convert exported version helpers to const arrow functions. |
| src/renderer/src/libopencor/locUiJsonApi.ts | Convert UI JSON type guards/clean/validate helpers to const arrow functions. |
| src/renderer/src/libopencor/locLoggerApi.ts | Convert wasmIssuesToIssues helper to const arrow function. |
| src/renderer/src/libopencor/locApi.ts | Convert initialiseLocApi to const arrow function. |
| src/renderer/src/components/widgets/InputWidget.vue | Convert local event helpers to const arrow functions. |
| src/renderer/src/components/widgets/InputScientificNumber.vue | Convert input handlers/parsing helpers to const arrow functions. |
| src/renderer/src/components/widgets/GraphPanelWidget.vue | Move/convert resize and other handlers to const arrow functions. |
| src/renderer/src/components/views/SimulationExperimentView.vue | Convert many handlers/helpers to const arrow functions; inline interactive UI JSON defaulting. |
| src/renderer/src/components/views/IssuesView.vue | Convert severity/icon helpers to const arrow functions. |
| src/renderer/src/components/propertyEditors/SimulationPropertyEditor.vue | Convert update handler to const arrow function. |
| src/renderer/src/components/propertyEditors/PropertyEditor.vue | Convert cell-edit handler to const arrow function. |
| src/renderer/src/components/dialogs/SimulationExperimentViewSettingsDialog.vue | Convert UI JSON editing helpers/tooltips to const arrow functions. |
| src/renderer/src/components/dialogs/SettingsDialog.vue | Convert dialog init/OK handlers to const arrow functions. |
| src/renderer/src/components/dialogs/OpenRemoteDialog.vue | Convert emit helpers to const arrow functions. |
| src/renderer/src/components/dialogs/BaseDialog.vue | Convert dialog lifecycle and dialog-state helpers to const arrow functions. |
| src/renderer/src/components/OpenCOR.vue | Convert many UI/menu/update handlers to const arrow functions. |
| src/renderer/src/components/MainMenu.vue | Convert onClick handler inside onMounted to const arrow function. |
| src/renderer/src/components/ContentsComponent.vue | Reorder file-tab methods/watchers and relocate defineExpose; convert methods to const arrows. |
| src/renderer/src/common/vueCommon.ts | Convert theme helpers to const arrow functions. |
| src/renderer/src/common/rendererServer.ts | Convert renderer server start/stop to const arrow functions. |
| src/renderer/src/common/locCommon.ts | Convert various utility exports to const arrow functions. |
| src/renderer/src/common/gitHubIntegration.ts | Convert GitHub cache/token helpers to const arrow functions. |
| src/renderer/src/common/firebaseConfig.ts | Convert missingFirebaseKeys to const arrow function. |
| src/renderer/src/common/electron.ts | Convert platform helpers to const arrow functions. |
| src/renderer/src/common/common.ts | Convert common utilities to const arrow functions. |
| src/renderer/scripts/version.js | Convert package.json update helper to const arrow function. |
| src/renderer/package.json | Bump renderer package version to 0.20260209.4. |
| src/main/MainWindow.ts | Convert exported main-process functions to const arrow functions; convert local helper in window handler. |
| src/main/MainMenu.ts | Convert exported main-menu helpers to const arrow functions. |
| package.json | Bump root package version to 0.20260209.4. |
Comments suppressed due to low confidence (1)
src/renderer/src/components/dialogs/BaseDialog.vue:128
useDialogStateis exported as aconstarrow function but isn’t terminated with a semicolon. If Biome/formatting is enforced, this can cause a formatting/lint diff (and it’s inconsistent withprovideDialogStatejust above). Add a trailing;after the function expression for consistency.
export const useDialogState = (): IDialogState => {
const state = vue.inject<IDialogState>(DialogStateKey);
if (!state) {
throw new Error('useDialogState() must be called within a component that has provideDialogState in its ancestor tree.');
}
return state;
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.