Fix doubled player on VHS LoadAudio in vue#8206
Conversation
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 01/21/2026, 07:24:01 AM UTC 🔗 Links🎉 Your Storybook is ready for review! |
🎭 Playwright Tests:
|
📝 WalkthroughWalkthroughRemoves WidgetAudioUI; simplifies widget lookup by changing getComponent to accept only type; centralizes audio UI updates via a new updateUIWidget helper in uploadAudio.ts; refactors AudioPreviewPlayer to use modelValue (v-model) and drop external node/api dependencies. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Recorder
participant uploadAudio as uploadAudio.ts
participant API
participant Widget as AudioPreviewPlayer
User->>Recorder: start/stop recording
Recorder->>uploadAudio: provides Blob
uploadAudio->>API: upload blob -> returns resource URL
API-->>uploadAudio: resource URL
uploadAudio->>Widget: updateUIWidget(resource URL, value, callback)
Widget-->>User: audio playable via modelValue
Note right of uploadAudio: Also used on file upload, node outputs, and removal flows
Possibly related PRs
Suggested reviewers
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 22.3 kB (baseline 22.4 kB) • 🟢 -34 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.02 MB (baseline 1.02 MB) • 🔴 +75 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 80.7 kB (baseline 80.7 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 9 added / 9 removed Panels & Settings — 430 kB (baseline 430 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 8 added / 8 removed User & Accounts — 3.94 kB (baseline 3.94 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 3 added / 3 removed Editors & Dialogs — 2.8 kB (baseline 2.8 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 2 added / 2 removed UI Components — 32.8 kB (baseline 32.8 kB) • ⚪ 0 BReusable component library chunks
Status: 6 added / 6 removed Data & Services — 3.04 MB (baseline 3.05 MB) • 🟢 -657 BStores, services, APIs, and repositories
Status: 7 added / 7 removed Utilities & Hooks — 18.1 kB (baseline 18.8 kB) • 🟢 -691 BHelpers, composables, and utility bundles
Status: 4 added / 5 removed Vendor & Third-Party — 10.4 MB (baseline 10.4 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Other — 6.28 MB (baseline 6.28 MB) • 🟢 -5.58 kBBundles that do not match a named category
Status: 32 added / 35 removed |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@src/extensions/core/uploadAudio.ts`:
- Around line 171-176: The code calls updateUIWidget(audioUIWidget,
api.apiURL(resourceUrl)) without checking that audioUIWidget exists; guard the
call by checking the result of the widget lookup (audioUIWidget) and only call
updateUIWidget when it's not null/undefined—leave the rest (resourceUrl creation
via getResourceURL and api.apiURL(...)) unchanged so nodes that lack an audioUI
simply skip the UI update instead of throwing.
In
`@src/renderer/extensions/vueNodes/widgets/components/audio/AudioPreviewPlayer.vue`:
- Around line 173-174: showVolumeOne's condition is inverted: replace its
expression so it displays when audio is NOT muted and volume is low;
specifically, change the computed for showVolumeOne to check !isMuted.value and
volume.value > 0 and volume.value <= 0.5 (so it complements showVolumeTwo which
uses !isMuted.value && volume.value > 0.5).
src/renderer/extensions/vueNodes/widgets/components/audio/AudioPreviewPlayer.vue
Show resolved
Hide resolved
|
Updating Playwright Expectations |
| let value = '' | ||
| audioUIWidget.options.getValue = () => value | ||
| audioUIWidget.options.setValue = (v) => (value = v) |
There was a problem hiding this comment.
Agreed. I'm real unhappy with the setup, but the existing DOMwidget code has already defined widget.value. It's impossible to set widget.value on a DOMWidget unless you set up a getter and setter like this.
In vue mode, the VHS Load Audio (Upload) node had 2 audio previews. This occurred because the native AudioPreview widget was being applied to any combo widget with the name `audio`. This native preview does not support the advanced preview functions VHS provides like seeking to specific start time, trimming to a target duration, or converting from formats the browser may not support. This is fixed through a fairly involved cleanup to instead display the litegraph AudioUI widget as an AudioPreview widget when in vue mode. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8206-Fix-doubled-player-on-VHS-LoadAudio-in-vue-2ef6d73d365081ce8907dca2706214a1) by [Unito](https://www.unito.io) --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Alexander Brown <drjkl@comfy.org>
In vue mode, the VHS Load Audio (Upload) node had 2 audio previews. This occurred because the native AudioPreview widget was being applied to any combo widget with the name
audio. This native preview does not support the advanced preview functions VHS provides like seeking to specific start time, trimming to a target duration, or converting from formats the browser may not support.This is fixed through a fairly involved cleanup to instead display the litegraph AudioUI widget as an AudioPreview widget when in vue mode.
┆Issue is synchronized with this Notion page by Unito