Skip to content

Conversation

@Myestery
Copy link
Collaborator

@Myestery Myestery commented Dec 2, 2025

This pull request refines the loading and error handling logic for both the VideoPreview.vue and ImagePreview.vue components. The main improvements include making the loading skeleton more accurate and visually consistent, updating how loading and error states are managed when URLs change, and ensuring that the main media elements are hidden while loading. These changes enhance the user experience by providing clearer feedback during media load operations.

Loading and error state improvements:

  • The loading skeleton in both VideoPreview.vue and ImagePreview.vue now only appears when loading and no error is present, with updated styling and fixed dimensions for better consistency. (VideoPreview.vue [1] ImagePreview.vue [2]
  • The main video and image elements are now hidden (using the invisible class) while loading, preventing display glitches before the media is ready. (VideoPreview.vue [1] ImagePreview.vue [2]
  • The loading state (isLoading) is now set to true whenever new URLs are provided, and reset appropriately when navigating between media items, ensuring accurate feedback to the user. (VideoPreview.vue [1] ImagePreview.vue [2] [3]

Code consistency and maintainability:

  • Both components now import and use the shared cn utility for conditional class names, improving code consistency and maintainability. (VideoPreview.vue [1] ImagePreview.vue [2]

┆Issue is synchronized with this Notion page by Unito

@Myestery Myestery requested a review from a team as a code owner December 2, 2025 07:03
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Dec 2, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 2, 2025

📝 Walkthrough

Walkthrough

VideoPreview.vue and ImagePreview.vue updated loading/error rendering and state handling: skeletons render only when loading and no error; media elements render only when no error and are hidden while loading via a cn utility; URL watcher initializes isLoading from URL presence; index switches set isLoading to true.

Changes

Cohort / File(s) Summary
Media preview components
src/renderer/extensions/vueNodes/VideoPreview.vue, src/renderer/extensions/vueNodes/components/ImagePreview.vue
- Skeleton now renders only when isLoading && !*Error and is positioned absolutely with explicit size. - Main media element changed to render only when !*Error; class binding uses imported cn to apply an invisible state while isLoading. - URL watcher initializes isLoading as newUrls.length > 0. - Index switching (setCurrentIndex) sets isLoading = true (was false).
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-skeleton-loaders

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Dec 2, 2025

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 12/02/2025, 07:14:44 AM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Dec 2, 2025

🎭 Playwright Test Results

⚠️ Tests passed with flaky tests

⏰ Completed at: 12/02/2025, 07:24:05 AM UTC

📈 Summary

  • Total Tests: 496
  • Passed: 484 ✅
  • Failed: 0
  • Flaky: 3 ⚠️
  • Skipped: 9 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 475 / ❌ 0 / ⚠️ 3 / ⏭️ 9
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 6 / ❌ 0 / ⚠️ 0 / ⏭️ 0

🎉 Click on the links above to view detailed test results for each browser configuration.

@github-actions
Copy link

github-actions bot commented Dec 2, 2025

Bundle Size Report

Summary

  • Raw size: 17 MB baseline 17 MB — 🔴 +671 B
  • Gzip: 3.37 MB baseline 3.37 MB — 🔴 +96 B
  • Brotli: 2.59 MB baseline 2.59 MB — 🔴 +331 B
  • Bundles: 97 current • 97 baseline • 37 added / 37 removed

Category Glance
Graph Workspace 🔴 +671 B (929 kB) · Vendor & Third-Party ⚪ 0 B (8.56 MB) · Other ⚪ 0 B (3.84 MB) · App Entry Points ⚪ 0 B (3.19 MB) · Panels & Settings ⚪ 0 B (298 kB) · UI Components ⚪ 0 B (169 kB) · + 3 more

Per-category breakdown
App Entry Points — 3.19 MB (baseline 3.19 MB) • ⚪ 0 B

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-DNC01cS8.js (removed) 2.97 MB 🟢 -2.97 MB 🟢 -619 kB 🟢 -470 kB
assets/index-DWdmYSEj.js (new) 2.97 MB 🔴 +2.97 MB 🔴 +619 kB 🔴 +470 kB
assets/index-DHLcrSdN.js (removed) 222 kB 🟢 -222 kB 🟢 -47.4 kB 🟢 -39 kB
assets/index-QihRJS3Y.js (new) 222 kB 🔴 +222 kB 🔴 +47.4 kB 🔴 +39 kB
assets/index-BmjDFQiM.js (new) 345 B 🔴 +345 B 🔴 +243 B 🔴 +202 B
assets/index-DxRc6yug.js (removed) 345 B 🟢 -345 B 🟢 -245 B 🟢 -227 B

Status: 3 added / 3 removed

Graph Workspace — 929 kB (baseline 928 kB) • 🔴 +671 B

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-C2DD_R59.js (new) 929 kB 🔴 +929 kB 🔴 +180 kB 🔴 +138 kB
assets/GraphView-BUrnaQ8E.js (removed) 928 kB 🟢 -928 kB 🟢 -180 kB 🟢 -138 kB

Status: 1 added / 1 removed

Views & Navigation — 6.54 kB (baseline 6.54 kB) • ⚪ 0 B

Top-level views, pages, and routed surfaces

File Before After Δ Raw Δ Gzip Δ Brotli
assets/UserSelectView-0gRqOiR9.js (removed) 6.54 kB 🟢 -6.54 kB 🟢 -2.14 kB 🟢 -1.9 kB
assets/UserSelectView-CDaIKlxV.js (new) 6.54 kB 🔴 +6.54 kB 🔴 +2.14 kB 🔴 +1.89 kB

Status: 1 added / 1 removed

Panels & Settings — 298 kB (baseline 298 kB) • ⚪ 0 B

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/CreditsPanel-D9z8Fh_G.js (new) 21.4 kB 🔴 +21.4 kB 🔴 +5.15 kB 🔴 +4.5 kB
assets/CreditsPanel-DZpRNFch.js (removed) 21.4 kB 🟢 -21.4 kB 🟢 -5.15 kB 🟢 -4.5 kB
assets/KeybindingPanel-B2cxeAA0.js (removed) 13.6 kB 🟢 -13.6 kB 🟢 -3.42 kB 🟢 -3.01 kB
assets/KeybindingPanel-BX7qIzEM.js (new) 13.6 kB 🔴 +13.6 kB 🔴 +3.42 kB 🔴 +3.03 kB
assets/ExtensionPanel-B6px9qkK.js (new) 10.8 kB 🔴 +10.8 kB 🔴 +2.58 kB 🔴 +2.26 kB
assets/ExtensionPanel-BL1Hp41v.js (removed) 10.8 kB 🟢 -10.8 kB 🟢 -2.58 kB 🟢 -2.26 kB
assets/AboutPanel-BkqJZ98Y.js (removed) 9.16 kB 🟢 -9.16 kB 🟢 -2.46 kB 🟢 -2.21 kB
assets/AboutPanel-Cnh2VD8p.js (new) 9.16 kB 🔴 +9.16 kB 🔴 +2.46 kB 🔴 +2.21 kB
assets/ServerConfigPanel-CcOpVcCr.js (removed) 6.56 kB 🟢 -6.56 kB 🟢 -1.83 kB 🟢 -1.63 kB
assets/ServerConfigPanel-CGzkf3Mg.js (new) 6.56 kB 🔴 +6.56 kB 🔴 +1.83 kB 🔴 +1.63 kB
assets/UserPanel-BnnSPApd.js (new) 6.23 kB 🔴 +6.23 kB 🔴 +1.72 kB 🔴 +1.51 kB
assets/UserPanel-DtYkkweu.js (removed) 6.23 kB 🟢 -6.23 kB 🟢 -1.72 kB 🟢 -1.51 kB
assets/settings-BhbWhsRg.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BXTtSH4O.js 33.3 kB 33.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-C9Pzn-NG.js 25.2 kB 25.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CCy2fA_h.js 27.3 kB 27.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CQpqEFfl.js 26.6 kB 26.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DHcnxypw.js 21.7 kB 21.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DhFTK9fY.js 25.1 kB 25.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DlT4t_ui.js 25.9 kB 25.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DRgSrIdD.js 24.2 kB 24.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-tjkeqiZq.js 21.1 kB 21.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

UI Components — 169 kB (baseline 169 kB) • ⚪ 0 B

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/Load3D.vue_vue_type_script_setup_true_lang-CqkYbGha.js (new) 53.9 kB 🔴 +53.9 kB 🔴 +8.52 kB 🔴 +7.32 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-NMGWU__Q.js (removed) 53.9 kB 🟢 -53.9 kB 🟢 -8.52 kB 🟢 -7.31 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-CeRPAr1q.js (removed) 47.6 kB 🟢 -47.6 kB 🟢 -10.3 kB 🟢 -8.89 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-tiD8FINy.js (new) 47.6 kB 🔴 +47.6 kB 🔴 +10.3 kB 🔴 +8.94 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-C7PW_Gq-.js (removed) 39.4 kB 🟢 -39.4 kB 🟢 -9.08 kB 🟢 -7.96 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-hDxWNjNq.js (new) 39.4 kB 🔴 +39.4 kB 🔴 +9.09 kB 🔴 +7.97 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-CNZ-aeC9.js (new) 12.9 kB 🔴 +12.9 kB 🔴 +3.37 kB 🔴 +2.97 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-mCeRxfyh.js (removed) 12.9 kB 🟢 -12.9 kB 🟢 -3.36 kB 🟢 -2.97 kB
assets/ComfyQueueButton-CTjChNZK.js (removed) 8.44 kB 🟢 -8.44 kB 🟢 -2.48 kB 🟢 -2.21 kB
assets/ComfyQueueButton-D56Ggrp_.js (new) 8.44 kB 🔴 +8.44 kB 🔴 +2.48 kB 🔴 +2.21 kB
assets/MediaTitle.vue_vue_type_script_setup_true_lang-BvFWfAdB.js (removed) 897 B 🟢 -897 B 🟢 -503 B 🟢 -430 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-C7o9xbs5.js (new) 897 B 🔴 +897 B 🔴 +503 B 🔴 +436 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-B4R5m1qI.js 1.34 kB 1.34 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetButton-C9RSl9Jc.js 2.04 kB 2.04 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-C-GzTNBl.js 2 kB 2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

Data & Services — 12.5 kB (baseline 12.5 kB) • ⚪ 0 B

Stores, services, APIs, and repositories

File Before After Δ Raw Δ Gzip Δ Brotli
assets/keybindingService-BaBzO0uF.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -1.83 kB 🟢 -1.58 kB
assets/keybindingService-DqklW2VC.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +1.83 kB 🔴 +1.58 kB
assets/audioService-7_3wkRHk.js (removed) 2.2 kB 🟢 -2.2 kB 🟢 -962 B 🟢 -821 B
assets/audioService-BnBHUF7_.js (new) 2.2 kB 🔴 +2.2 kB 🔴 +959 B 🔴 +820 B
assets/serverConfigStore-W1zhjkBH.js 2.83 kB 2.83 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 2 added / 2 removed

Utilities & Hooks — 2.94 kB (baseline 2.94 kB) • ⚪ 0 B

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/audioUtils-68_YqqZZ.js (removed) 1.41 kB 🟢 -1.41 kB 🟢 -652 B 🟢 -549 B
assets/audioUtils-B5ls56uY.js (new) 1.41 kB 🔴 +1.41 kB 🔴 +651 B 🔴 +547 B
assets/mathUtil-CTARWQ-l.js 1.07 kB 1.07 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeFilterUtil-CXKCRJ-m.js 460 B 460 B ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 1 added / 1 removed

Vendor & Third-Party — 8.56 MB (baseline 8.56 MB) • ⚪ 0 B

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-chart-BCOr5Gfm.js 452 kB 452 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-other-DsoOPVgr.js 3.98 MB 3.98 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-primevue-CjsaCDb8.js 1.96 MB 1.96 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-three-aR6ntw5X.js 1.37 MB 1.37 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-tiptap-CzjUILzD.js 232 kB 232 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-vue-BEWVLQIi.js 160 kB 160 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-xterm-BZLod3g9.js 407 kB 407 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Other — 3.84 MB (baseline 3.84 MB) • ⚪ 0 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/WidgetRecordAudio-BYwpmfQg.js (removed) 20.4 kB 🟢 -20.4 kB 🟢 -5.24 kB 🟢 -4.63 kB
assets/WidgetRecordAudio-D9_bjGjd.js (new) 20.4 kB 🔴 +20.4 kB 🔴 +5.24 kB 🔴 +4.63 kB
assets/AudioPreviewPlayer-B8OiEyec.js (new) 13.5 kB 🔴 +13.5 kB 🔴 +3.4 kB 🔴 +3.04 kB
assets/AudioPreviewPlayer-CdVW0DJq.js (removed) 13.5 kB 🟢 -13.5 kB 🟢 -3.4 kB 🟢 -3.04 kB
assets/WidgetGalleria-DiZX2WlB.js (new) 4.1 kB 🔴 +4.1 kB 🔴 +1.45 kB 🔴 +1.3 kB
assets/WidgetGalleria-DSGIhQCT.js (removed) 4.1 kB 🟢 -4.1 kB 🟢 -1.45 kB 🟢 -1.3 kB
assets/WidgetColorPicker-BH5AAM1m.js (new) 3.41 kB 🔴 +3.41 kB 🔴 +1.38 kB 🔴 +1.23 kB
assets/WidgetColorPicker-DydQUJ45.js (removed) 3.41 kB 🟢 -3.41 kB 🟢 -1.38 kB 🟢 -1.23 kB
assets/WidgetMarkdown-BX09fLCE.js (removed) 3.1 kB 🟢 -3.1 kB 🟢 -1.29 kB 🟢 -1.13 kB
assets/WidgetMarkdown-Cotv6H0t.js (new) 3.1 kB 🔴 +3.1 kB 🔴 +1.29 kB 🔴 +1.13 kB
assets/WidgetAudioUI-BMxbsYtg.js (new) 2.82 kB 🔴 +2.82 kB 🔴 +1.12 kB 🔴 +1.04 kB
assets/WidgetAudioUI-DaZ32IE2.js (removed) 2.82 kB 🟢 -2.82 kB 🟢 -1.12 kB 🟢 -1.03 kB
assets/WidgetTextarea-BEz6xTN1.js (removed) 2.48 kB 🟢 -2.48 kB 🟢 -1.01 kB 🟢 -885 B
assets/WidgetTextarea-DN8dVOnf.js (new) 2.48 kB 🔴 +2.48 kB 🔴 +1.01 kB 🔴 +887 B
assets/WidgetInputText-BPXPWGJr.js (new) 1.99 kB 🔴 +1.99 kB 🔴 +917 B 🔴 +848 B
assets/WidgetInputText-Oy4YyCuQ.js (removed) 1.99 kB 🟢 -1.99 kB 🟢 -917 B 🟢 -849 B
assets/MediaImageBottom-DSxOHZIi.js (removed) 1.57 kB 🟢 -1.57 kB 🟢 -743 B 🟢 -644 B
assets/MediaImageBottom-loQKFZ5c.js (new) 1.57 kB 🔴 +1.57 kB 🔴 +743 B 🔴 +646 B
assets/MediaAudioBottom-BcjfmzUO.js (new) 1.52 kB 🔴 +1.52 kB 🔴 +745 B 🔴 +658 B
assets/MediaAudioBottom-DgBIChkQ.js (removed) 1.52 kB 🟢 -1.52 kB 🟢 -743 B 🟢 -658 B
assets/MediaVideoBottom-CF-2j5IF.js (removed) 1.52 kB 🟢 -1.52 kB 🟢 -741 B 🟢 -656 B
assets/MediaVideoBottom-CLxhyNVL.js (new) 1.52 kB 🔴 +1.52 kB 🔴 +740 B 🔴 +653 B
assets/Media3DBottom-BS2sscQG.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -733 B 🟢 -649 B
assets/Media3DBottom-CabxzbHS.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +734 B 🔴 +649 B
assets/Media3DTop-DgqLifHg.js (new) 1.49 kB 🔴 +1.49 kB 🔴 +766 B 🔴 +655 B
assets/Media3DTop-DX_S2TOz.js (removed) 1.49 kB 🟢 -1.49 kB 🟢 -766 B 🟢 -653 B
assets/WidgetSelect-Dytq1rzt.js (new) 655 B 🔴 +655 B 🔴 +341 B 🔴 +287 B
assets/WidgetSelect-w0HZKRij.js (removed) 655 B 🟢 -655 B 🟢 -340 B 🟢 -286 B
assets/WidgetInputNumber-_9uQOzW8.js (removed) 595 B 🟢 -595 B 🟢 -327 B 🟢 -276 B
assets/WidgetInputNumber-CnaHBDsn.js (new) 595 B 🔴 +595 B 🔴 +327 B 🔴 +275 B
assets/Load3D-Blx4A0eF.js (removed) 424 B 🟢 -424 B 🟢 -271 B 🟢 -223 B
assets/Load3D-HjS0svgD.js (new) 424 B 🔴 +424 B 🔴 +267 B 🔴 +223 B
assets/WidgetLegacy-avYtwfGW.js (removed) 364 B 🟢 -364 B 🟢 -237 B 🟢 -197 B
assets/WidgetLegacy-DcyJDRRJ.js (new) 364 B 🔴 +364 B 🔴 +236 B 🔴 +198 B
assets/commands-_s-RvhJR.js 13.6 kB 13.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BuUILW6P.js 13 kB 13 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BV4R6fLx.js 14.9 kB 14.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BWp4HdfU.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CLwPdnT6.js 14.2 kB 14.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CWMchBmd.js 15.9 kB 15.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DazTQhtc.js 12.9 kB 12.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DmWrOe93.js 13.7 kB 13.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DwiH7Kr6.js 13.8 kB 13.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-mS3LCNPn.js 14.5 kB 14.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-5lOBdqcC.js 84.5 kB 84.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BOCuaVpE.js 73.4 kB 73.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-ClrEFGUz.js 72.4 kB 72.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Cw9RZWRY.js 89 B 89 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CyNU0iQX.js 99.3 kB 99.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-D7gwLxft.js 114 kB 114 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DC8o4BCt.js 86.8 kB 86.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DKiesCV4.js 94.3 kB 94.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Hq2q-OtB.js 83.6 kB 83.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-USAlAlnj.js 82 kB 82 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaAudioTop-B_r9Y3e-.js 1.46 kB 1.46 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaImageTop-Df0PRhSp.js 1.75 kB 1.75 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaVideoTop-_g8aBAAL.js 2.76 kB 2.76 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-_Px5dSNW.js 306 kB 306 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-7z21KPoS.js 285 kB 285 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Bw_Jitw_.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BWKZzBPK.js 346 kB 346 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CGbgH4Yl.js 320 kB 320 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CjjjdWkV.js 313 kB 313 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CVrNtxvj.js 288 kB 288 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DLRSA0IK.js 309 kB 309 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DQV2gnwA.js 372 kB 372 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-ofqLG5vz.js 310 kB 310 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetChart-f0b59iz3.js 2.48 kB 2.48 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetImageCompare-65U3rWW6.js 2.21 kB 2.21 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widgetPropFilter-BIbGSUAt.js 1.28 kB 1.28 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetToggleSwitch-C53mIaDW.js 1.58 kB 1.58 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 17 added / 17 removed

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
src/renderer/extensions/vueNodes/components/ImagePreview.vue (1)

132-132: Verify the tailwindUtil module exists.

ESLint cannot resolve @/utils/tailwindUtil. Confirm the file exists at this path.

This is a duplicate concern flagged in VideoPreview.vue. The verification script there will check both files.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4982482 and 705bad9.

📒 Files selected for processing (2)
  • src/renderer/extensions/vueNodes/VideoPreview.vue (3 hunks)
  • src/renderer/extensions/vueNodes/components/ImagePreview.vue (4 hunks)
🧰 Additional context used
📓 Path-based instructions (12)
**/*.vue

📄 CodeRabbit inference engine (.cursorrules)

**/*.vue: Use setup() function for component logic in Vue 3 Composition API
Utilize ref and reactive for reactive state in Vue 3
Implement computed properties with computed() function
Use watch and watchEffect for side effects in Vue 3
Implement lifecycle hooks with onMounted, onUpdated, etc.
Utilize provide/inject for dependency injection in Vue 3
Use Vue 3.5 style of default prop declaration with defineProps()
Organize Vue components in <script> <style> order
Use Tailwind CSS for styling Vue components
Implement responsive design with Tailwind CSS
Do not use deprecated PrimeVue components (Dropdown, OverlayPanel, Calendar, InputSwitch, Sidebar, Chips, TabMenu, Steps, InlineMessage). Use replacements: Select, Popover, DatePicker, ToggleSwitch, Drawer, AutoComplete, Tabs, Stepper, Message respectively
Implement proper props and emits definitions in Vue components
Utilize Vue 3's Teleport component when needed
Use Suspense for async components in Vue 3
Follow Vue 3 style guide and naming conventions
Never use deprecated PrimeVue components (Dropdown, OverlayPanel, Calendar, InputSwitch, Sidebar, Chips, TabMenu, Steps, InlineMessage)

Never use :class="[]" to merge class names - always use import { cn } from '@/utils/tailwindUtil' for class merging in Vue templates

**/*.vue: Use TypeScript with Vue 3 Single File Components (.vue files)
Name Vue components in PascalCase (e.g., MenuHamburger.vue)

Files:

  • src/renderer/extensions/vueNodes/VideoPreview.vue
  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{vue,ts,tsx}: Leverage VueUse functions for performance-enhancing utilities
Use vue-i18n in Composition API for any string literals and place new translation entries in src/locales/en/main.json

Files:

  • src/renderer/extensions/vueNodes/VideoPreview.vue
  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
**/*.{ts,tsx,js,vue}

📄 CodeRabbit inference engine (.cursorrules)

Implement proper error handling in components and services

**/*.{ts,tsx,js,vue}: Use 2-space indentation, single quotes, no semicolons, and maintain 80-character line width as configured in .prettierrc
Organize imports by sorting and grouping by plugin, and run pnpm format before committing

Files:

  • src/renderer/extensions/vueNodes/VideoPreview.vue
  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
src/**/*.vue

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.vue: Use the Vue 3 Composition API instead of the Options API when writing Vue components (exception: when overriding or extending PrimeVue components for compatibility)
Use setup() function for component logic
Utilize ref and reactive for reactive state
Implement computed properties with computed()
Use watch and watchEffect for side effects
Implement lifecycle hooks with onMounted, onUpdated, etc.
Utilize provide/inject for dependency injection
Use vue 3.5 style of default prop declaration
Use Tailwind CSS for styling
Implement proper props and emits definitions
Utilize Vue 3's Teleport component when needed
Use Suspense for async components
Follow Vue 3 style guide and naming conventions

Files:

  • src/renderer/extensions/vueNodes/VideoPreview.vue
  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
src/**/*.{vue,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.{vue,ts}: Leverage VueUse functions for performance-enhancing styles
Implement proper error handling
Use vue-i18n in composition API for any string literals. Place new translation entries in src/locales/en/main.json

Files:

  • src/renderer/extensions/vueNodes/VideoPreview.vue
  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
**/*.{ts,tsx,js,jsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

Use camelCase for variable and setting names in TypeScript/Vue files

Files:

  • src/renderer/extensions/vueNodes/VideoPreview.vue
  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
**/*.{vue,html}

📄 CodeRabbit inference engine (CLAUDE.md)

Never use dark: or dark-theme: Tailwind variants - instead use semantic values from style.css theme, e.g. bg-node-component-surface

Files:

  • src/renderer/extensions/vueNodes/VideoPreview.vue
  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx,vue}: Use const settingStore = useSettingStore() and settingStore.get('Comfy.SomeSetting') to retrieve settings in TypeScript/Vue files
Use await settingStore.set('Comfy.SomeSetting', newValue) to update settings in TypeScript/Vue files
Check server capabilities using api.serverSupportsFeature('feature_name') before using enhanced features
Use api.getServerFeature('config_name', defaultValue) to retrieve server feature configuration

Enforce ESLint rules for Vue + TypeScript including: no floating promises, no unused imports, and i18n raw text restrictions in templates

Files:

  • src/renderer/extensions/vueNodes/VideoPreview.vue
  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
src/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/*.{ts,tsx,vue}: Sanitize HTML with DOMPurify to prevent XSS attacks
Avoid using @ts-expect-error; use proper TypeScript types instead
Use es-toolkit for utility functions instead of other utility libraries
Implement proper TypeScript types throughout the codebase

Files:

  • src/renderer/extensions/vueNodes/VideoPreview.vue
  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/renderer/extensions/vueNodes/VideoPreview.vue
  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
src/**/{composables,components}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Clean up subscriptions in state management to prevent memory leaks

Files:

  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
src/**/{components,composables}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Use vue-i18n for ALL user-facing strings by adding them to src/locales/en/main.json

Files:

  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
🧠 Learnings (2)
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Use Teleport/Suspense when needed for component rendering

Applied to files:

  • src/renderer/extensions/vueNodes/VideoPreview.vue
  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
📚 Learning: 2025-11-24T19:47:14.779Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:14.779Z
Learning: Applies to **/*.vue : Never use `:class="[]"` to merge class names - always use `import { cn } from '@/utils/tailwindUtil'` for class merging in Vue templates

Applied to files:

  • src/renderer/extensions/vueNodes/VideoPreview.vue
🪛 ESLint
src/renderer/extensions/vueNodes/VideoPreview.vue

[error] 115-115: Unable to resolve path to module '@/utils/tailwindUtil'.

(import-x/no-unresolved)

src/renderer/extensions/vueNodes/components/ImagePreview.vue

[error] 132-132: Unable to resolve path to module '@/utils/tailwindUtil'.

(import-x/no-unresolved)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: deploy-and-comment
  • GitHub Check: lint-and-format
  • GitHub Check: test
  • GitHub Check: collect
  • GitHub Check: setup
🔇 Additional comments (6)
src/renderer/extensions/vueNodes/VideoPreview.vue (3)

38-47: Verify cn utility is correctly handling conditional visibility.

The changes correctly:

  • Conditionally render the video only when there's no error
  • Use the cn utility for class merging per coding guidelines
  • Apply invisible class during loading to prevent display glitches

141-155: Loading state initialization looks correct.

The change to initialize isLoading.value = newUrls.length > 0 ensures that the loading state is set appropriately when new URLs are provided, which aligns with the PR objectives.


115-115: The import path is correctly configured and the file exists at the expected location. The @/ alias is properly defined in tsconfig.json to resolve to ./src/*, making @/utils/tailwindUtil correctly resolve to src/utils/tailwindUtil.ts. No action required.

src/renderer/extensions/vueNodes/components/ImagePreview.vue (3)

38-51: LGTM on conditional rendering and cn utility usage.

The implementation correctly:

  • Conditionally renders only when no error exists
  • Uses cn() for class composition per guidelines
  • Hides the image with invisible during loading

165-179: Loading state initialization is correct.

Setting isLoading.value = newUrls.length > 0 when URLs change ensures proper loading feedback.


232-239: Setting isLoading when navigating between images is appropriate.

When the user navigates to a different image via setCurrentIndex, setting isLoading.value = true ensures the skeleton displays until the new image loads.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (2)
src/renderer/extensions/vueNodes/VideoPreview.vue (1)

29-35: Align skeleton sizing with container; drop fixed width/height.

class="absolute inset-0 size-full" already makes the skeleton fill the container; the width="16rem" / height="16rem" props override that with fixed dimensions and can cause mismatch with the video area. Recommend removing the fixed size props and relying on the container sizing.

       <Skeleton
         v-if="isLoading && !videoError"
         class="absolute inset-0 size-full"
         border-radius="5px"
-        width="16rem"
-        height="16rem"
       />
src/renderer/extensions/vueNodes/components/ImagePreview.vue (1)

29-35: Skeleton still uses fixed 16rem dimensions; let it fully follow the container.

You’ve fixed positioning with absolute inset-0, but width="16rem" / height="16rem" will override size-full (inline style beats Tailwind), so the skeleton won’t truly match dynamic container size.

Consider dropping the fixed dimensions and relying on full‑size classes:

       <Skeleton
         v-if="isLoading && !imageError"
         class="absolute inset-0 size-full"
         border-radius="5px"
-        width="16rem"
-        height="16rem"
       />
🧹 Nitpick comments (2)
src/renderer/extensions/vueNodes/VideoPreview.vue (1)

141-153: Consider initializing isLoading for initial non-empty URLs.

isLoading is updated to newUrls.length > 0 when imageUrls changes, but the watcher is not immediate, so if the component ever mounts with a non-empty imageUrls array that doesn’t change afterward, the initial load won’t show the skeleton. If that scenario is possible, consider either:

  • Setting isLoading’s initial value from props.imageUrls.length > 0, or
  • Adding immediate: true to this watcher and handling the initial run accordingly.
src/renderer/extensions/vueNodes/components/ImagePreview.vue (1)

164-179: Loading state tied to URL array length may get “stuck” in edge cases.

isLoading is set from newUrls.length > 0 in the imageUrls watcher (Line 176) and also forced to true in setCurrentIndex (Line 236). This works when the displayed image URL actually changes, but there’s a potential edge case:

  • If imageUrls is mutated (e.g., new images appended) without changing currentIndex or the URL at that index, the <img> src may not change, no load event fires, and isLoading can remain true indefinitely while the visible image never reloads.

If the store always replaces the entire array and/or the current index image always changes when outputs update, you’re safe; otherwise you may want to derive loading from the displayed URL instead of just array length.

One way to tighten this:

-// Watch for URL changes and reset state
-watch(
-  () => props.imageUrls,
-  (newUrls) => {
-    // Reset current index if it's out of bounds
-    if (currentIndex.value >= newUrls.length) {
-      currentIndex.value = 0
-    }
-
-    // Reset loading and error states when URLs change
-    actualDimensions.value = null
-    imageError.value = false
-    isLoading.value = newUrls.length > 0
-  },
-  { deep: true }
-)
+// Keep current index in bounds when the URLs array changes
+watch(
+  () => props.imageUrls,
+  (newUrls) => {
+    if (currentIndex.value >= newUrls.length) {
+      currentIndex.value = 0
+    }
+  },
+  { deep: true }
+)
+
+// Reset loading/error when the displayed image URL changes
+watch(
+  () => currentImageUrl.value,
+  (url) => {
+    actualDimensions.value = null
+    imageError.value = false
+    isLoading.value = !!url
+  },
+  { immediate: true }
+)

This keeps the “set isLoading to true on index change” behavior you added while avoiding spurious loading states when only other entries in the array change.

Also applies to: 232-238

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 705bad9 and c0f9c7c.

📒 Files selected for processing (2)
  • src/renderer/extensions/vueNodes/VideoPreview.vue (3 hunks)
  • src/renderer/extensions/vueNodes/components/ImagePreview.vue (4 hunks)
🧰 Additional context used
📓 Path-based instructions (12)
**/*.vue

📄 CodeRabbit inference engine (.cursorrules)

**/*.vue: Use setup() function for component logic in Vue 3 Composition API
Utilize ref and reactive for reactive state in Vue 3
Implement computed properties with computed() function
Use watch and watchEffect for side effects in Vue 3
Implement lifecycle hooks with onMounted, onUpdated, etc.
Utilize provide/inject for dependency injection in Vue 3
Use Vue 3.5 style of default prop declaration with defineProps()
Organize Vue components in <script> <style> order
Use Tailwind CSS for styling Vue components
Implement responsive design with Tailwind CSS
Do not use deprecated PrimeVue components (Dropdown, OverlayPanel, Calendar, InputSwitch, Sidebar, Chips, TabMenu, Steps, InlineMessage). Use replacements: Select, Popover, DatePicker, ToggleSwitch, Drawer, AutoComplete, Tabs, Stepper, Message respectively
Implement proper props and emits definitions in Vue components
Utilize Vue 3's Teleport component when needed
Use Suspense for async components in Vue 3
Follow Vue 3 style guide and naming conventions
Never use deprecated PrimeVue components (Dropdown, OverlayPanel, Calendar, InputSwitch, Sidebar, Chips, TabMenu, Steps, InlineMessage)

Never use :class="[]" to merge class names - always use import { cn } from '@/utils/tailwindUtil' for class merging in Vue templates

**/*.vue: Use TypeScript with Vue 3 Single File Components (.vue files)
Name Vue components in PascalCase (e.g., MenuHamburger.vue)

Files:

  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
  • src/renderer/extensions/vueNodes/VideoPreview.vue
**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{vue,ts,tsx}: Leverage VueUse functions for performance-enhancing utilities
Use vue-i18n in Composition API for any string literals and place new translation entries in src/locales/en/main.json

Files:

  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
  • src/renderer/extensions/vueNodes/VideoPreview.vue
**/*.{ts,tsx,js,vue}

📄 CodeRabbit inference engine (.cursorrules)

Implement proper error handling in components and services

**/*.{ts,tsx,js,vue}: Use 2-space indentation, single quotes, no semicolons, and maintain 80-character line width as configured in .prettierrc
Organize imports by sorting and grouping by plugin, and run pnpm format before committing

Files:

  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
  • src/renderer/extensions/vueNodes/VideoPreview.vue
src/**/*.vue

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.vue: Use the Vue 3 Composition API instead of the Options API when writing Vue components (exception: when overriding or extending PrimeVue components for compatibility)
Use setup() function for component logic
Utilize ref and reactive for reactive state
Implement computed properties with computed()
Use watch and watchEffect for side effects
Implement lifecycle hooks with onMounted, onUpdated, etc.
Utilize provide/inject for dependency injection
Use vue 3.5 style of default prop declaration
Use Tailwind CSS for styling
Implement proper props and emits definitions
Utilize Vue 3's Teleport component when needed
Use Suspense for async components
Follow Vue 3 style guide and naming conventions

Files:

  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
  • src/renderer/extensions/vueNodes/VideoPreview.vue
src/**/*.{vue,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.{vue,ts}: Leverage VueUse functions for performance-enhancing styles
Implement proper error handling
Use vue-i18n in composition API for any string literals. Place new translation entries in src/locales/en/main.json

Files:

  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
  • src/renderer/extensions/vueNodes/VideoPreview.vue
**/*.{ts,tsx,js,jsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

Use camelCase for variable and setting names in TypeScript/Vue files

Files:

  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
  • src/renderer/extensions/vueNodes/VideoPreview.vue
**/*.{vue,html}

📄 CodeRabbit inference engine (CLAUDE.md)

Never use dark: or dark-theme: Tailwind variants - instead use semantic values from style.css theme, e.g. bg-node-component-surface

Files:

  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
  • src/renderer/extensions/vueNodes/VideoPreview.vue
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx,vue}: Use const settingStore = useSettingStore() and settingStore.get('Comfy.SomeSetting') to retrieve settings in TypeScript/Vue files
Use await settingStore.set('Comfy.SomeSetting', newValue) to update settings in TypeScript/Vue files
Check server capabilities using api.serverSupportsFeature('feature_name') before using enhanced features
Use api.getServerFeature('config_name', defaultValue) to retrieve server feature configuration

Enforce ESLint rules for Vue + TypeScript including: no floating promises, no unused imports, and i18n raw text restrictions in templates

Files:

  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
  • src/renderer/extensions/vueNodes/VideoPreview.vue
src/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/*.{ts,tsx,vue}: Sanitize HTML with DOMPurify to prevent XSS attacks
Avoid using @ts-expect-error; use proper TypeScript types instead
Use es-toolkit for utility functions instead of other utility libraries
Implement proper TypeScript types throughout the codebase

Files:

  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
  • src/renderer/extensions/vueNodes/VideoPreview.vue
src/**/{composables,components}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Clean up subscriptions in state management to prevent memory leaks

Files:

  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
  • src/renderer/extensions/vueNodes/VideoPreview.vue
src/**/{components,composables}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Use vue-i18n for ALL user-facing strings by adding them to src/locales/en/main.json

Files:

  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
🧠 Learnings (6)
📓 Common learnings
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Use Teleport/Suspense when needed for component rendering
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T19:46:52.279Z
Learning: Applies to **/*.vue : Implement lifecycle hooks with onMounted, onUpdated, etc.
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Implement lifecycle hooks with onMounted, onUpdated, etc.
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Use Suspense for async components
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T19:46:52.279Z
Learning: Applies to **/*.vue : Use Suspense for async components in Vue 3
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Utilize ref and reactive for reactive state
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Use Teleport/Suspense when needed for component rendering

Applied to files:

  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
  • src/renderer/extensions/vueNodes/VideoPreview.vue
📚 Learning: 2025-11-24T19:47:02.860Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.{vue,ts} : Leverage VueUse functions for performance-enhancing styles

Applied to files:

  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
📚 Learning: 2025-11-24T19:46:52.279Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T19:46:52.279Z
Learning: Applies to **/*.{vue,ts,tsx} : Leverage VueUse functions for performance-enhancing utilities

Applied to files:

  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.{vue,ts,js} : Use existing VueUse composables (such as useElementHover) instead of manually managing event listeners

Applied to files:

  • src/renderer/extensions/vueNodes/components/ImagePreview.vue
📚 Learning: 2025-11-24T19:46:52.279Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T19:46:52.279Z
Learning: Applies to **/*.vue : Use watch and watchEffect for side effects in Vue 3

Applied to files:

  • src/renderer/extensions/vueNodes/VideoPreview.vue
🪛 ESLint
src/renderer/extensions/vueNodes/components/ImagePreview.vue

[error] 132-132: Unable to resolve path to module '@/utils/tailwindUtil'.

(import-x/no-unresolved)

src/renderer/extensions/vueNodes/VideoPreview.vue

[error] 115-115: Unable to resolve path to module '@/utils/tailwindUtil'.

(import-x/no-unresolved)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: setup
  • GitHub Check: test
  • GitHub Check: lint-and-format
  • GitHub Check: collect
🔇 Additional comments (4)
src/renderer/extensions/vueNodes/VideoPreview.vue (2)

39-41: Video visibility logic during loading looks correct.

Gating the video on !videoError and toggling visibility with cn('block size-full object-contain', isLoading && 'invisible') cleanly separates error vs loading states and avoids flicker while the skeleton is shown.


115-115: Good adoption of shared cn utility.

Importing cn from @/utils/tailwindUtil and using it in the template aligns with the guideline to avoid :class="[]" and centralizes class merging.

src/renderer/extensions/vueNodes/components/ImagePreview.vue (2)

39-48: cn-based image classes + loading invisibility look good.

Using cn to compose base classes with an invisible state when isLoading is true matches the Tailwind + class-merging guidelines and keeps the image in DOM while hiding it during skeleton display.


132-132: The import path @/utils/tailwindUtil is correctly configured and resolves successfully. The module exists, the cn function is properly exported, and this identical import is used across 50+ components in the codebase without issues, including multiple files in the same directory as ImagePreview.vue.

Likely an incorrect or invalid review comment.

@DrJKL
Copy link
Contributor

DrJKL commented Dec 2, 2025

Check out the rabbit comments again.

@christian-byrne christian-byrne added the claude-review Add to trigger a PR code review from Claude Code label Dec 3, 2025
Copy link

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comprehensive PR Review

This review is generated by Claude. It may not always be accurate, as with human reviewers. If you believe that any of the comments are invalid or incorrect, please state why for each. For others, please implement the changes in one way or another.

Review Summary

PR: Fix skeleton loaders for Image/Video Previews (#7094)
Impact: 28 additions, 9 deletions across 2 files

Issue Distribution

  • Critical: 0
  • High: 0
  • Medium: 0
  • Low: 0

Category Breakdown

  • Architecture: 0 issues
  • Security: 0 issues
  • Performance: 0 issues
  • Code Quality: 0 issues

Key Findings

Architecture & Design

The changes maintain the existing Vue 3 Composition API architecture and follow established component patterns. The modifications are focused on visual presentation improvements without altering the component's core functionality or API. The use of PrimeVue's Skeleton component aligns with the project's preference for established UI libraries over custom implementations.

Security Considerations

No security implications identified. The changes are purely presentational and do not introduce any input validation, XSS, or other security concerns.

Performance Impact

The changes have minimal performance impact. Adding CSS classes does not affect rendering performance, bundle size, or component reactivity. The skeleton loaders continue to conditionally render based on loading states as before.

Integration Points

The changes maintain backward compatibility and do not affect:

  • Component props or interfaces
  • Event handling
  • State management
  • Extension compatibility

Positive Observations

Consistent Implementation: Both VideoPreview.vue and ImagePreview.vue receive identical fixes, ensuring visual consistency across media preview components.

Proper CSS Utilities: The changes use Tailwind's utility classes (absolute, inset-0, size-full) correctly to achieve proper positioning and sizing.

Follows Project Guidelines: The implementation adheres to CLAUDE.md guidelines by using established utility classes rather than custom CSS.

Focused Scope: The changes are minimal and surgical, addressing only the specific skeleton loader positioning issue without unnecessary modifications.

Maintains Accessibility: The existing aria-labels and semantic structure remain unchanged, preserving accessibility features.

Technical Analysis

The core change transforms class="inset-0" into class="absolute inset-0 size-full". This fix addresses a CSS positioning issue where inset-0 requires a positioned element (absolute, relative, or fixed) to take effect. The addition of absolute positioning ensures the skeleton properly overlays the media content, while size-full explicitly sets both width and height to 100%.

Next Steps

  1. ✅ Changes are ready for merge - no blocking issues identified
  2. Consider adding automated visual regression tests for skeleton loading states in future iterations
  3. Monitor user feedback for skeleton loader visibility and timing

This is a comprehensive automated review. The changes are well-implemented and follow established patterns. No human review required for merge.

@github-actions github-actions bot removed the claude-review Add to trigger a PR code review from Claude Code label Dec 3, 2025
@Myestery Myestery merged commit d50a2fa into main Dec 3, 2025
32 checks passed
@Myestery Myestery deleted the fix-skeleton-loaders branch December 3, 2025 02:39
@christian-byrne christian-byrne added needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch core/1.33 Backport PRs for core 1.33 labels Dec 8, 2025
github-actions bot pushed a commit that referenced this pull request Dec 8, 2025
This pull request refines the loading and error handling logic for both
the `VideoPreview.vue` and `ImagePreview.vue` components. The main
improvements include making the loading skeleton more accurate and
visually consistent, updating how loading and error states are managed
when URLs change, and ensuring that the main media elements are hidden
while loading. These changes enhance the user experience by providing
clearer feedback during media load operations.

**Loading and error state improvements:**

* The loading skeleton in both `VideoPreview.vue` and `ImagePreview.vue`
now only appears when loading and no error is present, with updated
styling and fixed dimensions for better consistency. (`VideoPreview.vue`
[[1]](diffhunk://#diff-17b5c19b4628f22e45570b66a85ed1fc16e931dd368fe420584d487e522ab8aaL29-R41)
`ImagePreview.vue`
[[2]](diffhunk://#diff-0c0b17c5c68464e0284398ad42b823509d414c9cf297f3bc2aa2b00e0f9c2015L29-R48)
* The main video and image elements are now hidden (using the
`invisible` class) while loading, preventing display glitches before the
media is ready. (`VideoPreview.vue`
[[1]](diffhunk://#diff-17b5c19b4628f22e45570b66a85ed1fc16e931dd368fe420584d487e522ab8aaL29-R41)
`ImagePreview.vue`
[[2]](diffhunk://#diff-0c0b17c5c68464e0284398ad42b823509d414c9cf297f3bc2aa2b00e0f9c2015L29-R48)
* The loading state (`isLoading`) is now set to `true` whenever new URLs
are provided, and reset appropriately when navigating between media
items, ensuring accurate feedback to the user. (`VideoPreview.vue`
[[1]](diffhunk://#diff-17b5c19b4628f22e45570b66a85ed1fc16e931dd368fe420584d487e522ab8aaL145-R152)
`ImagePreview.vue`
[[2]](diffhunk://#diff-0c0b17c5c68464e0284398ad42b823509d414c9cf297f3bc2aa2b00e0f9c2015L164-R176)
[[3]](diffhunk://#diff-0c0b17c5c68464e0284398ad42b823509d414c9cf297f3bc2aa2b00e0f9c2015L224-R236)

**Code consistency and maintainability:**

* Both components now import and use the shared `cn` utility for
conditional class names, improving code consistency and maintainability.
(`VideoPreview.vue`
[[1]](diffhunk://#diff-17b5c19b4628f22e45570b66a85ed1fc16e931dd368fe420584d487e522ab8aaR115)
`ImagePreview.vue`
[[2]](diffhunk://#diff-0c0b17c5c68464e0284398ad42b823509d414c9cf297f3bc2aa2b00e0f9c2015R132)

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7094-Fix-skeleton-loaders-for-Image-Video-Previews-2bd6d73d3650817989e1f4d597094016)
by [Unito](https://www.unito.io)
@comfy-pr-bot
Copy link
Member

@Myestery Successfully backported to #7248

@github-actions github-actions bot removed the needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch label Dec 8, 2025
christian-byrne pushed a commit that referenced this pull request Dec 9, 2025
…7248)

Backport of #7094 to `core/1.33`

Automatically created by backport workflow.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7248-backport-core-1-33-Fix-skeleton-loaders-for-Image-Video-Previews-2c36d73d3650814c9187f6321af27b96)
by [Unito](https://www.unito.io)

Co-authored-by: Johnpaul Chiwetelu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core/1.33 Backport PRs for core 1.33 size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants