Skip to content

Conversation

@agarny
Copy link
Contributor

@agarny agarny commented Feb 9, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 9, 2026 09:19
Copy link

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

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 const arrow functions across TS/Vue files.
  • Minor refactor in GraphPanelWidget.vue (move resize next to defineExpose) and in ContentsComponent.vue (group methods/watchers and relocate defineExpose).
  • Simplify interactive UI JSON initialization in SimulationExperimentView.vue by inlining the prior initialUiJson() 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

  • useDialogState is exported as a const arrow function but isn’t terminated with a semicolon. If Biome/formatting is enforced, this can cause a formatting/lint diff (and it’s inconsistent with provideDialogState just 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.

@agarny agarny merged commit c191a77 into opencor:main Feb 9, 2026
14 checks passed
@agarny agarny deleted the cleaning-up branch February 9, 2026 09:25
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.

1 participant