Skip to content

Conversation

@jtydhr88
Copy link
Collaborator

@jtydhr88 jtydhr88 commented Jan 5, 2026

Summary

  • Replace OBJLoader with OBJLoader2Parallel from wwobjloader2
  • OBJ parsing now runs in a Web Worker, keeping UI responsive
  • Add 100MB file size limit with user-friendly error message

reduce loading time for 97M obj from 9s to 3s

fix #7843

┆Issue is synchronized with this Notion page by Unito

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jan 5, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 5, 2026

📝 Walkthrough

Walkthrough

Introduces asynchronous 3D model loading via worker-based OBJ parsing and implements client-side file size validation. Adds wwobjloader2 dependency and replaces the synchronous OBJLoader with OBJLoader2Parallel to prevent UI blocking during large file processing.

Changes

Cohort / File(s) Summary
Dependency additions
package.json, pnpm-workspace.yaml
Adds wwobjloader2 (^6.2.1) as a new dependency to support worker-based OBJ loading.
File size validation
src/extensions/core/load3d/Load3dUtils.ts, src/locales/en/main.json
Introduces MAX_UPLOAD_SIZE_MB constant (100 MB) with client-side file size validation in uploadFile. Non-compliant files trigger a localized toast message and return early. Adds corresponding localization string for user feedback.
OBJ loader migration
src/extensions/core/load3d/LoaderManager.ts, src/extensions/core/load3d/interfaces.ts
Replaces synchronous OBJLoader with worker-enabled OBJLoader2Parallel. Updates OBJ loading flow to configure worker URL and use URL-encoded paths. Converts MTL materials via MtlObjBridge when present. Enhances error logging with Load3D-specific tags.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Client
    participant Validator as Upload Validator
    participant Loader as OBJLoader2Parallel
    participant Worker as Web Worker

    User->>Client: Select file (> 100 MB)
    Client->>Validator: uploadFile(file)
    Validator->>Validator: Calculate size in MB
    alt File exceeds MAX_UPLOAD_SIZE_MB
        Validator->>Client: Return undefined
        Client->>User: Show error toast
    else File within limit
        Validator->>Loader: Initialize OBJLoader2Parallel
        Loader->>Loader: Configure worker URL
        Loader->>Worker: Parse OBJ (non-blocking)
        Worker->>Worker: Process geometry
        Worker-->>Loader: Return parsed result
        Loader-->>Client: Model ready
        Client->>User: Load model in viewport
    end
Loading

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The pull request comprehensively addresses all objectives from issue #7843: implements async OBJ loading via Web Worker to prevent UI blocking, adds a 100 MB file size limit with user-friendly error messages, and demonstrates significant performance improvement.
Out of Scope Changes check ✅ Passed All changes are directly scoped to implementing async OBJ loading: dependency addition, loader replacement, file validation, and localization strings. No unrelated modifications detected.
✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

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

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 01/05/2026, 03:27:33 AM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

🎭 Playwright Test Results

⚠️ Tests passed with flaky tests

⏰ Completed at: 01/05/2026, 03:32:29 AM UTC

📈 Summary

  • Total Tests: 513
  • Passed: 504 ✅
  • Failed: 0
  • Flaky: 1 ⚠️
  • Skipped: 8 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 494 / ❌ 0 / ⚠️ 0 / ⏭️ 8
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 7 / ❌ 0 / ⚠️ 1 / ⏭️ 0

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

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

Bundle Size Report

Summary

  • Raw size: 17.4 MB baseline 17.3 MB — 🔴 +78.1 kB
  • Gzip: 3.56 MB baseline 3.55 MB — 🔴 +17.8 kB
  • Brotli: 2.71 MB baseline 2.7 MB — 🔴 +12.4 kB
  • Bundles: 99 current • 98 baseline • 57 added / 56 removed

Category Glance
Vendor & Third-Party 🔴 +72.5 kB (9.19 MB) · Other 🔴 +4.69 kB (3.47 MB) · App Entry Points 🔴 +848 B (3.23 MB) · Graph Workspace ⚪ 0 B (1000 kB) · Panels & Settings ⚪ 0 B (300 kB) · UI Components ⚪ 0 B (193 kB) · + 3 more

Per-category breakdown
App Entry Points — 3.23 MB (baseline 3.23 MB) • 🔴 +848 B

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-D8OZyN35.js (new) 3.03 MB 🔴 +3.03 MB 🔴 +637 kB 🔴 +484 kB
assets/index-Bbn6j0UD.js (removed) 3.03 MB 🟢 -3.03 MB 🟢 -637 kB 🟢 -484 kB
assets/index-BvOOksEN.js (new) 194 kB 🔴 +194 kB 🔴 +42.3 kB 🔴 +35.1 kB
assets/index-Cybtrczo.js (removed) 194 kB 🟢 -194 kB 🟢 -42.3 kB 🟢 -35.1 kB
assets/index-BHFabMbY.js (removed) 345 B 🟢 -345 B 🟢 -244 B 🟢 -201 B
assets/index-rs_CYBiq.js (new) 345 B 🔴 +345 B 🔴 +246 B 🔴 +235 B

Status: 3 added / 3 removed

Graph Workspace — 1000 kB (baseline 1000 kB) • ⚪ 0 B

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-BtAEU_HI.js (new) 1000 kB 🔴 +1000 kB 🔴 +194 kB 🔴 +148 kB
assets/GraphView-DtR8e5sg.js (removed) 1000 kB 🟢 -1000 kB 🟢 -194 kB 🟢 -148 kB

Status: 1 added / 1 removed

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

Top-level views, pages, and routed surfaces

File Before After Δ Raw Δ Gzip Δ Brotli
assets/UserSelectView-B_9wUnyQ.js (new) 6.63 kB 🔴 +6.63 kB 🔴 +2.14 kB 🔴 +1.9 kB
assets/UserSelectView-CyLLd6LO.js (removed) 6.63 kB 🟢 -6.63 kB 🟢 -2.14 kB 🟢 -1.9 kB

Status: 1 added / 1 removed

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

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/LegacyCreditsPanel-CZpARcdb.js (new) 22.7 kB 🔴 +22.7 kB 🔴 +5.25 kB 🔴 +4.61 kB
assets/LegacyCreditsPanel-DGtj7O4z.js (removed) 22.7 kB 🟢 -22.7 kB 🟢 -5.26 kB 🟢 -4.6 kB
assets/KeybindingPanel-BCc3L8G6.js (new) 14.8 kB 🔴 +14.8 kB 🔴 +3.57 kB 🔴 +3.13 kB
assets/KeybindingPanel-CSd8_3yu.js (removed) 14.8 kB 🟢 -14.8 kB 🟢 -3.57 kB 🟢 -3.12 kB
assets/ExtensionPanel-DK1ljGgd.js (removed) 11.1 kB 🟢 -11.1 kB 🟢 -2.62 kB 🟢 -2.3 kB
assets/ExtensionPanel-DtRJdNU0.js (new) 11.1 kB 🔴 +11.1 kB 🔴 +2.62 kB 🔴 +2.29 kB
assets/AboutPanel-C63h3lJV.js (new) 9.16 kB 🔴 +9.16 kB 🔴 +2.46 kB 🔴 +2.21 kB
assets/AboutPanel-J92vh9XO.js (removed) 9.16 kB 🟢 -9.16 kB 🟢 -2.46 kB 🟢 -2.2 kB
assets/ServerConfigPanel-BJ5os-Eh.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +2.04 kB 🔴 +1.81 kB
assets/ServerConfigPanel-C5pF53A7.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -2.04 kB 🟢 -1.81 kB
assets/UserPanel-6pmKtX95.js (new) 6.88 kB 🔴 +6.88 kB 🔴 +1.79 kB 🔴 +1.56 kB
assets/UserPanel-Bay-kw9Z.js (removed) 6.88 kB 🟢 -6.88 kB 🟢 -1.79 kB 🟢 -1.57 kB
assets/settings-AN2JfZVQ.js 21.7 kB 21.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BhbWhsRg.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BIdKi-OT.js 26.2 kB 26.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-Bu3OR-lX.js 24.6 kB 24.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-ByL6gy5c.js 25.4 kB 25.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CjlRFMdL.js 32.8 kB 32.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DkGwvylK.js 26.9 kB 26.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-Dyd027Dx.js 24.7 kB 24.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-wwBxqLH5.js 21.3 kB 21.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-xx2Yb6R2.js 23.8 kB 23.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

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

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/LazyImage.vue_vue_type_script_setup_true_lang-3qBBvhCF.js (new) 60.1 kB 🔴 +60.1 kB 🔴 +12.4 kB 🔴 +10.8 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-CxyLIqfI.js (removed) 60.1 kB 🟢 -60.1 kB 🟢 -12.4 kB 🟢 -10.8 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-CPD6o0ti.js (removed) 54.4 kB 🟢 -54.4 kB 🟢 -8.6 kB 🟢 -7.39 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-CTyfgaXV.js (new) 54.4 kB 🔴 +54.4 kB 🔴 +8.6 kB 🔴 +7.39 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-C7Ho9aP3.js (removed) 49 kB 🟢 -49 kB 🟢 -10.5 kB 🟢 -9.14 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-R-CNMKdV.js (new) 49 kB 🔴 +49 kB 🔴 +10.5 kB 🔴 +9.14 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-CE6guJnm.js (removed) 10.9 kB 🟢 -10.9 kB 🟢 -2.89 kB 🟢 -2.55 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-Ozmem73s.js (new) 10.9 kB 🔴 +10.9 kB 🔴 +2.9 kB 🔴 +2.56 kB
assets/ComfyQueueButton-D6mqqPt3.js (removed) 8.83 kB 🟢 -8.83 kB 🟢 -2.57 kB 🟢 -2.29 kB
assets/ComfyQueueButton-DGwYtmoX.js (new) 8.83 kB 🔴 +8.83 kB 🔴 +2.58 kB 🔴 +2.3 kB
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-CbfXEDyF.js (removed) 3.72 kB 🟢 -3.72 kB 🟢 -1.46 kB 🟢 -1.32 kB
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-w5NW0X5e.js (new) 3.72 kB 🔴 +3.72 kB 🔴 +1.45 kB 🔴 +1.32 kB
assets/WidgetButton-B73QWnPB.js (removed) 2.21 kB 🟢 -2.21 kB 🟢 -997 B 🟢 -893 B
assets/WidgetButton-CjK2Q_na.js (new) 2.21 kB 🔴 +2.21 kB 🔴 +997 B 🔴 +891 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-BwvGFDuc.js (new) 2.14 kB 🔴 +2.14 kB 🔴 +891 B 🔴 +765 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-DYHvU_1-.js (removed) 2.14 kB 🟢 -2.14 kB 🟢 -890 B 🟢 -767 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-Btc-ocVv.js (new) 1.34 kB 🔴 +1.34 kB 🔴 +685 B 🔴 +593 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-CieNuc25.js (removed) 1.34 kB 🟢 -1.34 kB 🟢 -685 B 🟢 -595 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-CBR2D5cy.js (new) 897 B 🔴 +897 B 🔴 +504 B 🔴 +434 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-ljzk2w32.js (removed) 897 B 🟢 -897 B 🟢 -502 B 🟢 -432 B

Status: 10 added / 10 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-9C-cPvxN.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -1.83 kB 🟢 -1.58 kB
assets/keybindingService-ZNuOs1s9.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +1.83 kB 🔴 +1.58 kB
assets/serverConfigStore-BWm_uxF_.js (removed) 2.83 kB 🟢 -2.83 kB 🟢 -906 B 🟢 -788 B
assets/serverConfigStore-CLS4uKu9.js (new) 2.83 kB 🔴 +2.83 kB 🔴 +908 B 🔴 +797 B
assets/audioService-BZlSF3KA.js (removed) 2.2 kB 🟢 -2.2 kB 🟢 -960 B 🟢 -826 B
assets/audioService-DEcDp7Md.js (new) 2.2 kB 🔴 +2.2 kB 🔴 +964 B 🔴 +824 B

Status: 3 added / 3 removed

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

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/audioUtils-BWhowPt3.js (removed) 1.41 kB 🟢 -1.41 kB 🟢 -651 B 🟢 -547 B
assets/audioUtils-Cdlwvo8A.js (new) 1.41 kB 🔴 +1.41 kB 🔴 +652 B 🔴 +548 B

Status: 1 added / 1 removed

Vendor & Third-Party — 9.19 MB (baseline 9.12 MB) • 🔴 +72.5 kB

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-other-fFl5a9Y4.js (new) 3.9 MB 🔴 +3.9 MB 🔴 +848 kB 🔴 +678 kB
assets/vendor-other-QAjmpiSo.js (removed) 3.89 MB 🟢 -3.89 MB 🟢 -845 kB 🟢 -676 kB
assets/vendor-three-B_Dw2uOl.js (new) 2.08 MB 🔴 +2.08 MB 🔴 +430 kB 🔴 +308 kB
assets/vendor-three-BYiW32lN.js (removed) 2.02 MB 🟢 -2.02 MB 🟢 -417 kB 🟢 -299 kB
assets/vendor-primevue-BaL9qxPA.js (removed) 1.95 MB 🟢 -1.95 MB 🟢 -334 kB 🟢 -201 kB
assets/vendor-primevue-woBPd4cb.js (new) 1.95 MB 🔴 +1.95 MB 🔴 +334 kB 🔴 +201 kB
assets/vendor-chart-BiTiQvXD.js (removed) 452 kB 🟢 -452 kB 🟢 -99 kB 🟢 -81 kB
assets/vendor-chart-vIZEp4HX.js (new) 452 kB 🔴 +452 kB 🔴 +99 kB 🔴 +81 kB
assets/vendor-tiptap-C79JtMXE.js (new) 232 kB 🔴 +232 kB 🔴 +45.7 kB 🔴 +37.7 kB
assets/vendor-tiptap-BkaRKIwe.js (removed) 232 kB 🟢 -232 kB 🟢 -45.7 kB 🟢 -37.7 kB
assets/vendor-vue-BXnt3M34.js (new) 160 kB 🔴 +160 kB 🔴 +37 kB 🔴 +31.4 kB
assets/vendor-vue-DgYh9BF5.js (removed) 160 kB 🟢 -160 kB 🟢 -37 kB 🟢 -31.4 kB
assets/vendor-xterm-BF8peZ5_.js 420 kB 420 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

Other — 3.47 MB (baseline 3.47 MB) • 🔴 +4.69 kB

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/SubscriptionRequiredDialogContent-B0oED_N9.js (removed) 29 kB 🟢 -29 kB 🟢 -6.42 kB 🟢 -5.57 kB
assets/SubscriptionRequiredDialogContent-CKL5zYQG.js (new) 29 kB 🔴 +29 kB 🔴 +6.42 kB 🔴 +5.59 kB
assets/WidgetRecordAudio-CqDNg3dl.js (removed) 20.4 kB 🟢 -20.4 kB 🟢 -5.23 kB 🟢 -4.64 kB
assets/WidgetRecordAudio-DDq3pAVf.js (new) 20.4 kB 🔴 +20.4 kB 🔴 +5.23 kB 🔴 +4.64 kB
assets/AudioPreviewPlayer-DKT7x801.js (new) 13.3 kB 🔴 +13.3 kB 🔴 +3.35 kB 🔴 +3 kB
assets/AudioPreviewPlayer-e5LiPCZM.js (removed) 13.3 kB 🟢 -13.3 kB 🟢 -3.35 kB 🟢 -3 kB
assets/ValueControlPopover-0DSbyd55.js (new) 5.49 kB 🔴 +5.49 kB 🔴 +1.7 kB 🔴 +1.51 kB
assets/ValueControlPopover-B62K3PHA.js (removed) 5.49 kB 🟢 -5.49 kB 🟢 -1.71 kB 🟢 -1.52 kB
assets/OBJLoader2Worker-GDlTeC1j.js (new) 4.69 kB 🔴 +4.69 kB 🔴 +1.24 kB 🔴 +1.08 kB
assets/WidgetGalleria-DlKW3azQ.js (new) 4.1 kB 🔴 +4.1 kB 🔴 +1.45 kB 🔴 +1.3 kB
assets/WidgetGalleria-DnEOtuu5.js (removed) 4.1 kB 🟢 -4.1 kB 🟢 -1.44 kB 🟢 -1.3 kB
assets/WidgetColorPicker-B5DwYGMj.js (removed) 3.41 kB 🟢 -3.41 kB 🟢 -1.38 kB 🟢 -1.23 kB
assets/WidgetColorPicker-DtdnROzr.js (new) 3.41 kB 🔴 +3.41 kB 🔴 +1.38 kB 🔴 +1.23 kB
assets/WidgetImageCompare-C2io158s.js (new) 3.18 kB 🔴 +3.18 kB 🔴 +1.1 kB 🔴 +952 B
assets/WidgetImageCompare-CPasFD9R.js (removed) 3.18 kB 🟢 -3.18 kB 🟢 -1.1 kB 🟢 -955 B
assets/WidgetTextarea-CrRwku9B.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.21 kB 🔴 +1.07 kB
assets/WidgetTextarea-DcVO9ONg.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.22 kB 🟢 -1.08 kB
assets/WidgetMarkdown-BMO8lD23.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.28 kB 🟢 -1.13 kB
assets/WidgetMarkdown-C6LZkUCg.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.28 kB 🔴 +1.13 kB
assets/WidgetAudioUI-Bc9pk1oE.js (removed) 2.89 kB 🟢 -2.89 kB 🟢 -1.17 kB 🟢 -1.05 kB
assets/WidgetAudioUI-D8Yy1ZFe.js (new) 2.89 kB 🔴 +2.89 kB 🔴 +1.17 kB 🔴 +1.06 kB
assets/MediaVideoTop-BBrtuHMQ.js (removed) 2.65 kB 🟢 -2.65 kB 🟢 -1.01 kB 🟢 -869 B
assets/MediaVideoTop-BXyavTZf.js (new) 2.65 kB 🔴 +2.65 kB 🔴 +1.02 kB 🔴 +867 B
assets/WidgetChart-dhwVJAgU.js (new) 2.48 kB 🔴 +2.48 kB 🔴 +931 B 🔴 +816 B
assets/WidgetChart-DSurjgrZ.js (removed) 2.48 kB 🟢 -2.48 kB 🟢 -930 B 🟢 -817 B
assets/WidgetInputText-B7GVEySd.js (new) 1.99 kB 🔴 +1.99 kB 🔴 +921 B 🔴 +847 B
assets/WidgetInputText-Bnu09zmd.js (removed) 1.99 kB 🟢 -1.99 kB 🟢 -921 B 🟢 -834 B
assets/WidgetToggleSwitch-DLS2Bjhp.js (removed) 1.76 kB 🟢 -1.76 kB 🟢 -834 B 🟢 -735 B
assets/WidgetToggleSwitch-NIBDbbHG.js (new) 1.76 kB 🔴 +1.76 kB 🔴 +837 B 🔴 +735 B
assets/MediaImageTop-DmgiGEEz.js (new) 1.75 kB 🔴 +1.75 kB 🔴 +841 B 🔴 +720 B
assets/MediaImageTop-DoyWuZ6A.js (removed) 1.75 kB 🟢 -1.75 kB 🟢 -842 B 🟢 -715 B
assets/MediaImageBottom-DcMvBukd.js (removed) 1.55 kB 🟢 -1.55 kB 🟢 -732 B 🟢 -645 B
assets/MediaImageBottom-DLy_10FW.js (new) 1.55 kB 🔴 +1.55 kB 🔴 +735 B 🔴 +643 B
assets/MediaAudioBottom-cgx06SfY.js (removed) 1.51 kB 🟢 -1.51 kB 🟢 -734 B 🟢 -646 B
assets/MediaAudioBottom-CkFU50Zp.js (new) 1.51 kB 🔴 +1.51 kB 🔴 +734 B 🔴 +652 B
assets/Media3DBottom-BpoTVAWB.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +731 B 🔴 +651 B
assets/Media3DBottom-BXUMGWI6.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -733 B 🟢 -650 B
assets/MediaVideoBottom-C1czouFJ.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -732 B 🟢 -647 B
assets/MediaVideoBottom-C24YvyTV.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +732 B 🔴 +652 B
assets/Media3DTop-dC8dNLwV.js (new) 1.49 kB 🔴 +1.49 kB 🔴 +764 B 🔴 +655 B
assets/Media3DTop-O5zMHsIB.js (removed) 1.49 kB 🟢 -1.49 kB 🟢 -769 B 🟢 -650 B
assets/MediaAudioTop-DNcFZed8.js (removed) 1.46 kB 🟢 -1.46 kB 🟢 -740 B 🟢 -619 B
assets/MediaAudioTop-DrF_Vdi7.js (new) 1.46 kB 🔴 +1.46 kB 🔴 +737 B 🔴 +621 B
assets/WidgetSelect-BcX_RbIS.js (removed) 733 B 🟢 -733 B 🟢 -360 B 🟢 -303 B
assets/WidgetSelect-C6RB1e00.js (new) 733 B 🔴 +733 B 🔴 +362 B 🔴 +334 B
assets/WidgetInputNumber-Cl3xzaQo.js (new) 673 B 🔴 +673 B 🔴 +349 B 🔴 +291 B
assets/WidgetInputNumber-DwCxiMIp.js (removed) 673 B 🟢 -673 B 🟢 -347 B 🟢 -287 B
assets/Load3D-CNT6sPuj.js (new) 424 B 🔴 +424 B 🔴 +267 B 🔴 +224 B
assets/Load3D-DCgNYtQy.js (removed) 424 B 🟢 -424 B 🟢 -268 B 🟢 -226 B
assets/WidgetLegacy-CDxxyhjZ.js (new) 364 B 🔴 +364 B 🔴 +237 B 🔴 +195 B
assets/WidgetLegacy-Eh5K5RnT.js (removed) 364 B 🟢 -364 B 🟢 -238 B 🟢 -195 B
assets/commands-bTEY9Mp6.js 13.8 kB 13.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BWp4HdfU.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CcfGaui5.js 14.4 kB 14.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CisfgZf5.js 13.7 kB 13.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CkU12Foh.js 13 kB 13 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CoH2DJa6.js 14.2 kB 14.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-COSt-Bjx.js 14.9 kB 14.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DalfIW5f.js 15.9 kB 15.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DfTl0eCm.js 13.5 kB 13.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DwSJL865.js 13.7 kB 13.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Bdc58rJq.js 97.1 kB 97.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BRKE6VDs.js 91 kB 91 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-C9ZJBRdI.js 81.5 kB 81.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CAL83XT3.js 84.6 kB 84.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CHLLfvpG.js 82.4 kB 82.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Cw9RZWRY.js 89 B 89 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DDqR5EuX.js 71.3 kB 71.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DLHyaEcz.js 92.1 kB 92.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-O7KfJeMO.js 79.9 kB 79.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-OzGsrlqJ.js 112 kB 112 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-aW9En70v.js 260 kB 260 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BIckSVgU.js 273 kB 273 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BiYpVi7D.js 263 kB 263 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Bw_Jitw_.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CCEXtYfM.js 243 kB 243 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CvmVDWYd.js 323 kB 323 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-D_wreoPJ.js 267 kB 267 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DIAYlJwM.js 246 kB 246 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Dz-0ZIBN.js 297 kB 297 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-VZsNmhG7.js 264 kB 264 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widgetPropFilter-BIbGSUAt.js 1.28 kB 1.28 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 26 added / 25 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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/extensions/core/load3d/LoaderManager.ts (1)

173-201: Fix: Wrap the OBJ case in a block to restrict variable scope.

The objUrl constant is declared in a switch case without block scope, which violates ES6 scoping rules and could allow other switch cases to erroneously access this declaration.

🔎 Proposed fix
     case 'obj':
+      {
       if (this.modelManager.materialMode === 'original') {
         try {
           this.mtlLoader.setPath(path)
 
           const mtlFileName = filename.replace(/\.obj$/, '.mtl')
 
           const materials = await this.mtlLoader.loadAsync(mtlFileName)
           materials.preload()
           const materialsFromMtl =
             MtlObjBridge.addMaterialsFromMtlLoader(materials)
           this.objLoader.setMaterials(materialsFromMtl)
         } catch (e) {
           console.log(
             'No MTL file found or error loading it, continuing without materials'
           )
         }
       }
 
       // OBJLoader2Parallel uses Web Worker for parsing (non-blocking)
       const objUrl = path + encodeURIComponent(filename)
       model = await this.objLoader.loadAsync(objUrl)
 
       model.traverse((child) => {
         if (child instanceof THREE.Mesh) {
           this.modelManager.originalMaterials.set(child, child.material)
         }
       })
       break
+      }
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7fcfa4c and cc44fd6.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (6)
  • package.json
  • pnpm-workspace.yaml
  • src/extensions/core/load3d/Load3dUtils.ts
  • src/extensions/core/load3d/LoaderManager.ts
  • src/extensions/core/load3d/interfaces.ts
  • src/locales/en/main.json
🧰 Additional context used
📓 Path-based instructions (7)
**/*.{ts,tsx,vue,js,jsx,json,css}

📄 CodeRabbit inference engine (AGENTS.md)

Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, and 80-character line width

Files:

  • package.json
  • src/locales/en/main.json
  • src/extensions/core/load3d/LoaderManager.ts
  • src/extensions/core/load3d/Load3dUtils.ts
  • src/extensions/core/load3d/interfaces.ts
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/extensions/core/load3d/LoaderManager.ts
  • src/extensions/core/load3d/Load3dUtils.ts
  • src/extensions/core/load3d/interfaces.ts
src/**/*.ts

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

src/**/*.ts: Use es-toolkit for utility functions
Use TypeScript for type safety

Files:

  • src/extensions/core/load3d/LoaderManager.ts
  • src/extensions/core/load3d/Load3dUtils.ts
  • src/extensions/core/load3d/interfaces.ts
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/extensions/core/load3d/LoaderManager.ts
  • src/extensions/core/load3d/Load3dUtils.ts
  • src/extensions/core/load3d/interfaces.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/extensions/core/load3d/LoaderManager.ts
  • src/extensions/core/load3d/Load3dUtils.ts
  • src/extensions/core/load3d/interfaces.ts
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,vue}: Use TypeScript exclusively; do not write new JavaScript code
Use sorted and grouped imports organized by plugin/source
Enforce ESLint rules including Vue + TypeScript rules, disallow floating promises, disallow unused imports, and restrict i18n raw text in templates
Do not use any type or as any type assertions; fix the underlying type issue instead
Write code that is expressive and self-documenting; avoid redundant comments and clean as you go
Keep functions short and functional; minimize nesting and follow the arrow anti-pattern
Avoid mutable state; prefer immutability and assignment at point of declaration
Use function declarations instead of function expressions when possible
Use es-toolkit for utility functions
Implement proper error handling in code

Files:

  • src/extensions/core/load3d/LoaderManager.ts
  • src/extensions/core/load3d/Load3dUtils.ts
  • src/extensions/core/load3d/interfaces.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Minimize the surface area (exported values) of each module and composable

Files:

  • src/extensions/core/load3d/LoaderManager.ts
  • src/extensions/core/load3d/Load3dUtils.ts
  • src/extensions/core/load3d/interfaces.ts
🧠 Learnings (11)
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/{components,composables}/**/*.{ts,tsx,vue} : Use vue-i18n for ALL user-facing strings by adding them to `src/locales/en/main.json`

Applied to files:

  • package.json
📚 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 vue-i18n for ALL UI strings

Applied to files:

  • package.json
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.vue : Use `vue-i18n` in composition API for string literals; place new translation entries in `src/locales/en/main.json`

Applied to files:

  • package.json
📚 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} : Use vue-i18n in composition API for any string literals. Place new translation entries in src/locales/en/main.json

Applied to files:

  • package.json
📚 Learning: 2025-12-09T04:35:43.971Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 6300
File: src/locales/en/main.json:774-780
Timestamp: 2025-12-09T04:35:43.971Z
Learning: In the Comfy-Org/ComfyUI_frontend repository, locale files other than `src/locales/en/main.json` are generated automatically on every release. Developers only need to add English (en) key/values in `src/locales/en/main.json` when making PRs; manual updates to other locale files (fr, ja, ko, ru, zh, zh-TW, es, ar, tr, etc.) are not required and should not be suggested in reviews.

Applied to files:

  • src/locales/en/main.json
📚 Learning: 2025-12-09T03:39:54.501Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7169
File: src/platform/remote/comfyui/jobs/jobTypes.ts:1-107
Timestamp: 2025-12-09T03:39:54.501Z
Learning: In the ComfyUI_frontend project, Zod is on v3.x. Do not suggest Zod v4 standalone validators (z.uuid, z.ulid, z.cuid2, z.nanoid) until an upgrade to Zod 4 is performed. When reviewing TypeScript files (e.g., src/platform/remote/comfyui/jobs/jobTypes.ts) validate against Zod 3 capabilities and avoid introducing v4-specific features; flag any proposal to upgrade or incorporate v4-only validators and propose staying with compatible 3.x patterns.

Applied to files:

  • src/extensions/core/load3d/LoaderManager.ts
  • src/extensions/core/load3d/Load3dUtils.ts
  • src/extensions/core/load3d/interfaces.ts
📚 Learning: 2025-12-13T11:03:11.264Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7416
File: src/stores/imagePreviewStore.ts:5-7
Timestamp: 2025-12-13T11:03:11.264Z
Learning: In the ComfyUI_frontend repository, lint rules require keeping 'import type' statements separate from non-type imports, even if importing from the same module. Do not suggest consolidating them into a single import statement. Ensure type imports remain on their own line (import type { ... } from 'module') and regular imports stay on separate lines.

Applied to files:

  • src/extensions/core/load3d/LoaderManager.ts
  • src/extensions/core/load3d/Load3dUtils.ts
  • src/extensions/core/load3d/interfaces.ts
📚 Learning: 2025-12-17T00:40:09.635Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7537
File: src/components/ui/button/Button.stories.ts:45-55
Timestamp: 2025-12-17T00:40:09.635Z
Learning: Prefer pure function declarations over function expressions (e.g., use function foo() { ... } instead of const foo = () => { ... }) for pure functions in the repository. Function declarations are more functional-leaning, offer better hoisting clarity, and can improve readability and tooling consistency. Apply this guideline across TypeScript files in Comfy-Org/ComfyUI_frontend, including story and UI component code, except where a function expression is semantically required (e.g., callbacks, higher-order functions with closures).

Applied to files:

  • src/extensions/core/load3d/LoaderManager.ts
  • src/extensions/core/load3d/Load3dUtils.ts
  • src/extensions/core/load3d/interfaces.ts
📚 Learning: 2025-12-30T22:22:33.836Z
Learnt from: kaili-yang
Repo: Comfy-Org/ComfyUI_frontend PR: 7805
File: src/composables/useCoreCommands.ts:439-439
Timestamp: 2025-12-30T22:22:33.836Z
Learning: When accessing reactive properties from Pinia stores in TypeScript files, avoid using .value on direct property access (e.g., useStore().isOverlayExpanded). Pinia auto-wraps refs when accessed directly, returning the primitive value. The .value accessor is only needed when destructuring store properties or when using storeToRefs().

Applied to files:

  • src/extensions/core/load3d/LoaderManager.ts
  • src/extensions/core/load3d/Load3dUtils.ts
  • src/extensions/core/load3d/interfaces.ts
📚 Learning: 2025-12-11T12:25:15.470Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7358
File: src/components/dialog/content/signin/SignUpForm.vue:45-54
Timestamp: 2025-12-11T12:25:15.470Z
Learning: This repository uses CI automation to format code (pnpm format). Do not include manual formatting suggestions in code reviews for Comfy-Org/ComfyUI_frontend. If formatting issues are detected, rely on the CI formatter or re-run pnpm format. Focus reviews on correctness, readability, performance, accessibility, and maintainability rather than style formatting.

Applied to files:

  • src/extensions/core/load3d/LoaderManager.ts
  • src/extensions/core/load3d/Load3dUtils.ts
  • src/extensions/core/load3d/interfaces.ts
📚 Learning: 2025-12-09T03:40:02.262Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7169
File: src/platform/remote/comfyui/jobs/jobTypes.ts:1-107
Timestamp: 2025-12-09T03:40:02.262Z
Learning: The ComfyUI_frontend project currently uses Zod 3 (^3.23.8 in catalog). Zod 4-specific features like standalone format validators (z.uuid(), z.ulid(), z.cuid2(), z.nanoid()) are not available and should not be suggested until after the project upgrades to Zod 4.

Applied to files:

  • pnpm-workspace.yaml
🧬 Code graph analysis (1)
src/extensions/core/load3d/Load3dUtils.ts (1)
src/platform/updates/common/toastStore.ts (1)
  • useToastStore (8-39)
🪛 Biome (2.1.2)
src/extensions/core/load3d/LoaderManager.ts

[error] 193-193: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)

⏰ 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: setup
  • GitHub Check: test
  • GitHub Check: lint-and-format
  • GitHub Check: collect
🔇 Additional comments (10)
src/locales/en/main.json (1)

1703-1703: LGTM! Localization string properly added.

The new fileTooLarge toast message follows the correct i18n pattern with appropriate placeholders for dynamic file size values. Per project guidelines, only the English locale file needs manual updates.

pnpm-workspace.yaml (1)

107-107: LGTM! Catalog entry properly configured.

The wwobjloader2 version constraint follows the project's catalog pattern correctly.

src/extensions/core/load3d/interfaces.ts (2)

8-8: LGTM! Import updated for worker-based OBJ loading.

The import statement correctly references OBJLoader2Parallel from the wwobjloader2 library, which enables parallel/worker-based loading to prevent UI blocking.


182-182: No changes needed — The objLoader type change from OBJLoader to OBJLoader2Parallel is properly implemented and fully compatible.

LoaderManager.ts correctly instantiates OBJLoader2Parallel, configures the web worker via setWorkerUrl(), and all usages (setMaterials, loadAsync) align with the new type. The implementation matches the interface definition without any breaking changes.

src/extensions/core/load3d/Load3dUtils.ts (2)

37-37: LGTM! File size limit constant properly defined.

The 100 MB limit is reasonable and matches the PR's testing with a 97 MB file. Using a readonly constant is good practice for maintainability.


81-81: LGTM! Improved error logging with prefix.

Adding the [Load3D] prefix makes logs easier to filter and trace, improving debugging experience.

package.json (1)

190-190: Version ^6.2.1 is the current latest stable release. No known security advisories found.

src/extensions/core/load3d/LoaderManager.ts (3)

192-194: OBJLoader2Parallel.loadAsync API and file size validation confirmed.

The code correctly uses OBJLoader2Parallel.loadAsync(objUrl) which matches the standard three.js Loader pattern signature loadAsync(url: string): Promise<Object3D>. File size validation (100 MB limit) is properly integrated at the upload stage in Load3dUtils.validateFile() before URLs reach LoaderManager.loadModelInternal(). URL encoding with encodeURIComponent is correct.


182-184: No action needed—the MtlObjBridge.addMaterialsFromMtlLoader API is correctly used and properly converts THREE's MTLLoader materials to the format expected by OBJLoader2Parallel.setMaterials, following the documented pattern in wwobjloader2 v6.2.1.


8-9: Remove non-existent setWorkerUrl() call and fix material method name.

The wwobjloader2 library does not expose a setWorkerUrl() method on OBJLoader2Parallel. The correct worker configuration uses getWorkerExecutionSupport(), setExecuteParallel(), and setPreferJsmWorker() methods instead. Lines 47-50 should be removed or replaced with the proper API.

Additionally, line 184 should use addMaterials() instead of setMaterials() to match the library's documented API:

Suggested fix for material method
- this.objLoader.setMaterials(materialsFromMtl)
+ this.objLoader.addMaterials(materialsFromMtl)

Likely an incorrect or invalid review comment.

Copy link
Member

@benceruleanlu benceruleanlu left a comment

Choose a reason for hiding this comment

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

lgtm, small nit is just be careful of uploadFile's return type being any


const fileSizeMB = file.size / 1024 / 1024
if (fileSizeMB > this.MAX_UPLOAD_SIZE_MB) {
const message = t('toastMessages.fileTooLarge', {
Copy link
Member

Choose a reason for hiding this comment

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

nit: we moved to usei18n for t here, so the import might want changing

Comment on lines +48 to +53
console.warn(
'[Load3D] uploadFile: file too large',
fileSizeMB.toFixed(2),
'MB'
)
useToastStore().addAlert(message)
Copy link
Member

Choose a reason for hiding this comment

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

nit: all but one downstream caller handles undefined as well by showing their own toast, which causes a double toast ux annoyance on this case

@jtydhr88 jtydhr88 merged commit a13aa90 into main Jan 5, 2026
34 checks passed
@jtydhr88 jtydhr88 deleted the feat/async-obj-loading branch January 5, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Loading large 3D models should not block the entire UI

3 participants