Commit Graph
176 Commits
Author SHA1 Message Date
google-labs-jules[bot]andAEmotionStudio 6bd509bdf7 feat(sidebar): add editable hex code input to color picker
- Replaced read-only hex code span with an editable text input in `createColorPicker`
- Implemented bidirectional sync between text input and color picker
- Added validation for hex codes and auto-correction on blur
- Ensured keydown propagation is stopped to prevent triggering global shortcuts
- Added aria-label for accessibility
- Updated unit tests to verify sync logic and event handling
- Added CSS styles for `magnify-color-preview` input to match UI design

Co-authored-by: AEmotionStudio <163354043+AEmotionStudio@users.noreply.github.com>
2026-02-09 16:09:24 +00:00
Æmotion Studio 274e562f16 fix: use pointer events for glass drag to fix Firefox/Brave canvas corruption 2026-02-07 19:48:09 -08:00
Æmotion Studio 9359a42f3b fix: prevent LiteGraph canvas state corruption after glass drag 2026-02-07 19:38:35 -08:00
Æmotion Studio 9e0da38f75 fix: rewrite glass drag to use pointer capture for reliable cursor reset 2026-02-07 19:13:09 -08:00
Æmotion Studio 79cb020c85 fix: glass drag cursor stuck in grab mode after release 2026-02-07 19:04:09 -08:00
Æmotion Studio e08a0b257b fix: ghost cursor interactions persisting after hiding info panel 2026-02-07 18:55:42 -08:00
Æmotion Studio 6db4b2a576 Merge pull request #29 from AEmotionStudio/bolt/layout-thrashing-fix-5688373778482661560
⚡ Bolt: Prevent layout thrashing in magnifier update loop
2026-01-18 21:20:05 -08:00
Æmotion Studio 089098df90 Merge pull request #30 from AEmotionStudio/sentinel/fix-xss-bypass-uimanager-7199572335326487852
🛡️ Sentinel: [HIGH] Fix XSS vulnerability in UIManager by removing isHtml bypass
2026-01-18 21:19:54 -08:00
Æmotion Studio ad0cc473bb Merge pull request #28 from AEmotionStudio/palette-accessibility-focus-2231388305888170951
🎨 Palette: Improve keyboard accessibility for sidebar settings
2026-01-18 21:13:06 -08:00
google-labs-jules[bot] f6a9e5faa7 security(ui): eliminate XSS vector by replacing isHtml bypass with strict specialType
Removed the `isHtml` flag support in `UIManager`, which allowed bypassing HTML escaping.
Replaced it with a `specialType` mechanism (specifically 'focus-node') to render trusted
HTML structures internally while ensuring dynamic values are always escaped.
Updated `Security.test.ts` to verify the fix and prevent regression.

Fixes: Potential XSS vulnerability via unchecked HTML injection.
2026-01-19 05:05:28 +00:00
google-labs-jules[bot] bb9c545eda perf: prevent layout thrashing in magnifier update loop
Refactors `MagnifyGlass.updateMagnifiedView` and `calculateSourceRegion` to accept an optional cached `DOMRect`. This allows `EventHandler` to pass the canvas dimensions it read before updating the glass position, preventing a forced synchronous reflow (Read-Write-Read cycle) that was previously occurring on every mouse move frame.

Optimizes the hot path for mouse movement and magnifier updates.
2026-01-19 05:00:41 +00:00
google-labs-jules[bot] 1fe803d8fb feat: improve keyboard accessibility for sidebar settings
- Add visible focus indicators for interactive elements in the sidebar
- Add aria-valuetext to sliders to announce values with units
- Update journal with accessibility learnings
2026-01-19 04:41:54 +00:00
AEmotionStudio acc96254a6 fix: persist menu toggle button across Vue re-renders using MutationObserver 2026-01-18 20:40:38 -08:00
AEmotionStudio 8954d2d44d perf: disable sourcemaps, remove build artifacts, and adjust default glass Y offset 2026-01-18 18:24:00 -08:00
AEmotionStudio 2927c140dc feat: sync popout widget edits and improve inspector parameter visibility
- Implemented 'onWidgetEdit' listener in 'InfoPanel' to force refresh when popout widgets change.
- Refactored 'NodeDataExtractor' to display all widgets in the inspector (matching popout behavior) and removed aggressive deduplication.
- Fixed theme update logic in 'UIManager' to correctly handle hyphenated theme names.
- Enhanced combo box editing in 'popout-viewer.html' with better selection and blur handling.
2026-01-18 11:51:41 -08:00
AEmotionStudio 8bdfbedf46 feat: add new themes and enhance popout viewer interaction
- Added 'Obsidian', 'Obsidian Dark', and 'Milk White' themes to Info Panel and PopOut viewer.
- Improved theme detection in 'StateManager' to support new themes.
- Implemented button widget support in PopOut viewer with 'button-click' event handling.
- Enhanced widget options handling in 'PopOutManager' for combo widgets.
- Updated dropdown accessibility tests.
2026-01-18 11:02:06 -08:00
AEmotionStudio cb589761c8 feat: add grid layout support for batch images in OffscreenRenderer
- Updated `drawNodeImages` to render multiple images from `node.imgs[]` in a grid.
- Implemented aspect-ratio-preserving centering for each image within its grid cell.
- Added configurable gap between images in the grid.
2026-01-18 01:24:21 -08:00
AEmotionStudio 8213a086ab feat: add inline action buttons to inspector and improve widget handling
- Added support for inline action buttons in the inspector panel.
- Implemented `InlineControlFactory.createInlineButton` to execute widget callbacks.
- Enhanced `WidgetSyncManager` to detect 'button' widgets via type or heuristics.
- Updated `UIManager` and `NodeDataExtractor` to process actionable widgets.
- Added styles for inline action buttons.
- Added `Escape` key handler to slider widget editor.
- Refactored canvas coordinate calculations in `MagnifyGlass` for better accuracy.
2026-01-18 00:21:06 -08:00
Æmotion Studio 093bde19e0 Merge pull request #25 from AEmotionStudio/bolt/optimize-render-overlays-9313858051447850514
⚡ Bolt: Optimize renderHtmlOverlays loop
2026-01-17 22:15:16 -08:00
Æmotion Studio 75d6285678 Merge pull request #27 from AEmotionStudio/sentinel-fix-webgl-xss-17500734846144735282
🛡️ Sentinel: [MEDIUM] Fix potential XSS in WebGL error toast
2026-01-17 22:12:13 -08:00
google-labs-jules[bot] dd4e34df6f fix(security): prevent XSS in WebGL error toast by using DOM API
- Refactor `showWebGLError` to use `document.createElement` instead of `innerHTML`
- Replace inline `onclick` handler with `addEventListener` for CSP compliance
- Add unit test to verify XSS prevention and button functionality
2026-01-18 04:50:44 +00:00
google-labs-jules[bot] 5606a86256 feat(sidebar): improve accessibility of settings and inspector sections
- Add role="button", tabindex="0", and aria-expanded to section headers
- Implement keyboard navigation (Enter/Space) for expanding/collapsing sections
- Generate unique IDs for aria-controls to link headers and content bodies
- Ensure proper accessibility attributes for sidebar inspector panel

This change improves keyboard navigation and screen reader support for the
sidebar settings and inspector panels.
2026-01-18 04:43:22 +00:00
google-labs-jules[bot] 9935ec5077 perf: optimize renderHtmlOverlays by hoisting invariants
- Moves invariant calculations (DPR, scaling, pivot points) out of the widget loop in `renderHtmlOverlays`.
- Reduces redundant property accesses and arithmetic operations per frame.
- Improves performance for workflows with many visible nodes.
2026-01-18 04:43:04 +00:00
AEmotionStudio 45bc6a4d35 feat(ui): add node navigation hotkeys and update documentation
- Added '*' hotkey to focus the currently inspected node
- Added 'ArrowLeft' and 'ArrowRight' hotkeys to navigate nodes by execution order
- Updated README.md and CHANGELOG.md with the new hotkeys and navigation features
2026-01-17 19:43:07 -08:00
AEmotionStudio da7c8b17f9 feat(ui): enhance keyboard navigation and hotkeys
- Added full keyboard support (Arrows, Enter, Esc) for all dropdown types
- Implemented global '*' hotkey to center canvas on currently inspected node
- Improved event handling to reliably intercept keys before ComfyUI canvas
- Fixed memory leaks in dropdown event listeners
2026-01-17 18:46:55 -08:00
AEmotionStudio f8784432f5 Improve widget editing UX and dropdown behavior
- Allow precise value input by removing automatic step rounding in sync manager
- Standardize stepper button increment to 1 for finer control
- Ensure dropdowns close when clicking the canvas
2026-01-17 18:13:32 -08:00
AEmotionStudio 1a4b6b8a23 fix(widget-editors): update DragValueController logic and build 2026-01-17 17:59:00 -08:00
AEmotionStudio d1612d702b Merge branch 'main' of https://github.com/AEmotionStudio/ComfyUI-MagnifyGlass 2026-01-17 17:44:03 -08:00
AEmotionStudio 09ce2fb78a WIP: My local changes 2026-01-17 17:38:06 -08:00
Æmotion Studio cf2e97c725 Merge pull request #22 from AEmotionStudio/palette/dropdown-a11y-5973958733429481297
🎨 Palette: Add keyboard accessibility to node selector dropdown
2026-01-17 00:42:36 -08:00
google-labs-jules[bot] 717b823d20 fix(ui): prevent race conditions and focus hijacking in dropdown 2026-01-17 07:42:29 +00:00
google-labs-jules[bot] 3ab3e4a02e fix(ui): fix event listener leak on dropdown re-open 2026-01-17 06:31:06 +00:00
google-labs-jules[bot] 2786436e4a fix(ui): restrict keyboard handler to focused dropdown 2026-01-17 05:56:45 +00:00
Æmotion Studio c1adab023f Merge pull request #23 from AEmotionStudio/bolt-perf-batch-dom-reads-13434560877791740571
⚡ Bolt: Batch DOM reads/writes in renderHtmlOverlays
2026-01-16 21:52:04 -08:00
google-labs-jules[bot] d8ee89ca02 fix(ui): prevent event listener leak in dropdown selection 2026-01-17 05:25:38 +00:00
google-labs-jules[bot] c42b085473 ⚡ Bolt: Fix stale overlays on early return
Ensures `htmlOverlayContainer` is cleared when exiting `renderHtmlOverlays` early (e.g. no nodes or zero scale), preventing stale content from persisting.
2026-01-17 05:23:25 +00:00
google-labs-jules[bot] 5934fbe6b9 chore(security): use textContent for sidebar titles
- Replaced `innerHTML` with `textContent` for dynamic titles in `SidebarSettings.ts` to prevent potential XSS.
- Maintained `innerHTML` usage only for trusted static SVG icons.
- Added defense-in-depth against future changes that might introduce user-controlled titles.
2026-01-17 05:07:08 +00:00
google-labs-jules[bot] 962277c960 ⚡ Bolt: Batch DOM reads/writes in renderHtmlOverlays
Refactors `renderHtmlOverlays` to eliminate layout thrashing by separating DOM read operations (getBoundingClientRect, getComputedStyle) from DOM write operations.

- Creates a `RenderTask` interface to store read data.
- Implements a Read Phase to collect measurements and cull nodes.
- Implements a Write Phase to batch DOM updates using a DocumentFragment.
- Preserves video tracking logic to ensure animation loop continuity.
- Reduces browser reflows from O(n) to O(1) per frame.
2026-01-17 05:02:21 +00:00
google-labs-jules[bot] 55c7114fa0 feat(ui): add keyboard navigation and ARIA to node selector dropdown 2026-01-17 04:43:13 +00:00
AEmotionStudio 6ff4f2712c feat(ui): Implement custom dropdown system and High Contrast mode
- Replaced native select elements with a viewport-aware 'CustomDropdown' for better reliability and positioning.
- Added 'High Contrast Text' mode for improved legibility in inputs and values.
- Implemented parameter value deduplication in 'NodeDataExtractor' to reduce panel clutter.
- Expanded Google Font selection with 10+ new styles.
- Switched UI dimensions to relative units (em) for consistent scaling.
- Fixed layout 'bouncing' in sticky mode by removing hover transforms.
2026-01-16 16:13:35 -08:00
AEmotionStudio 1a5d7eab43 feat(ui): Add copy-to-clipboard functionality and improve dropdown stability
- Added a copy-to-clipboard button for 'Category' and 'Path' node details in the Inspector panel.
- Enhanced dropdown interaction stability by using 'mousedown' capture phase and broad event propagation prevention in 'InlineControlFactory'.
- Updated 'build' script to ensure CSS files are correctly synchronized from 'css/' to 'web/'.
- Standardized copy icon and styling, including a subtle checkmark feedback on success.
- Fixed an issue where the Inspector panel would 'bounce' due to hover transforms while in sticky mode.
- Improved dropdown closure logic to handle clicks both outside and within the panel content area.
2026-01-16 15:01:36 -08:00
AEmotionStudio dd6b787ad6 style(ui): Refine sticky mode layout and inline control interactions
- Optimized 'persist-active' mode to use viewport-based height limits and proper flex scrolling.
- Enhanced event propagation handling in 'InlineControlFactory' for better dropdown stability.
- Standardized panel font sizes and updated inline dropdowns to match the green theme.
- Added theme-specific CSS overrides for Light and GitHub themes in widget editors.
- Simplified copy-to-clipboard UI feedback.
2026-01-16 12:41:33 -08:00
AEmotionStudio d2ea6d965f feat(ui): Implement inline widget controls and drag value adjustments
- Added 'InlineControlFactory' to create inline toggle switches and combo boxes for supported widget types, replacing the click-to-edit modal for these types.
- Added 'DragValueController' to enable adjusting numeric values by dragging on the value display.
- Updated 'UIManager' to integrate these new controls, manage their lifecycle, and properly clean them up.
- Enhanced 'WidgetEditorFactory' to handle Enter key for confirming edits.
- Removed the copy button from string values to reduce clutter.
- Updated 'index.ts' to export the new components.
2026-01-16 04:19:29 -08:00
AEmotionStudio 51ad38bfb6 feat: Add video playback support and settings validation
- Implemented a continuous animation loop in 'MagnifyGlass' that activates automatically when video widgets are detected, ensuring smooth playback for standard videos and VHS previews.
- Added robust validation to 'StateManager' for loading settings, including bounds checking for dimensions/opacity and format verification for colors and enums.
- Updated widget detection logic to correctly identify and handle 'videopreview' and 'audiopreview' widgets.
- Ensured animation loops are properly stopped when the glass is hidden or destroyed to preserve resources.
2026-01-16 02:05:42 -08:00
Æmotion Studio 40c70bdba4 Merge pull request #21 from AEmotionStudio/bolt/optimize-render-overlays-1998194206652878890
⚡ Bolt: Optimize rendering loop by hoisting getBoundingClientRect
2026-01-15 22:28:43 -08:00
Æmotion Studio 9092cfd0ac Merge pull request #20 from AEmotionStudio/sentinel-validation-fix-2381716828487744723
🛡️ Sentinel: [MEDIUM] Add input validation for info panel settings
2026-01-15 22:28:27 -08:00
google-labs-jules[bot] 6d5791eb3c perf: hoist getBoundingClientRect out of render loop
- Moves `litegraphCanvas.getBoundingClientRect()` call outside the widget loop in `renderHtmlOverlays`.
- Reuses the `dpr` calculated at the top level.
- Adds regression test `tests/unit/MagnifyGlassRenderOptim.test.ts`.

Improves rendering performance by reducing forced reflows during magnification.
2026-01-16 04:57:01 +00:00
google-labs-jules[bot] fe771ef87e feat(security): implement strict input validation for InfoPanel settings
Add validation for all InfoPanel settings loaded in StateManager to prevent
injection of invalid values (e.g. out-of-bounds numbers, invalid colors).
This mitigates risks of degraded stability or potential injection via
manipulated settings storage.

- Add validateNumber, validateColor, validateStringOption helpers
- Update StateManager.loadSettings to validate all keys
- Add unit tests for validation logic
2026-01-16 04:45:01 +00:00
google-labs-jules[bot] d7f6b99051 feat(a11y): associate labels with form controls in sidebar
- Export form creation helpers for testing
- Add unique ID generation for sliders, selects, and color pickers
- Associate labels with inputs using `htmlFor`
- Add unit tests to verify accessibility attributes
2026-01-16 04:37:17 +00:00
AEmotionStudio 0cf992d528 fix: address final PR review issues 2026-01-15 17:38:38 -08:00