Skip to content

improve logic of 3d scene size#7619

Merged
jtydhr88 merged 2 commits intomainfrom
3d-scene-size
Dec 19, 2025
Merged

improve logic of 3d scene size#7619
jtydhr88 merged 2 commits intomainfrom
3d-scene-size

Conversation

@jtydhr88
Copy link
Collaborator

@jtydhr88 jtydhr88 commented Dec 18, 2025

Summary

improve 3d scene size logic, for preview3d, it should not have target size

┆Issue is synchronized with this Notion page by Unito

@jtydhr88 jtydhr88 requested a review from a team as a code owner December 18, 2025 19:49
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Dec 18, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 18, 2025

📝 Walkthrough

Walkthrough

The changes modify dimension handling in the 3D viewer by introducing conditional initialization. Default target dimensions are reduced from 512 to 0, and the composable now only enables viewer mode and provides dimension retrieval when both width and height dimensions are explicitly available.

Changes

Cohort / File(s) Summary
Dimension initialization and conditional viewer mode
src/composables/useLoad3dViewer.ts, src/extensions/core/load3d/Load3d.ts
Default targetWidth/targetHeight changed from 512 → 0. Adds hasTargetDimensions derived flag; getDimensions is supplied only when both dimensions exist. isViewerMode now depends on hasTargetDimensions, affecting node-mode initialization and aspect-ratio decisions.
Test expectation update
tests-ui/tests/composables/useLoad3dViewer.test.ts
Updated test expectation: Load3d initialization from a source state now expects isViewerMode: false instead of true.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 3d-scene-size

📜 Recent review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 846c511 and 4bcc2c8.

📒 Files selected for processing (1)
  • tests-ui/tests/composables/useLoad3dViewer.test.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
tests-ui/**/*.test.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (tests-ui/CLAUDE.md)

tests-ui/**/*.test.{js,ts,jsx,tsx}: Write tests for new features
Follow existing test patterns in the codebase
Use existing test utilities rather than writing custom utilities
Mock external dependencies in tests
Always prefer vitest mock functions over writing verbose manual mocks

Files:

  • tests-ui/tests/composables/useLoad3dViewer.test.ts
tests-ui/**/*.test.ts

📄 CodeRabbit inference engine (AGENTS.md)

tests-ui/**/*.test.ts: Write tests for all changes, especially bug fixes to catch future regressions
Unit/Component test files must use pattern **/*.test.ts
Do not write change detector tests - do not just assert that defaults are certain values
Do not write tests dependent on non-behavioral features like utility classes or styles
Be parsimonious in testing - do not write redundant tests
Do not write tests that just test the mocks - ensure tests fail when code behaves unexpectedly
For mocking, leverage Vitest's utilities where possible
Keep module mocks contained - do not use global mutable state within test files, use vi.hoisted() if necessary
For Component testing, use Vue Test Utils and follow advice about making components easy to test
Aim for behavioral coverage of critical and new features

Files:

  • tests-ui/tests/composables/useLoad3dViewer.test.ts
🧠 Learnings (6)
📚 Learning: 2025-12-17T01:01:03.609Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-17T01:01:03.609Z
Learning: Applies to tests-ui/**/*.test.ts : Do not write change detector tests - do not just assert that defaults are certain values

Applied to files:

  • tests-ui/tests/composables/useLoad3dViewer.test.ts
📚 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:

  • tests-ui/tests/composables/useLoad3dViewer.test.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:

  • tests-ui/tests/composables/useLoad3dViewer.test.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:

  • tests-ui/tests/composables/useLoad3dViewer.test.ts
📚 Learning: 2025-12-10T03:09:13.807Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7303
File: src/components/topbar/CurrentUserPopover.test.ts:199-205
Timestamp: 2025-12-10T03:09:13.807Z
Learning: In test files, prefer selecting or asserting on accessible properties (text content, aria-label, role, accessible name) over data-testid attributes. This ensures tests validate actual user-facing behavior and accessibility, reducing reliance on implementation details like test IDs.

Applied to files:

  • tests-ui/tests/composables/useLoad3dViewer.test.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:

  • tests-ui/tests/composables/useLoad3dViewer.test.ts
⏰ 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: lint-and-format
  • GitHub Check: test
  • GitHub Check: collect

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 Dec 18, 2025

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 12/18/2025, 07:56:40 PM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Dec 18, 2025

🎭 Playwright Test Results

🕵🏻 No test results found

⏰ Completed at: 12/19/2025, 04:53:00 AM UTC

📊 Test Reports by Browser

  • chromium: Deployment failed
  • chromium-2x: Deployment failed
  • chromium-0.5x: Deployment failed
  • mobile-chrome: Deployment failed

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

@github-actions
Copy link

github-actions bot commented Dec 18, 2025

Bundle Size Report

Summary

  • Raw size: 16.6 MB baseline 16.6 MB — 🔴 +70 B
  • Gzip: 3.37 MB baseline 3.37 MB — 🔴 +13 B
  • Brotli: 2.6 MB baseline 2.6 MB — 🟢 -3 B
  • Bundles: 99 current • 99 baseline • 42 added / 42 removed

Category Glance
App Entry Points 🔴 +70 B (3.21 MB) · Vendor & Third-Party ⚪ 0 B (8.46 MB) · Other ⚪ 0 B (3.44 MB) · Graph Workspace ⚪ 0 B (996 kB) · Panels & Settings ⚪ 0 B (297 kB) · UI Components ⚪ 0 B (184 kB) · + 3 more

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

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-DOdLXpow.js (new) 2.98 MB 🔴 +2.98 MB 🔴 +628 kB 🔴 +478 kB
assets/index-b--AMHCr.js (removed) 2.98 MB 🟢 -2.98 MB 🟢 -628 kB 🟢 -478 kB
assets/index-12rz66YK.js (new) 227 kB 🔴 +227 kB 🔴 +48.5 kB 🔴 +39.8 kB
assets/index-DCl3hdq3.js (removed) 227 kB 🟢 -227 kB 🟢 -48.5 kB 🟢 -39.8 kB
assets/index-BjV_7nX2.js (removed) 345 B 🟢 -345 B 🟢 -245 B 🟢 -233 B
assets/index-CgbKhnC2.js (new) 345 B 🔴 +345 B 🔴 +243 B 🔴 +226 B

Status: 3 added / 3 removed

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

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-BJdJ5-Yc.js (removed) 996 kB 🟢 -996 kB 🟢 -195 kB 🟢 -148 kB
assets/GraphView-DwLBR3o3.js (new) 996 kB 🔴 +996 kB 🔴 +195 kB 🔴 +148 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-B_rIozp9.js (new) 6.54 kB 🔴 +6.54 kB 🔴 +2.14 kB 🔴 +1.89 kB
assets/UserSelectView-mU8pzQlj.js (removed) 6.54 kB 🟢 -6.54 kB 🟢 -2.14 kB 🟢 -1.89 kB

Status: 1 added / 1 removed

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

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/LegacyCreditsPanel-BVB0mkb8.js (removed) 21.4 kB 🟢 -21.4 kB 🟢 -5.16 kB 🟢 -4.51 kB
assets/LegacyCreditsPanel-LWSWN14J.js (new) 21.4 kB 🔴 +21.4 kB 🔴 +5.16 kB 🔴 +4.51 kB
assets/KeybindingPanel-DvShg0jw.js (new) 13.6 kB 🔴 +13.6 kB 🔴 +3.42 kB 🔴 +3.01 kB
assets/KeybindingPanel-ycDa0hWr.js (removed) 13.6 kB 🟢 -13.6 kB 🟢 -3.42 kB 🟢 -3.01 kB
assets/ExtensionPanel-DQMYYxHT.js (new) 10.8 kB 🔴 +10.8 kB 🔴 +2.57 kB 🔴 +2.25 kB
assets/ExtensionPanel-lx8CfTVv.js (removed) 10.8 kB 🟢 -10.8 kB 🟢 -2.57 kB 🟢 -2.24 kB
assets/AboutPanel-BBAbu6zb.js (new) 9.16 kB 🔴 +9.16 kB 🔴 +2.46 kB 🔴 +2.2 kB
assets/AboutPanel-Bo_hUjhd.js (removed) 9.16 kB 🟢 -9.16 kB 🟢 -2.46 kB 🟢 -2.21 kB
assets/ServerConfigPanel-BGQOM0do.js (new) 7.07 kB 🔴 +7.07 kB 🔴 +1.98 kB 🔴 +1.76 kB
assets/ServerConfigPanel-OH9rJM2H.js (removed) 7.07 kB 🟢 -7.07 kB 🟢 -1.98 kB 🟢 -1.76 kB
assets/UserPanel-BEGVBIik.js (removed) 6.23 kB 🟢 -6.23 kB 🟢 -1.72 kB 🟢 -1.5 kB
assets/UserPanel-Bmwhy70i.js (new) 6.23 kB 🔴 +6.23 kB 🔴 +1.71 kB 🔴 +1.5 kB
assets/settings-BhbWhsRg.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BvFz-TmQ.js 33.1 kB 33.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BxYnTA2y.js 21.5 kB 21.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-C6bMjAne.js 27.1 kB 27.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-C7Yhp7H7.js 24 kB 24 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CsnOn8G0.js 25.7 kB 25.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-D5BGNZ7M.js 24.8 kB 24.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-D7k3huHm.js 25 kB 25 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DamkILzl.js 26.4 kB 26.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-s1k0gw1Y.js 20.9 kB 20.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

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

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/Load3D.vue_vue_type_script_setup_true_lang-BrWl91Bb.js (new) 53.5 kB 🔴 +53.5 kB 🔴 +8.45 kB 🔴 +7.25 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-CFxjE1Kr.js (removed) 53.5 kB 🟢 -53.5 kB 🟢 -8.45 kB 🟢 -7.25 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-DiaRJU6A.js (new) 48.8 kB 🔴 +48.8 kB 🔴 +10.5 kB 🔴 +9.14 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-eHRguUEF.js (removed) 48.8 kB 🟢 -48.8 kB 🟢 -10.5 kB 🟢 -9.14 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-Dl_EcfmH.js (removed) 48.4 kB 🟢 -48.4 kB 🟢 -10.7 kB 🟢 -9.35 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-Lrrhym5K.js (new) 48.4 kB 🔴 +48.4 kB 🔴 +10.7 kB 🔴 +9.35 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-BC_ef4o6.js (new) 14.3 kB 🔴 +14.3 kB 🔴 +3.73 kB 🔴 +3.28 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-BPKbW2_t.js (removed) 14.3 kB 🟢 -14.3 kB 🟢 -3.74 kB 🟢 -3.29 kB
assets/ComfyQueueButton-34EqADz4.js (removed) 8.49 kB 🟢 -8.49 kB 🟢 -2.49 kB 🟢 -2.22 kB
assets/ComfyQueueButton-C-SG_w8G.js (new) 8.49 kB 🔴 +8.49 kB 🔴 +2.49 kB 🔴 +2.22 kB
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-CbtLKqU6.js (removed) 3.68 kB 🟢 -3.68 kB 🟢 -1.45 kB 🟢 -1.31 kB
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-D4Nw_2m3.js (new) 3.68 kB 🔴 +3.68 kB 🔴 +1.45 kB 🔴 +1.31 kB
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-Cak4NEmH.js (removed) 2.14 kB 🟢 -2.14 kB 🟢 -889 B 🟢 -769 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-CysGeIcc.js (new) 2.14 kB 🔴 +2.14 kB 🔴 +888 B 🔴 +762 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-C0G8vmXI.js (new) 897 B 🔴 +897 B 🔴 +504 B 🔴 +430 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-D_8ezSS_.js (removed) 897 B 🟢 -897 B 🟢 -502 B 🟢 -437 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-C6S4PBEs.js 1.34 kB 1.34 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetButton-B5FcXt9_.js 2.04 kB 2.04 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 8 added / 8 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-B3wd8-R9.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -1.83 kB 🟢 -1.57 kB
assets/keybindingService-ChGEXREC.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +1.83 kB 🔴 +1.57 kB
assets/audioService-C7ouadPE.js (removed) 2.2 kB 🟢 -2.2 kB 🟢 -961 B 🟢 -819 B
assets/audioService-DH1UqNCi.js (new) 2.2 kB 🔴 +2.2 kB 🔴 +962 B 🔴 +826 B
assets/serverConfigStore-DDOxHQs5.js 2.83 kB 2.83 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 2 added / 2 removed

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

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/audioUtils-63S7TjfH.js (removed) 1.41 kB 🟢 -1.41 kB 🟢 -650 B 🟢 -547 B
assets/audioUtils-BljSvXqo.js (new) 1.41 kB 🔴 +1.41 kB 🔴 +650 B 🔴 +548 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.46 MB (baseline 8.46 MB) • ⚪ 0 B

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-chart-4Lxb_aRy.js 452 kB 452 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-other-N5ffP4jf.js 3.86 MB 3.86 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-primevue-BAx-x20c.js 1.96 MB 1.96 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-three-C1LfRdh4.js 1.37 MB 1.37 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-tiptap-DMBnJfDx.js 232 kB 232 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-vue-DyquAs8-.js 160 kB 160 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-xterm-BF8peZ5_.js 420 kB 420 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Other — 3.44 MB (baseline 3.44 MB) • ⚪ 0 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/SubscriptionRequiredDialogContent-C14JNjqx.js (new) 28.1 kB 🔴 +28.1 kB 🔴 +6.34 kB 🔴 +5.49 kB
assets/SubscriptionRequiredDialogContent-COneFuUv.js (removed) 28.1 kB 🟢 -28.1 kB 🟢 -6.34 kB 🟢 -5.49 kB
assets/WidgetRecordAudio-BLAwoFMg.js (new) 20.4 kB 🔴 +20.4 kB 🔴 +5.23 kB 🔴 +4.63 kB
assets/WidgetRecordAudio-PzGf0u5i.js (removed) 20.4 kB 🟢 -20.4 kB 🟢 -5.23 kB 🟢 -4.63 kB
assets/AudioPreviewPlayer-BZ0Q8AyG.js (new) 13.4 kB 🔴 +13.4 kB 🔴 +3.37 kB 🔴 +3.01 kB
assets/AudioPreviewPlayer-Djo3WK62.js (removed) 13.4 kB 🟢 -13.4 kB 🟢 -3.37 kB 🟢 -3.01 kB
assets/ValueControlPopover-cwVUQ1YT.js (new) 5.49 kB 🔴 +5.49 kB 🔴 +1.7 kB 🔴 +1.51 kB
assets/ValueControlPopover-D3jvr0pq.js (removed) 5.49 kB 🟢 -5.49 kB 🟢 -1.7 kB 🟢 -1.51 kB
assets/WidgetGalleria-BNBhvcr7.js (new) 4.1 kB 🔴 +4.1 kB 🔴 +1.44 kB 🔴 +1.3 kB
assets/WidgetGalleria-wSyR-2bj.js (removed) 4.1 kB 🟢 -4.1 kB 🟢 -1.44 kB 🟢 -1.3 kB
assets/WidgetColorPicker-BbXYFyCk.js (new) 3.41 kB 🔴 +3.41 kB 🔴 +1.38 kB 🔴 +1.23 kB
assets/WidgetColorPicker-Dy08R4s9.js (removed) 3.41 kB 🟢 -3.41 kB 🟢 -1.38 kB 🟢 -1.23 kB
assets/WidgetTextarea-DqRocTZY.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.21 kB 🟢 -1.09 kB
assets/WidgetTextarea-HK0SYxvf.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.21 kB 🔴 +1.07 kB
assets/WidgetMarkdown-BM11L93Y.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.28 kB 🔴 +1.13 kB
assets/WidgetMarkdown-VaeVaAn9.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.28 kB 🟢 -1.12 kB
assets/WidgetAudioUI-BDbT7cv2.js (removed) 2.94 kB 🟢 -2.94 kB 🟢 -1.19 kB 🟢 -1.07 kB
assets/WidgetAudioUI-BkjuAWvu.js (new) 2.94 kB 🔴 +2.94 kB 🔴 +1.19 kB 🔴 +1.07 kB
assets/WidgetInputText-DSZ_gGsc.js (new) 1.99 kB 🔴 +1.99 kB 🔴 +916 B 🔴 +827 B
assets/WidgetInputText-DZ0jJCnh.js (removed) 1.99 kB 🟢 -1.99 kB 🟢 -919 B 🟢 -856 B
assets/WidgetToggleSwitch-8CyejbWd.js (removed) 1.76 kB 🟢 -1.76 kB 🟢 -832 B 🟢 -728 B
assets/WidgetToggleSwitch-pGupo-Cz.js (new) 1.76 kB 🔴 +1.76 kB 🔴 +831 B 🔴 +734 B
assets/MediaImageBottom--4wbty-E.js (removed) 1.55 kB 🟢 -1.55 kB 🟢 -728 B 🟢 -636 B
assets/MediaImageBottom-CeTFt55t.js (new) 1.55 kB 🔴 +1.55 kB 🔴 +733 B 🔴 +641 B
assets/MediaAudioBottom-C8nTOb-G.js (new) 1.51 kB 🔴 +1.51 kB 🔴 +732 B 🔴 +644 B
assets/MediaAudioBottom-rE3ISBaG.js (removed) 1.51 kB 🟢 -1.51 kB 🟢 -729 B 🟢 -644 B
assets/Media3DBottom-BPQCqoBh.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -728 B 🟢 -646 B
assets/Media3DBottom-CR8yv2UT.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +730 B 🔴 +649 B
assets/MediaVideoBottom-DdHSxq_w.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -727 B 🟢 -643 B
assets/MediaVideoBottom-DXHjLrBT.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +729 B 🔴 +644 B
assets/Media3DTop-BrmRzOJs.js (removed) 1.49 kB 🟢 -1.49 kB 🟢 -762 B 🟢 -653 B
assets/Media3DTop-D1fEixlm.js (new) 1.49 kB 🔴 +1.49 kB 🔴 +761 B 🔴 +648 B
assets/WidgetSelect-CMWYcT_3.js (removed) 733 B 🟢 -733 B 🟢 -363 B 🟢 -333 B
assets/WidgetSelect-DFeUJhO-.js (new) 733 B 🔴 +733 B 🔴 +359 B 🔴 +318 B
assets/WidgetInputNumber-D5mJ56ka.js (new) 673 B 🔴 +673 B 🔴 +348 B 🔴 +293 B
assets/WidgetInputNumber-Dr9NAavN.js (removed) 673 B 🟢 -673 B 🟢 -349 B 🟢 -286 B
assets/Load3D-CG0Ds1nE.js (new) 424 B 🔴 +424 B 🔴 +266 B 🔴 +223 B
assets/Load3D-T2jvZajj.js (removed) 424 B 🟢 -424 B 🟢 -265 B 🟢 -221 B
assets/WidgetLegacy-Ca1nb6tU.js (removed) 364 B 🟢 -364 B 🟢 -236 B 🟢 -191 B
assets/WidgetLegacy-CLxHaiH9.js (new) 364 B 🔴 +364 B 🔴 +236 B 🔴 +193 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/commands-Zxyx15Vd.js 12.8 kB 12.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BDhxs-bB.js 79.9 kB 79.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BtXVDFw6.js 84.7 kB 84.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Buv6RhU4.js 82.4 kB 82.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CgJ6zvJL.js 97.2 kB 97.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CI9qb0E5.js 112 kB 112 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Cu4LqtW0.js 81.6 kB 81.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Cw9RZWRY.js 89 B 89 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Dm19QY4N.js 92.2 kB 92.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Tihe0h_r.js 71.3 kB 71.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-wPWMutMw.js 70.4 kB 70.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaAudioTop-DbG-lp_Y.js 1.46 kB 1.46 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaImageTop-cYYPK99g.js 1.75 kB 1.75 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaVideoTop-D2Oavg0V.js 2.65 kB 2.65 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-1Vh3MCrN.js 240 kB 240 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-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/WidgetChart-54cAzoul.js 2.48 kB 2.48 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetImageCompare-bTic3jrs.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

Status: 20 added / 20 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: 1

Caution

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

⚠️ Outside diff range comments (2)
src/extensions/core/load3d/Load3d.ts (2)

273-280: Guard against division by zero in aspect ratio calculation.

If getDimensionsCallback returns dimensions where width or height is 0 or negative, line 278 will compute an invalid aspect ratio (NaN or Infinity). While widgets likely have sensible defaults in practice, defensive validation would prevent edge cases.

🔎 Apply this diff to add validation:
 if (this.getDimensionsCallback) {
   const dims = this.getDimensionsCallback()
-  if (dims) {
+  if (dims && dims.width > 0 && dims.height > 0) {
     this.targetWidth = dims.width
     this.targetHeight = dims.height
     this.targetAspectRatio = dims.width / dims.height
   }
 }

622-629: Guard against division by zero in aspect ratio calculation (duplicate issue).

Same issue as lines 273-280: if getDimensionsCallback returns zero or negative dimensions, line 627 will compute an invalid aspect ratio.

🔎 Apply this diff to add validation:
 if (this.getDimensionsCallback) {
   const dims = this.getDimensionsCallback()
-  if (dims) {
+  if (dims && dims.width > 0 && dims.height > 0) {
     this.targetWidth = dims.width
     this.targetHeight = dims.height
     this.targetAspectRatio = dims.width / dims.height
   }
 }
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fa1719f and 846c511.

📒 Files selected for processing (2)
  • src/composables/useLoad3dViewer.ts (1 hunks)
  • src/extensions/core/load3d/Load3d.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (11)
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

src/**/*.{vue,ts}: Avoid using ref and watch together - use computed instead if possible
Do not add ref if a prop would suffice; do not add computed if the ref/prop directly would work; use watch only when computed won't accomplish the goal
Leverage VueUse functions for performance-enhancing styles

Files:

  • src/extensions/core/load3d/Load3d.ts
  • src/composables/useLoad3dViewer.ts
src/**/*.ts

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

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

src/**/*.ts: Extract complex type definitions that are inlined in multiple related places - name them for reuse
Minimize the surface area (exported values) of each module and composable
Favor pure functions, especially testable ones

Files:

  • src/extensions/core/load3d/Load3d.ts
  • src/composables/useLoad3dViewer.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

src/**/*.{ts,tsx,vue}: ESLint rules: Vue + TS rules, no floating promises, unused imports disallowed, i18n raw text restrictions in templates
Use es-toolkit for utility functions
Avoid mutable state - prefer immutability and assignment at point of declaration
Never use any type - use proper TypeScript types
Never use as any type assertions - fix the underlying type issue

Files:

  • src/extensions/core/load3d/Load3d.ts
  • src/composables/useLoad3dViewer.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/extensions/core/load3d/Load3d.ts
  • src/composables/useLoad3dViewer.ts
src/**/*.{js,ts,tsx,vue}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript exclusively - no new JavaScript files

Files:

  • src/extensions/core/load3d/Load3d.ts
  • src/composables/useLoad3dViewer.ts
src/**/*.{ts,tsx,vue,js}

📄 CodeRabbit inference engine (AGENTS.md)

src/**/*.{ts,tsx,vue,js}: Indent with 2 spaces, use single quotes, no trailing semicolons, line width 80 - see .prettierrc
Sort and group imports by plugin, run pnpm format before committing

Files:

  • src/extensions/core/load3d/Load3d.ts
  • src/composables/useLoad3dViewer.ts
src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Do not use function expressions - use function declarations instead when possible

Files:

  • src/extensions/core/load3d/Load3d.ts
  • src/composables/useLoad3dViewer.ts
src/**/{services,composables}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/{services,composables}/**/*.{ts,tsx}: Use api.apiURL() for backend endpoints instead of constructing URLs directly
Use api.fileURL() for static file access instead of constructing URLs directly

Files:

  • src/composables/useLoad3dViewer.ts
src/**/{composables,components}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Clean up subscriptions in state management to prevent memory leaks

Files:

  • src/composables/useLoad3dViewer.ts
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/composables/useLoad3dViewer.ts
src/composables/**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Composables must follow the naming pattern useXyz.ts

Files:

  • src/composables/useLoad3dViewer.ts
🧠 Learnings (4)
📚 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/Load3d.ts
  • src/composables/useLoad3dViewer.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/Load3d.ts
  • src/composables/useLoad3dViewer.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/Load3d.ts
  • src/composables/useLoad3dViewer.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/Load3d.ts
  • src/composables/useLoad3dViewer.ts
⏰ 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: collect
  • GitHub Check: lint-and-format
🔇 Additional comments (2)
src/extensions/core/load3d/Load3d.ts (1)

46-47: LGTM! Default target dimensions now properly indicate "no target size".

Changing the defaults from 512 to 0 correctly implements the PR objective that "preview3d" should not have a target size. This pairs well with the shouldMaintainAspectRatio() check on line 249 that verifies both dimensions are greater than 0 before maintaining aspect ratio.

src/composables/useLoad3dViewer.ts (1)

190-201: LGTM! Conditional viewer mode initialization correctly implements the PR objective.

The logic properly enables viewer mode and dimension tracking only when both width and height widgets exist. This aligns perfectly with the PR objective that "preview3d" (which presumably lacks these widgets) should not have a target size.

The conditional initialization pattern is clear and maintainable.

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

Caution

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

⚠️ Outside diff range comments (1)
tests-ui/tests/composables/useLoad3dViewer.test.ts (1)

157-182: Add test coverage for the case when width/height widgets are present.

The test correctly validates the behavior when no widgets exist (isViewerMode: false). However, the PR introduces conditional logic where viewer mode is enabled only when both width and height widgets are present. To fully test this behavioral change and prevent future regressions, add a test case that verifies isViewerMode: true and getDimensions is provided when the node has width/height widgets.

🔎 Suggested test case to add:
it('should initialize viewer mode when width and height widgets are present', async () => {
  // Add width and height widgets to the mock node
  mockNode.widgets = [
    { name: 'width', value: 512 },
    { name: 'height', value: 512 }
  ]

  const viewer = useLoad3dViewer(mockNode)
  const containerRef = document.createElement('div')

  await viewer.initializeViewer(containerRef, mockSourceLoad3d)

  expect(Load3d).toHaveBeenCalledWith(containerRef, {
    width: 512,
    height: 512,
    getDimensions: expect.any(Function),
    isViewerMode: true
  })
})

Based on coding guidelines: "Write tests for all changes, especially bug fixes to catch future regressions" and "Aim for behavioral coverage of critical and new features."

📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 846c511 and 4bcc2c8.

📒 Files selected for processing (1)
  • tests-ui/tests/composables/useLoad3dViewer.test.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
tests-ui/**/*.test.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (tests-ui/CLAUDE.md)

tests-ui/**/*.test.{js,ts,jsx,tsx}: Write tests for new features
Follow existing test patterns in the codebase
Use existing test utilities rather than writing custom utilities
Mock external dependencies in tests
Always prefer vitest mock functions over writing verbose manual mocks

Files:

  • tests-ui/tests/composables/useLoad3dViewer.test.ts
tests-ui/**/*.test.ts

📄 CodeRabbit inference engine (AGENTS.md)

tests-ui/**/*.test.ts: Write tests for all changes, especially bug fixes to catch future regressions
Unit/Component test files must use pattern **/*.test.ts
Do not write change detector tests - do not just assert that defaults are certain values
Do not write tests dependent on non-behavioral features like utility classes or styles
Be parsimonious in testing - do not write redundant tests
Do not write tests that just test the mocks - ensure tests fail when code behaves unexpectedly
For mocking, leverage Vitest's utilities where possible
Keep module mocks contained - do not use global mutable state within test files, use vi.hoisted() if necessary
For Component testing, use Vue Test Utils and follow advice about making components easy to test
Aim for behavioral coverage of critical and new features

Files:

  • tests-ui/tests/composables/useLoad3dViewer.test.ts
🧠 Learnings (6)
📚 Learning: 2025-12-17T01:01:03.609Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-17T01:01:03.609Z
Learning: Applies to tests-ui/**/*.test.ts : Do not write change detector tests - do not just assert that defaults are certain values

Applied to files:

  • tests-ui/tests/composables/useLoad3dViewer.test.ts
📚 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:

  • tests-ui/tests/composables/useLoad3dViewer.test.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:

  • tests-ui/tests/composables/useLoad3dViewer.test.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:

  • tests-ui/tests/composables/useLoad3dViewer.test.ts
📚 Learning: 2025-12-10T03:09:13.807Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7303
File: src/components/topbar/CurrentUserPopover.test.ts:199-205
Timestamp: 2025-12-10T03:09:13.807Z
Learning: In test files, prefer selecting or asserting on accessible properties (text content, aria-label, role, accessible name) over data-testid attributes. This ensures tests validate actual user-facing behavior and accessibility, reducing reliance on implementation details like test IDs.

Applied to files:

  • tests-ui/tests/composables/useLoad3dViewer.test.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:

  • tests-ui/tests/composables/useLoad3dViewer.test.ts
⏰ 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: lint-and-format
  • GitHub Check: test
  • GitHub Check: collect

Comment on lines +197 to +198
width: width.value as number,
height: height.value as number
Copy link
Contributor

@DrJKL DrJKL Dec 18, 2025

Choose a reason for hiding this comment

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

Question: Why do we need so many type assertions around these?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

width and height need number type, but width.value could be others

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we constrain the type upstream?

@jtydhr88 jtydhr88 merged commit ed7ec2a into main Dec 19, 2025
18 of 42 checks passed
@jtydhr88 jtydhr88 deleted the 3d-scene-size branch December 19, 2025 10:56
Yourz pushed a commit that referenced this pull request Dec 24, 2025
## Summary

improve 3d scene size logic, for preview3d, it should not have target
size

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7619-improve-logic-of-3d-scene-size-2cd6d73d36508101b9f5dcef9bbe1314)
by [Unito](https://www.unito.io)
@coderabbitai coderabbitai bot mentioned this pull request Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants