Commit Graph

2846 Commits

Author SHA1 Message Date
bymyself
4304bb3ca3 [test] Relocate and update test files
- Move TransformPane tests from .test.ts to .spec.ts format
- Relocate useWidgetValue tests to tests-ui directory
- Move QuadTree tests to tests-ui/tests/utils/spatial directory
- Add comprehensive tests for new composables:
  - useCanvasTransformSync tests
  - useTransformSettling tests
- Update test imports and paths

Tests now follow consistent organization patterns and cover the
refactored transform sync functionality.
2025-07-05 21:14:00 -07:00
bymyself
9a93764cc8 [refactor] Extract canvas transform sync to dedicated composables
- Create useCanvasTransformSync for clean RAF-based transform synchronization
- Add useTransformSettling for detecting when transforms have stabilized
- Refactor TransformPane to use extracted composables
- Update GraphCanvas to use new transform sync composable
- Add VueNodeDebugPanel for transform visualization and debugging
- Improve separation of concerns and reusability

This refactoring makes the transform sync logic more maintainable and
testable while preserving all existing functionality.
2025-07-05 21:06:45 -07:00
bymyself
555e806f1e [perf] Optimize widget rendering performance
- Move TYPE_TO_ENUM_MAP outside function to prevent recreation
- Add WIDGET_SUPPORT_MAP for O(1) widget type lookups
- Add ESSENTIAL_WIDGET_TYPES Set for fast LOD filtering
- Refactor NodeWidgets to use single processedWidgets computed property
- Eliminate object creation in render loops
- Pre-resolve Vue components to avoid runtime lookups

These optimizations reduce GC pressure and improve rendering performance
for workflows with many widgets.
2025-07-05 21:01:32 -07:00
bymyself
18854d7d35 [cleanup] Remove temporary documentation and planning files 2025-07-05 03:08:18 -07:00
bymyself
57b09da370 [test] Add missing useWidgetValue import in test file
- Import useWidgetValue function to fix TypeScript errors
- Maintains comprehensive test coverage for widget value composable
- Ensures all widget value functions are properly tested

Fixes TypeScript errors in test files without affecting functionality.
2025-07-05 03:08:18 -07:00
bymyself
d29ce213fe [refactor] Remove unused variables in GraphCanvas to fix TypeScript warnings
- Comment out unused viewport culling feature flags
- Remove unused cullingMargin variable
- Clean up imports to eliminate TypeScript lint warnings

These variables were part of experimental culling features that are now handled differently.
2025-07-05 03:08:18 -07:00
bymyself
7d7dc091f4 [perf] Optimize TransformPane interaction tracking for better performance
- Add wheel event handling with debounced interaction state
- Use capture phase event listeners to intercept before LiteGraph
- Implement proper cleanup with matching capture phase removal
- Add dedicated wheel timeout separate from pointer interactions
- Simplify interaction state management for better responsiveness

Improves GPU optimization timing and prevents interaction state conflicts.
2025-07-05 03:08:18 -07:00
bymyself
d6315a1230 [feat] Add debug type definitions for spatial indexing system
- Create QuadNodeDebugInfo and SpatialIndexDebugInfo interfaces
- Update QuadTree to use typed debug info instead of any
- Provides structured debug information for spatial index performance analysis
- Enables better debugging of viewport culling performance

These types improve type safety for debug functionality without affecting runtime performance.
2025-07-05 03:08:18 -07:00
bymyself
5cb9ba1c18 [feat] Add CSS LOD classes for Vue node rendering optimization
- Add lg-node--lod-full, lg-node--lod-reduced, lg-node--lod-minimal classes
- Reduced detail level uses smaller fonts and reduced padding
- Minimal detail level hides controls and uses compact header
- Smooth transitions between LOD levels to prevent jarring changes
- User select disabled on nodes to prevent text selection issues

These classes enable progressive detail reduction at different zoom levels for better performance.
2025-07-05 03:08:18 -07:00
bymyself
290906e7cc [refactor] Improve type safety across Vue node widget system
- Create WidgetValue union type for all valid widget values
- Replace 'any' types with proper generic constraints in SimplifiedWidget
- Add runtime validation for widget values in useGraphNodeManager
- Update WidgetSelect to use constrained generics instead of any
- Fix type assertions with proper validation functions
- Ensure SafeWidgetData uses WidgetValue type consistently

This eliminates most 'any' usage while maintaining runtime safety through validation.
2025-07-05 03:08:18 -07:00
bymyself
71c3c727cf [feat] Implement LOD (Level of Detail) system for Vue nodes
- Add useLOD composable with 3 zoom-based detail levels (minimal, reduced, full)
- Implement conditional rendering in LGraphNode based on zoom level
- Filter non-essential widgets at reduced LOD (keep interactive controls only)
- Add LOD-specific CSS classes for visual optimizations
- Update performance test thresholds for CI environment compatibility
- Fix lint warnings in QuadTreeDebugSection component

Performance impact: ~80% DOM element reduction at low zoom levels
Zoom thresholds: 0.4 (minimal), 0.8 (full) for optimal quality/performance balance
2025-07-05 03:08:18 -07:00
bymyself
c2463268d7 [test] Add performance tests for transform operations
Comprehensive benchmarks covering:
- Coordinate conversion performance (10k operations < 20ms)
- Viewport culling efficiency (1k nodes < 10ms)
- Transform synchronization (1k syncs < 15ms)
- Real-world scenarios (panning, zooming)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-05 03:08:18 -07:00
bymyself
32ddf7263c [test] Add TransformPane component tests
- Test transform synchronization with mocked canvas interactions
- Verify viewport and debug overlay functionality
- Test interaction state management and pointer event delegation
- Cover error handling for missing canvas properties
- Ensure proper cleanup and event listener management
2025-07-05 03:08:18 -07:00
bymyself
a58a35459f [test] Add comprehensive tests for transform and spatial composables
- Add useTransformState tests covering coordinate conversion, viewport culling
- Add useSpatialIndex tests for QuadTree operations and spatial queries
- Test camera state management and transform synchronization
- Verify spatial indexing performance and correctness
- Cover edge cases and error conditions for robust testing
2025-07-05 03:08:18 -07:00
bymyself
95ab7022e5 [test] Add test helper utilities for Vue node system testing
- Add nodeTestHelpers.ts with mock factories for widgets, nodes, and canvas
- Include mock utilities for VueNodeData, LiteGraph nodes, and canvas contexts
- Provide createBounds helper for spatial testing
- Foundation for comprehensive testing of Vue node system components
2025-07-05 03:08:18 -07:00
bymyself
cdd940ebde [fix] Add proper cleanup for nodeManager to prevent memory leaks
- Add nodeManager.cleanup() call in onUnmounted hook
- Set nodeManager to null after cleanup to clear reference
- Improve type safety by removing 'any' types and using proper interfaces
- Fix LGraphCanvas type import and usage

This ensures all event listeners and resources managed by useGraphNodeManager
are properly cleaned up when the GraphCanvas component unmounts, preventing
memory accumulation in long-running sessions.
2025-07-05 03:08:18 -07:00
bymyself
c3023e46d9 [fix] Remove FPS tracking to prevent memory leaks
- Remove recursive requestAnimationFrame loop that was causing memory leaks
- Remove startFPSTracking, stopFPSTracking, and updateFPS functions
- Remove FPS tracking variables and initialization
- Refactor code structure with extracted helper functions for better maintainability

The FPS tracking was only used for debugging and created an infinite RAF loop
that accumulated memory over time in long-running sessions.
2025-07-05 03:08:18 -07:00
bymyself
a23d8be77b [feat] Add Vue-based node rendering system with widget support
Complete Vue node lifecycle management system that safely extracts data from LiteGraph and renders nodes with working widgets in Vue components.

Key features:
- Safe data extraction pattern to avoid Vue proxy issues with LiteGraph private fields
- Event-driven lifecycle management using onNodeAdded/onNodeRemoved hooks
- Widget system integration with functional dropdowns, inputs, and controls
- Performance optimizations including viewport culling and RAF batching
- Transform container pattern for O(1) scaling regardless of node count
- QuadTree spatial indexing for efficient visibility queries
- Debug tools and performance monitoring
- Feature flag system for safe rollout

Architecture:
- LiteGraph remains source of truth for all graph logic and data
- Vue components render nodes positioned over canvas using CSS transforms
- Widget updates flow through LiteGraph callbacks to maintain consistency
- Reactive state separated from node references to prevent proxy overhead

Components:
- useGraphNodeManager: Core lifecycle management with safe data extraction
- TransformPane: Performance-optimized viewport container
- LGraphNode.vue: Vue node component with widget rendering
- Widget system: PrimeVue-based components for all widget types
2025-07-05 03:08:18 -07:00
bymyself
0de3b8a864 [feat] Add QuadTree spatial data structure for node indexing
- Implements efficient O(log n) spatial queries for large node graphs
- Supports dynamic insertion, removal, and updates
- Configurable depth and capacity parameters
- Comprehensive test suite covering performance scenarios
- Benchmark tools for performance validation
- Designed for viewport culling optimization in 100+ node workflows

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-05 03:08:18 -07:00
bymyself
122170fc0d [fix] Fix widget value synchronization between Vue and LiteGraph
- Widget callbacks now explicitly set widget.value (fixes empty LiteGraph callbacks)
- Created useWidgetValue composable for consistent widget patterns
- Updated all widget components to use proper props/emit pattern
- Callbacks are set up before data extraction to ensure proper state sync
2025-07-05 03:08:18 -07:00
bymyself
cd3296f49b [feat] Add viewport debug overlay for TransformPane
- Add optional red border overlay showing viewport bounds with 10px inset
- Display viewport dimensions and device pixel ratio in overlay
- Enable via "Show Performance Overlay" checkbox in debug panel
- Helps visualize actual culling boundaries during development
2025-07-05 03:08:18 -07:00
bymyself
124db5991f [feat] Implement callback-driven widget updates
- Chain widget callbacks to trigger immediate Vue state updates
- Remove need for RAF polling of widget values
- Add performance tracking for callback vs RAF updates
- Implement proper FPS tracking with 1-second intervals

This change makes widget updates reactive and immediate rather than
waiting for the next RAF cycle, improving responsiveness.
2025-07-05 03:08:18 -07:00
bymyself
222a52d347 [feat] Add feature flags and utility updates
- Add useFeatureFlags composable for Vue nodes
- Update coreSettings with Vue nodes feature flag
- Minor typing improvements in useTransformState

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-05 03:08:18 -07:00
bymyself
04e9a7961b [feat] Update GraphCanvas with VueNodeData typing
- Import VueNodeData type for proper typing
- Update handleNodeSelect function signature
- Remove debug comments
- Fix lint issues

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-05 03:08:18 -07:00
bymyself
39603ddbb0 [feat] Update Vue node components with proper typing
- Support nodeData prop with VueNodeData interface
- Update emit types to use VueNodeData instead of LGraphNode
- Remove unnecessary imports and debug comments
- Proper color calculations for node headers

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-05 03:08:18 -07:00
bymyself
6bbd2853db [feat] Update NodeWidgets to use safe widget data
- Use SafeWidgetData interface instead of raw LiteGraph widgets
- Proper TypeScript typing without any types
- Use widget registry for component resolution
- Remove unnecessary imports and debug comments

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-05 03:08:18 -07:00
bymyself
95c291d174 [fix] Fix WidgetSelect component for combo widgets
- Add options prop to PrimeVue Select component
- Extract options from widget.options.values array
- Remove unnecessary debug comments

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-05 03:08:18 -07:00
bymyself
3dc7686f7a [feat] Add widget renderer composable
- Map LiteGraph widget types to Vue components
- Support text, combo, number, boolean widget types
- Check if widgets should render as Vue components
- Proper TypeScript interfaces instead of any

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-05 03:08:18 -07:00
bymyself
992d79b52f [feat] Vue node lifecycle management implementation
Implements reactive position tracking, viewport culling, and event-driven
node management for Vue-based node rendering system.

Ready for demo and developer handoff.
2025-07-05 03:08:18 -07:00
bymyself
065e292b1c [feat] Add TransformPane for Vue node coordinate synchronization 2025-07-05 03:08:18 -07:00
bymyself
a041f40fb5 [feat] Implement Vue-based node rendering components
- LGraphNode: Main container with transform-based positioning
- NodeHeader: Collapsible title bar with dynamic coloring
- NodeSlots: Input/output connection visualization
- NodeWidgets: Integration with existing widget system
- NodeContent: Extensibility placeholder
- Error boundaries and performance optimizations (v-memo, CSS containment)
2025-07-05 03:08:18 -07:00
bymyself
0ec98e3b99 [feat] Add slot type color definitions
- Centralized color mapping for node connection types
- Supports all ComfyUI slot types (model, clip, vae, etc.)
- Provides default fallback color
2025-07-05 03:08:18 -07:00
bymyself
eca48a8787 [docs] Add Vue node system architecture and implementation plans
- Implementation plan for Vue-based node rendering system
- Migration strategy from canvas to Vue components
- Widget system integration documentation
2025-07-05 03:08:18 -07:00
bymyself
a1c87685a5 Merge branch 'main' into vue-nodes-migration 2025-07-05 03:03:19 -07:00
Christian Byrne
8f825c066b [docs] add code quality guidelines for i18n, async cleanup, and error handling (#4305) 2025-07-01 17:13:55 -07:00
Comfy Org PR Bot
e6f90e3101 1.24.0-0 (#4321)
Co-authored-by: webfiltered <176114999+webfiltered@users.noreply.github.com>
v1.24.0-0
2025-07-01 22:06:28 +00:00
filtered
d68391a80a [CI] Fix prerelease version tag not set (#4322) 2025-07-01 15:06:08 -07:00
filtered
df710945c9 [CI] Skip i18n in unrelated PRs (#4320) 2025-07-01 14:53:48 -07:00
filtered
8d6360074d Use prerelease flag for draft releases (#4319) 2025-07-01 14:51:24 -07:00
filtered
26c106c3e4 Allow prerelease using version bump action (#4318) 2025-07-01 14:29:55 -07:00
Comfy Org PR Bot
d92c282439 [chore] Update litegraph to 0.16.3 (#4316)
Co-authored-by: webfiltered <176114999+webfiltered@users.noreply.github.com>
2025-07-01 13:40:21 -07:00
Comfy Org PR Bot
bf3dcc83a0 [chore] Update litegraph to 0.16.2 (#4315)
Co-authored-by: webfiltered <176114999+webfiltered@users.noreply.github.com>
2025-07-01 12:58:53 -07:00
filtered
6470a0bbd9 [CodeHealth] Follow-up on #4288 - code style / async (#4308) 2025-07-01 09:46:24 -07:00
ComfyUI Wiki
c75015c5b8 Fix helper menu issues and align with the design. (#4261) 2025-06-30 21:36:09 -04:00
Christian Byrne
64a2a5b3ae [fix] Mock release API in browser tests to prevent UI interference (#4310) 2025-06-30 17:36:07 -07:00
filtered
fada8bf9cf Follow-up on #4256 (#4307) 2025-06-30 12:25:55 -07:00
Terry Jia
5bbed91295 usage log table (#4288)
Co-authored-by: github-actions <github-actions@github.com>
2025-06-30 12:13:01 -07:00
Christian Byrne
eb8b67dd9d [docs] Update nested README files with comprehensive component listings (#4303) 2025-06-29 19:55:21 -07:00
Christian Byrne
d6a8f98327 [docs] add component communication best practices (#4302) 2025-06-29 18:25:28 -07:00
filtered
8457768a41 [Test] Update test expectations to match core changes to scheduler (#4293)
Co-authored-by: github-actions <github-actions@github.com>
2025-06-28 21:58:31 -07:00