Skip to content

Conversation

@raditzlawliet
Copy link
Member

Build process updates:

  • .github/workflows/build-test.yml and .github/workflows/main.yml: Removed redundant wasm_exec.js copy commands and added npm run init to the build steps. [1] [2]
  • package.json: Updated the init script to copy wasm_exec.js from a new path (lib/wasm instead of misc/wasm).

Refactoring in ToolDeviceSelector.vue:

  • Simplified logic by removing unused computed properties (isManufacturerHasProduct and isManualInputProduct) and directly using selected.isManualInputProduct.
  • Added default values for isManualInputProduct in DeviceOption class and initialization logic. [1] [2] [3] [4]
  • Enhanced watchers for selectedFileType and deviceFromFitFile to handle updates more effectively. [1] [2]
  • Refactored updateSelectedByDeviceName method to initialize DeviceOption without a label if no device mapping is found.

Go dependency updates:

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 updates the build workflows and package scripts for fetching wasm_exec.js, bumps Go dependencies, and refactors the ToolDeviceSelector.vue component to simplify device-selection logic.

  • Consolidated wasm_exec.js copy into an npm run init step and updated CI workflows.
  • Upgraded Go version and dependencies in go.mod, adjusted import paths in wrapper.go.
  • Streamlined ToolDeviceSelector.vue by removing unused computed props, adding default flags, and enhancing watchers.

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/main.yml Replaced direct cp of wasm_exec.js with npm run init
.github/workflows/build-test.yml Same replacement of cp lines with npm run init
package.json Updated init script to use new lib/wasm path
src/wasm/activity-service/go.mod Bumped Go version and updated module versions
src/wasm/activity-service/activity/fit/wrapper.go Changed import path for factory
src/components/ToolDeviceSelector.vue Refactored selection logic, removed redundant props, added watchers
Comments suppressed due to low confidence (3)

src/components/ToolDeviceSelector.vue:252

  • The watcher for 'deviceName' was removed, so updates to the deviceName prop no longer trigger updateSelectedByDeviceName. Re-add the watcher or handle prop changes to keep selection in sync.
  },

src/components/ToolDeviceSelector.vue:265

  • Falling back to a default DeviceOption discards the actual deviceName label. Consider passing the label into the constructor (e.g., new DeviceOption({ label: deviceName })) to preserve the unmapped device's name.
      if (device == undefined) device = new DeviceOption()

src/components/ToolDeviceSelector.vue:89

  • Manual input mode is never enabled since isManualInputProduct defaults to false and is never set to true for unmapped devices. Consider initializing isManualInputProduct to true in the constructor when no mapping is found, or set it in updateSelectedByDeviceName.
  isManualInputProduct: boolean = false

@muktihari muktihari merged commit 4f6b6ba into master Jul 11, 2025
1 check passed
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.

3 participants