Commit Graph
307 Commits
Author SHA1 Message Date
Ewald 16da4a279c Restore browser navigation guard contract 2026-05-26 14:29:29 +02:00
Ewald a78f4572c8 Align frontend layout with ComfyUI conventions 2026-05-26 10:42:22 +02:00
Ewald 5c6ec82e8e migrate frontend source to TypeScript 2026-05-25 00:36:51 +02:00
Ewald 16cfff340b Improve asset drag and drop integration 2026-05-24 17:46:35 +02:00
Ewald 4774caa58a fix: restrict tryLoadWorkflowToCanvas to empty canvas drops to prevent overwriting graph when dropping on custom nodes 2026-05-23 20:36:13 +02:00
Ewald 998559d220 feat: enhance Drag & Drop for custom nodes including WhatDreamsCost suite, LTX Director, and slot auto-linking 2026-05-23 20:33:34 +02:00
Ewald b001b865a4 refactor: remove audio-bg.png and audio-thumbnails.png assets and cleanup references 2026-05-23 19:59:17 +02:00
Ewald 6587940862 refactor(app): enhance ComfyUI integration and settings sync - Implement two-way binding for ComfyUI settings in Majoor - Add new settings for auto-opening viewers and floating sidebar - Improve extension manager compatibility and dialog handling - Extend sidebar tab registration and controller discovery - Introduce graph canvas helpers for centering view and getting viewport bounds - Enhance minimap functionality with new graph canvas methods - Add settings sync with ComfyUI language 2026-05-23 18:35:21 +02:00
Ewald a363a77a6b feat(db): Phase C tag normalization — v18/v19 migrations, normalized FTS, readers v2, stop-write, drop legacy columns
- m018_fts_from_normalized_tags: replace FTS triggers to read from asset_tags+tags
  instead of the legacy JSON asset_metadata.tags column
- m019_drop_legacy_tag_columns: remove asset_metadata.tags and tags_text via
  create-copy-swap; includes invariant check (aborts if legacy tags not backfilled)
- registry.py: MIGRATIONS = [M017, M018, M019]
- schema_fts.py / schema_sql.py: FTS helpers and baseline triggers rewritten to
  source from normalized tables with asset_tags guard
- TagsRepository: normalized read path (get_tags_for_asset, list_assets_with_tag,
  search_assets_by_tags) + sync_from_legacy_row repair helper
- Readers v2: searcher, result_hydrator, metadata_helpers, updater, rating_tags_service,
  rename_service, stacks/service, duplicates/service migrated to asset_tags/tags JOIN
- Stop-Write: writes no longer update asset_metadata.tags / tags_text
- sqlite_facade: ahas_table helper; sqlite_recovery updated
- deps.py: TagsRepository wired into service container
- scripts/tag_drift_doctor.py: detects assets with legacy tags not backfilled
- ADR 0009, ARCHITECTURE_MAP, RATINGS_TAGS_COLLECTIONS, adr/README updated
- Tests: test_drop_legacy_tag_columns (2), test_fts_from_normalized (6),
  test_tags_dual_write, test_tags_normalized_readers + regression fixes across
  test_rating_tags_import, test_index_metadata_helpers, test_index_searcher,
  test_asset_updater, test_deps, test_schema_heal
- Full suite: 1687 passed, 2 skipped, 2 pre-existing failures (test_health_routes)
2026-05-22 15:00:27 +02:00
Ewald 96893ac4b3 feat: Phase 1+2 ComfyUI core integration + workflow_id in File Info sidebar
- schema v16: add workflow_id column to assets table
- post_execution: capture workflow_id via get_workflow_id_for_prompt
- comfy_core: add get_workflow_id_for_prompt helper (extra_data fallback)
- result_hydrator: expose workflow_id in asset payload and file_info dict
- SidebarFileInfoSection: show Workflow ID row in File Info section
- ViewerMetadataBlock: include workflow_id in hasFileInfoData check
- integration routes: register_integration_routes via route_catalog
- hashing: blake3 with sha256 fallback (mjr_am_shared/hashing.py)
- requirements.txt: add blake3>=0.4.0,<2.0.0 (soft dep, sha256 fallback)
- js/integration: comfy_send_to_am.js via comfyApiBridge (no depth-fragile imports)
- pyproject.toml: fix duplicate [tool.comfy] section
- viewer.py: replace assert with explicit None guard (ruff S101)
- build: 301 modules, js_dist updated
2026-05-21 22:12:50 +02:00
Ewald 120c822c6f File path refacto 2026-05-21 21:07:16 +02:00
Ewald ddfe817b45 Polish asset manager UI and metadata helpers 2026-05-21 18:59:30 +02:00
Ewald b18cafcb3b Integrate Comfy core asset ingestion 2026-05-21 18:56:04 +02:00
Ewald 9876e36c22 chore: viewer, context menu, stacks, docs updates 2026-05-21 08:09:38 +02:00
Ewald 5bc7d71a24 Release v2.4.8 2026-05-18 00:25:14 +02:00
Ewald 0e2c7c9e8e Fix drag drop and viewer regressions 2026-05-18 00:09:30 +02:00
Ewald a1acd919d0 Update viewer icons and gen info layout 2026-05-17 22:43:46 +02:00
Ewald 22648e5961 chore: commit remaining workspace changes 2026-05-17 21:21:49 +02:00
Ewald ae539a931e fix: stabilize generated feed upserts 2026-05-17 21:20:46 +02:00
Ewald 4e7207a05d feat: update drag drop, docs, and build outputs 2026-05-15 17:13:04 +02:00
Ewald 9501254ddc Improve MFV workflow tools and graph map handling 2026-05-11 11:47:35 +02:00
Ewald 0347731034 Update MFV viewer icon spacing 2026-05-11 11:42:55 +02:00
Ewald b2437259a9 Add MFV guide, Graph Map docs, and viewer integrations 2026-05-10 20:10:48 +02:00
Ewald 015c673d6d feat(viewer): add workflow graph map and viewer sync updates 2026-05-09 22:34:37 +02:00
Ewald f239f0b4fa fix(mfv): V key context, clear selection on folder nav, filter folder cards from MFV
- panelHotkeysController: move V key handler before isPanelHotkeyContext guard
  so it fires after subfolder navigation when hover/focus state has reset;
  only blocked when focus is on an input/textarea outside the panel
- browserNavigationController: add clearSelection param, call it before
  reloadGrid() in navigateFolder, resetToBrowserRoot, onOpenFolderAsset,
  onCustomSubfolderChanged so stale selection is cleared immediately
- panelRuntime: pass clearSelection via gridContainer._mjrSetSelection([])
- floatingViewerManager: filter folder-kind assets from selectedIds in
  _onSelectionChanged to avoid trying to load a folder as media
2026-05-07 21:21:40 +02:00
Ewald 0bb9232ca7 Improve geninfo extraction and Happy Horse prompts 2026-05-06 23:14:48 +02:00
Ewald 16546ee7c2 Bump version and add ImageOps message 2026-05-01 19:41:58 +02:00
Ewald f6992935c8 Fix MFV run for Comfy API nodes 2026-05-01 19:27:10 +02:00
Ewald 8a7ab04558 Tighten remaining audit surfaces 2026-05-01 17:47:00 +02:00
Ewald 0b72e50024 Harden mutation security defaults 2026-05-01 17:30:15 +02:00
Ewald 1a01c5ef86 Update frontend grid and generated assets 2026-05-01 17:23:47 +02:00
Ewald f00fdb570c Fix MFV hotkeys, node stream, and video seek 2026-05-01 13:14:07 +02:00
Ewald 17df5486d2 fix: scope switch blocking - reset pagination state + requestId guard in beforeApplyPage
Root cause: prepareGridForScopeSwitch set state.loading=false without resetting
state.offset/state.done. This triggered the Vue watch -> maybeFillViewport ->
loadNextPage with stale offset from the previous scope. The debounced reloadGrid
(30ms later) then found state.loading=true and skipped, leaving the grid showing
data from the wrong offset.

Two fixes in useGridLoader.js:

1. prepareGridForScopeSwitch: add setLegacyPageState({offset:0, cursor:null,
   total:null, done:false}) so any premature maybeFillViewport call loads from
   offset 0 (correct) rather than the previous scope cursor position.

2. loadNextPage: capture _loadReqId = state.requestId after syncPagedStateFromLegacy,
   check it in beforeApplyPage. If a scope switch incremented requestId while
   the fetch was in flight return {ok:false, stale:true} to discard the page
   before applyPage runs - preventing stale scope data from corrupting state.assets.
2026-05-01 04:59:56 +02:00
Ewald dbe876cff2 Fix asset manager pagination and preview stability 2026-05-01 04:35:04 +02:00
Ewald 80c0aad5e7 audit profond : corrections et améliorations 2026-04-30 08:42:27 +02:00
Ewald cb8544483d Stabilize assets grid pagination 2026-04-26 15:47:47 +02:00
Ewald aa906c0097 Mise à jour : modifications et nouveaux fichiers js_dist, corrections backend, suppression chunks obsolètes 2026-04-25 22:01:58 +02:00
Ewald 9c05d48728 Update asset manager runtime and custom roots 2026-04-25 20:36:52 +02:00
Ewald b9ab229555 feat: add VectorCaptionOnIndex setting (Florence-2 captions during indexing)
- Add AI.VectorCaptionOnIndex UI setting with rollback on API error
- Backend: persist/read vector_caption_on_index via AppSettings
- Expose set_vector_caption_on_index via health route and clientOps API
- Wire is_vector_caption_on_index_enabled() into config + env vars
- Update vector_indexer to honour the caption-on-index flag
- Add tests: settings backend, health routes, vector indexer video alignment
- Extend grid_scope_switch_cache test coverage
2026-04-25 12:12:04 +02:00
Ewald b8664cb05f test(js): add format_utils vitest coverage for formatDate/Time/Duration 2026-04-25 12:08:17 +02:00
MajoorWaldiandMajoorWaldi 2bd4f4b788 fix: resolve 6 failing Vitest tests across 4 files
Agent-Logs-Url: https://github.com/MajoorWaldi/ComfyUI-Majoor-AssetsManager/sessions/5e8a712f-b151-4133-9af9-c098c54c2506

Co-authored-by: MajoorWaldi <129623145+MajoorWaldi@users.noreply.github.com>
2026-04-25 00:25:34 +00:00
Ewald 70a1a87c94 fix(security,arch): route WorkflowNodesTab through hostAdapter and reset prefs snapshot in tests
- Replace direct comfyApiBridge import in WorkflowNodesTab with getRawHostApp (ADR 0007).
- Reset security prefs snapshot in _reset_security_state_for_tests so tests that toggle MAJOOR_REQUIRE_AUTH are not influenced by an earlier ensure_security_bootstrap publishing require_auth=False.
- Call _reset_security_state_for_tests from _clear_write_auth_env helper for proper isolation.
- Rebuild frontend bundle.
2026-04-25 01:35:29 +02:00
Ewald 2b10814b2e feat(mfv): ImageOps live preview crop + node panel selection sync
- ImageOps preview bridge: stream cropped contain-fit rect of __imageops_state.canvas (removes square scope/letterbox); fall back to full canvas when user pan/zoom is active. Signature-cached encode (WeakMap) avoids re-encoding on every poll tick.
- Floating viewer: skip metadata enrichment for imageops-live-preview source; preserve user pan/zoom across stream frames of the same node; remove inline CSS overrides that blocked the MFV transform.
- Workflow Nodes panel: graph-selected node is auto-expanded, promoted to first position in its container, scrolled into view, and gets a subtle blue highlight (is-selected-from-graph).
2026-04-24 23:47:27 +02:00
Ewald 0894657274 security: honor UI prefs at runtime + LAN-friendly defaults
The Settings -> Security toggles (Allow Remote Full Access, Allow HTTP Token Transport, Require Token For All Writes) were persisted in the DB but ignored by _check_write_access() and the bootstrap-token endpoint, which only read MAJOOR_* env vars. Remote LAN clients hit 'Write access is blocked' even with all toggles enabled.

- New security_prefs_snapshot module: thread-safe in-memory snapshot of persisted prefs, hydrated at ensure_security_bootstrap() and republished on every set_security_prefs(). Read synchronously by guards.

- security.py::_resolve_security_flag(pref_key, env_var, default): single read site, snapshot-first / env-fallback. Used for allow_remote_write, require_auth, allow_insecure_token_transport.

- _bootstrap_enabled() also returns True when allow_remote_write is set in the snapshot (UI consent for remote bootstrap).

- bootstrap-token / rotate-token accept plain HTTP transport when allow_insecure_token_transport is on.

- Friendlier defaults so first install works zero-config on LAN: allow_remote_write=True, allow_insecure_token_transport=True. Auto-generated API token still gates writes.

- Error messages updated to point users to Settings -> Security instead of only env vars.

- README rewritten to put the UI flow first; env vars as headless fallback.

- pyproject.toml: per-file ignore F401 for routes/core/security.py since it is the single import point that re-exports from sub-modules.
2026-04-24 15:33:15 +02:00
Ewald b87da7b67f perf(grid): cold-start fast-load + stale-snapshot head refresh + race guards
- Early-fetch immediate (no setTimeout 800ms), persisted scope/sort key, includeTotal=false.

- Snapshot persisted in localStorage (was sessionStorage), with legacy migration.

- MIN_LOADING_SKELETON_MS=0; skeleton hides as soon as assets are present.

- New scheduleSnapshotHeadRefresh: re-fetch page 0 after fast-path cached:true and upsert new items at correct sort position. Fixes recent assets disappearing on scope switch (custom->output).

- offset=max(offset, assets.length) in didHydrate branch so prefetch loads next page, not page 0 again.

- refreshDuplicateAlerts non-blocking (fire-and-forget).

- Race guards: scheduleDeferredExecutionReload skips reload if scope/filter changed during prompt execution; scheduleSnapshotHeadRefresh aborts if context changes mid-fetch.

- Includes other staged misc edits (config, scanner, watcher, components).
2026-04-23 17:49:20 +02:00
Ewald dbf05a8c0e test: fix floating_viewer_toolbar_overlay_controls for popover-based toolbar
The toolbar was redesigned from inline <select> to icon buttons + popovers.
Update the test to match the new structure:
- check for .mjr-mfv-guides-trigger and .mjr-mfv-ch-trigger in bar
- expect formatSelect.value to be 'off' when _overlayMaskEnabled is false
- add viewer.element to the mock so the popover appendChilds don't throw
2026-04-22 10:22:08 +02:00
Ewald 6cfcc84c1a fix: MFV seed randomize + subgraph widget live sync
- sidebarRunButton: add _walkAllNodes() to mirror ComfyUI's native
  beforeQueued/afterQueued widget cycle on all nodes incl. inner subgraph
  nodes so control_after_generate (randomize/increment/decrement) is
  applied correctly on each MFV run
- widgetAdapters: _syncWidgetDomElement falls back to
  cachedDeepestByFrame.widget.inputEl for PromotedWidgetView so typing
  in the sidebar updates the canvas textarea of subgraph outer widgets
  in real time
- widgetAdapters: spinner step forced to 1 for integer widgets;
  widget.value restored after callback to bypass step2 snapping
2026-04-22 10:19:53 +02:00
Ewald 79ccbe0da1 fix(hot-reload): address potential issues during Vite hot-reload
- Remove stale storage event listener in SettingsPanel.js
- Add checks for window object in LiveStreamTracker.js, floatingViewerManager.js
- Implement onScopeDispose for storage event listener in usePanelStore.js
- Add check for window object in MajoorPanel.svelte
2026-04-21 11:35:04 +02:00
MajoorWaldiandMajoorWaldi c9459db0fd fix: change MFV_LIVE_DEFAULT from false to true to fix floatingViewerManager test failures
Agent-Logs-Url: https://github.com/MajoorWaldi/ComfyUI-Majoor-AssetsManager/sessions/32c3a21b-8cd3-47b5-8392-fb959c7c0531

Co-authored-by: MajoorWaldi <129623145+MajoorWaldi@users.noreply.github.com>
2026-04-20 21:21:10 +00:00
Ewald b2ef3d0f80 fix(assets): improve grid reload and scroll behavior
- Adjusting the infinite scroll loading point to 4 card rows from the bottom
- Improving grid state restoration after reloads
- Enhancing the early fetch mechanism for faster initial loads
- Optimizing execution runtime to handle large numbers of assets efficiently
- Updating viewer and run button behavior for better integration with ComfyUI
- Fix various bugs and edge cases
2026-04-20 23:10:42 +02:00