Conversation
fix: UI bug on device selector which prevent users from continuing
There was a problem hiding this comment.
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.jscopy into annpm run initstep and updated CI workflows. - Upgraded Go version and dependencies in
go.mod, adjusted import paths inwrapper.go. - Streamlined
ToolDeviceSelector.vueby 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
approved these changes
Jul 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Build process updates:
.github/workflows/build-test.ymland.github/workflows/main.yml: Removed redundantwasm_exec.jscopy commands and addednpm run initto the build steps. [1] [2]package.json: Updated theinitscript to copywasm_exec.jsfrom a new path (lib/wasminstead ofmisc/wasm).Refactoring in
ToolDeviceSelector.vue:isManufacturerHasProductandisManualInputProduct) and directly usingselected.isManualInputProduct.isManualInputProductinDeviceOptionclass and initialization logic. [1] [2] [3] [4]selectedFileTypeanddeviceFromFitFileto handle updates more effectively. [1] [2]updateSelectedByDeviceNamemethod to initializeDeviceOptionwithout a label if no device mapping is found.Go dependency updates:
src/wasm/activity-service/go.mod: Upgraded Go version to1.24.4and updated dependencies (github.com/muktihari/fittov0.25.0,golang.org/x/texttov0.26.0, andgithub.com/google/go-cmptov0.7.0).src/wasm/activity-service/activity/fit/wrapper.go: Changed import path forfactorytoprofile/factorydue to updates in thegithub.com/muktihari/fitlibrary.