Commit Graph
187 Commits
Author SHA1 Message Date
Ewald 16366a3e8c Merge main into feat/bulk-rating and rebuild dist 2026-11-06 21:42:54 +01:00
Ewald 6d9596177b Fix type errors in the empty trash tests 2026-11-06 08:48:25 +01:00
Wiley Walarus 7357b7d4f7 Merge remote-tracking branch 'upstream/main' into feat/empty-trash
# Conflicts:
#	dist/chunks/FloatingViewer--x61GAzy.js
#	dist/chunks/FloatingViewer-C1eZh1RI.js
#	dist/chunks/FloatingViewer-DhwnucdW.js
#	dist/chunks/LiveStreamTracker-C_DbXPzd.js
#	dist/chunks/LiveStreamTracker-D7_0rdMr.js
#	dist/chunks/LiveStreamTracker-TJKzCtmY.js
#	dist/chunks/TagsEditor-CoihV7nA.js
#	dist/chunks/TagsEditor-MUk741GH.js
#	dist/chunks/TagsEditor-azyI3gio.js
#	dist/chunks/ViewerPortal-C-jJfeZ8.js
#	dist/chunks/ViewerPortal-Sv96pbcb.js
#	dist/chunks/ViewerPortal-uMD2UO3H.js
#	dist/chunks/client-BvjF14km.js
#	dist/chunks/config-C9a-wT5M.js
#	dist/chunks/config-DuYSTOIQ.js
#	dist/chunks/floatingViewerManager-B_I-SRbd.js
#	dist/chunks/floatingViewerManager-DKKiRaIT.js
#	dist/chunks/floatingViewerManager-fDjzEWML.js
#	dist/chunks/genInfo-CeqJwWZi.js
#	dist/chunks/genInfo-CqefQj0f.js
#	dist/chunks/genInfo-Dk8cerKp.js
#	dist/chunks/generationSectionState-C3QjLGhL.js
#	dist/chunks/generationSectionState-CvxAWtdW.js
#	dist/chunks/generationSectionState-DuXxSw-j.js
#	dist/chunks/tooltipShortcuts-B6df4adU.js
#	dist/chunks/tooltipShortcuts-BhVUSZWz.js
#	dist/chunks/tooltipShortcuts-Ury2eTek.js
#	dist/entry.js
2026-11-05 10:18:05 -08:00
Wiley Walarus b57aef737e Merge remote-tracking branch 'upstream/main' into feat/bulk-rating
# Conflicts:
#	dist/chunks/FloatingViewer--x61GAzy.js
#	dist/chunks/FloatingViewer-DhwnucdW.js
#	dist/chunks/FloatingViewer-XL2VdSI7.js
#	dist/chunks/LiveStreamTracker-8JqZRAHJ.js
#	dist/chunks/LiveStreamTracker-C_DbXPzd.js
#	dist/chunks/LiveStreamTracker-D7_0rdMr.js
#	dist/chunks/TagsEditor-CoihV7nA.js
#	dist/chunks/TagsEditor-De8cQTQE.js
#	dist/chunks/TagsEditor-MUk741GH.js
#	dist/chunks/ViewerPortal-BCfI-otY.js
#	dist/chunks/ViewerPortal-Sv96pbcb.js
#	dist/chunks/ViewerPortal-uMD2UO3H.js
#	dist/chunks/config-C9a-wT5M.js
#	dist/chunks/config-DuYSTOIQ.js
#	dist/chunks/config-dihyfQy1.js
#	dist/chunks/floatingViewerManager-B_I-SRbd.js
#	dist/chunks/floatingViewerManager-BzzaeMOl.js
#	dist/chunks/floatingViewerManager-DKKiRaIT.js
#	dist/chunks/genInfo-CqefQj0f.js
#	dist/chunks/genInfo-Dk8cerKp.js
#	dist/chunks/genInfo-xXAhWbtu.js
#	dist/chunks/generationSectionState-BX83mf43.js
#	dist/chunks/generationSectionState-CvxAWtdW.js
#	dist/chunks/generationSectionState-DuXxSw-j.js
#	dist/chunks/tooltipShortcuts-B6df4adU.js
#	dist/chunks/tooltipShortcuts-BCONAm3l.js
#	dist/chunks/tooltipShortcuts-Ury2eTek.js
#	dist/entry.js
2026-11-05 10:18:05 -08:00
Ewald 7e468bd0a1 Narrow optional result data in the workflow listing test 2026-11-05 15:30:06 +01:00
Ewald c85408e72a Fix CodeQL path-injection alerts and the minimatch advisory 2026-11-05 12:04:25 +01:00
Ewald b9550bbc5f Merge pull request #280 from johnbuck/fix/bulk-delete-endpoint
Rebuild dist after merging
2026-11-05 11:36:23 +01:00
Ewald a93ffbbe81 Merge pull request #275 from johnbuck/fix/exiftool-tag-dedup
# Conflicts:
#	CHANGELOG.md
2026-11-05 11:35:39 +01:00
Ewald ALOEBOETOE 9740140e0d Merge pull request #276 from johnbuck/feat/configurable-write-rate-limits
feat(config): make delete and asset-write rate limits configurable
2026-11-05 11:35:13 +01:00
Wiley Walarus f9d2d17100 Merge remote-tracking branch 'upstream/main' into feat/empty-trash
# Conflicts:
#	dist/chunks/FloatingViewer--x61GAzy.js
#	dist/chunks/FloatingViewer-Bz47Jc0X.js
#	dist/chunks/FloatingViewer-D8bHMZQk.js
#	dist/chunks/LiveStreamTracker-3cOrqzaO.js
#	dist/chunks/LiveStreamTracker-CIt2lOUV.js
#	dist/chunks/LiveStreamTracker-C_DbXPzd.js
#	dist/chunks/SidebarWorkflowSection-CNCP5dlO.js
#	dist/chunks/TagsEditor-aRJPpygc.js
#	dist/chunks/Viewer-kUNEcWpp.js
#	dist/chunks/ViewerPortal-CaLKlqFj.js
#	dist/chunks/config-C9a-wT5M.js
#	dist/chunks/events-7GBcKIuJ.js
#	dist/chunks/events-tsQFsZrH.js
#	dist/chunks/floatingViewerManager-DjQlwRgo.js
#	dist/chunks/genInfo-3GnsjPmc.js
#	dist/chunks/model3dRenderer-C6r7uHPh.js
#	dist/chunks/openMajoorSettings-IdB9HDLb.js
#	dist/chunks/openMajoorSettings-o-KvlZWK.js
#	dist/chunks/sideBySide-By4kool7.js
#	dist/chunks/tooltipShortcuts-Ury2eTek.js
#	dist/chunks/viewerOpenRequest--9P9UGeN.js
#	dist/chunks/viewerRuntimeHosts-C-jwQQuE.js
#	dist/entry.js
2026-11-04 12:37:13 -08:00
Wiley Walarus f89f35734e Merge remote-tracking branch 'upstream/main' into feat/bulk-rating
# Conflicts:
#	dist/chunks/FloatingViewer--x61GAzy.js
#	dist/chunks/FloatingViewer-CoLKFy-V.js
#	dist/chunks/FloatingViewer-D8bHMZQk.js
#	dist/chunks/LiveStreamTracker-CIt2lOUV.js
#	dist/chunks/LiveStreamTracker-CXMPWBuu.js
#	dist/chunks/LiveStreamTracker-C_DbXPzd.js
#	dist/chunks/SidebarWorkflowSection-D5MpDsey.js
#	dist/chunks/TagsEditor-BPt1aTVO.js
#	dist/chunks/Viewer-DjRdwzYB.js
#	dist/chunks/ViewerPortal-CENQ3UGt.js
#	dist/chunks/config-C9a-wT5M.js
#	dist/chunks/events-C9AjbLbS.js
#	dist/chunks/events-tsQFsZrH.js
#	dist/chunks/floatingViewerManager-B5hXkzSo.js
#	dist/chunks/genInfo-Cy9XpLCK.js
#	dist/chunks/model3dRenderer-DiKG1134.js
#	dist/chunks/openMajoorSettings-DVq-b2TJ.js
#	dist/chunks/openMajoorSettings-IdB9HDLb.js
#	dist/chunks/sideBySide-DKS5-27I.js
#	dist/chunks/tooltipShortcuts-Ury2eTek.js
#	dist/chunks/viewerOpenRequest-CHrdpRvN.js
#	dist/chunks/viewerRuntimeHosts-CzzbsByu.js
#	dist/entry.js
2026-11-04 12:37:12 -08:00
Wiley Walarus 77a96d110c Merge remote-tracking branch 'upstream/main' into fix/bulk-delete-endpoint
# Conflicts:
#	dist/chunks/FloatingViewer--x61GAzy.js
#	dist/chunks/FloatingViewer-ChLkunrC.js
#	dist/chunks/FloatingViewer-D8bHMZQk.js
#	dist/chunks/LiveStreamTracker-Bm3iSgMa.js
#	dist/chunks/LiveStreamTracker-CIt2lOUV.js
#	dist/chunks/LiveStreamTracker-C_DbXPzd.js
#	dist/chunks/SidebarWorkflowSection-Il8h_Lxt.js
#	dist/chunks/TagsEditor-DIWU3BJ3.js
#	dist/chunks/Viewer-CVh8T5Ff.js
#	dist/chunks/ViewerPortal-CYbu70-Q.js
#	dist/chunks/config-C9a-wT5M.js
#	dist/chunks/events-Dsaaq7CE.js
#	dist/chunks/events-tsQFsZrH.js
#	dist/chunks/floatingViewerManager-DQlULmZ-.js
#	dist/chunks/genInfo-_xs-pT8h.js
#	dist/chunks/model3dRenderer-DNsnm5Az.js
#	dist/chunks/openMajoorSettings-CJdCbICp.js
#	dist/chunks/openMajoorSettings-IdB9HDLb.js
#	dist/chunks/sideBySide-CioDf4i3.js
#	dist/chunks/tooltipShortcuts-Ury2eTek.js
#	dist/chunks/viewerOpenRequest-SXvGdj01.js
#	dist/chunks/viewerRuntimeHosts-BVuaPEIm.js
#	dist/entry.js
2026-11-04 12:37:10 -08:00
Wiley Walarus 5e57eb4f26 Merge remote-tracking branch 'upstream/main' into fix/scan-skip-hidden-dirs
# Conflicts:
#	mjr_am_backend/features/index/watcher.py
2026-11-04 12:36:54 -08:00
Wiley Walarus 265f42d60c feat(api): trash status and empty routes 2026-11-04 12:27:39 -08:00
Wiley Walarus 8485791c1c feat(trash): service to find and empty Majoor's freedesktop trash entries 2026-11-04 12:27:39 -08:00
Wiley Walarus 170c843f99 feat(api): batch rating route
POST /mjr/am/assets/rating rates up to 500 assets per request (10 req/60s)
using the per-asset update path, reports missing ids as partial NOT_FOUND
failures, enqueues rating/tags sync per updated id, and writes one
assets_rating audit entry per request.
2026-11-04 11:44:42 -08:00
Wiley Walarus 0f23422dc2 fix(grid): delete multi-card selections through the bulk endpoint 2026-11-04 11:14:44 -08:00
Ewald ALOEBOETOE ab4bdd41ea Match single-word searches anywhere in the file name
Typing "F" only found file names with a word starting with F (FTS5
prefix match), so the grid did not list e.g. sunflower.png or
ComfyUI_00001_.png. Single-word queries now add a filename LIKE
'%text%' branch to the global and scoped FTS queries and their counts,
ranked after FTS hits, with LIKE wildcards escaped. Multi-word and
quoted queries stay pure FTS.
2026-11-04 09:16:16 +00:00
Ewald ALOEBOETOE 4a19fc81a5 Fix remaining issues from the integration audits
- Watcher: a sidecar JSON created or edited next to an unchanged media
  file now invalidates that file's metadata cache and scan journal and
  forces a re-extraction; a non-incremental re-index no longer skips
  assets that already have a metadata row when the cache was cleared.
- Merge index rows that are one file under different Windows path
  spellings at startup, keeping the best rating, all tags, the stack
  cover, execution ids and the vector embedding.
- Remove deleted/removed assets from the generated feed too.
- Scope the floating viewer's single-letter shortcuts to the viewer
  (pointer, focus or pop-out) instead of the whole page.
- Take LGraph/LGraphCanvas types from comfyui-frontend-types and drop
  @comfyorg/litegraph; delete five dead frontend files.
- Fix an order-dependent test that leaked an input-directory override.
2026-11-04 08:48:26 +00:00
Ewald ALOEBOETOE 6cafe5cc42 Fix search syntax errors, sidecar JSON, workflow JSON recognition, MFV media leak
- Search: tokens were filtered down to nothing for inputs like "at-7",
  "(2)", "AND", a single letter or a lone quote, producing an empty FTS
  MATCH and "Invalid search query syntax". Fall back to the raw words,
  treat punctuation-only input as browse-all, keep non-Latin scripts and
  fold accents on Latin letters only (as FTS5 unicode61 does).
- Sidecar JSON (<file>.<ext>.json, then <stem>.json) now supplies the
  workflow/prompt/generation data of images, videos and audio when none
  is embedded; shared with the 3D extractor; BOM tolerated.
- Workflow tab: skip hidden folders (.history version snapshots were
  listed as workflows), only list UI exports, API prompts and wrappers,
  read with utf-8-sig, drop invalid JSON from the index (version 5),
  and load API-format workflows with app.loadApiJson.
- Floating viewer: release (not just pause) videos before re-rendering
  and on dispose, so Live mode no longer accumulates media players.
2026-11-04 08:26:47 +00:00
Ewald ALOEBOETOE 49bf320631 Fix asset sync for new, moved and deleted files
- Fix assets_fts triggers: the external-content FTS5 table was updated
  with plain UPDATE/DELETE, so every rename or move failed with
  "database disk image is malformed" and the watcher fell back to
  delete + re-index, losing ratings, tags and collections. Use the FTS5
  'delete' command, limit the update trigger to filename/subfolder and
  repair existing databases (plus an FTS rebuild) at startup.
- Wait for the prompt history entry before post-execution ingestion:
  ComfyUI fires on_prompt_end before task_done() stores history, so
  outputs of prompts queued from the API or another client could be
  missed.
- Scan prune only removes assets whose absence is confirmed; a stat
  error or an unreadable scan root no longer deletes user data. Report
  pruned assets instead of SQLite change counts.
- Emit mjr-assets-removed for watcher deletes and scan prunes and
  mjr-asset-updated for moves so open grids update in place.
- Annotate mjr-scan-complete with origin and needs_refresh; reload the
  grid once when live events cannot cover a change and summarise a
  finished directory scan in one ComfyUI core toast.
- Document the comparison with ComfyUI core's asset system.
2026-11-04 08:01:26 +00:00
Wiley Walarus c593a15526 fix(tags): replace XMP/IPTC tag lists instead of appending on save
Three compounding causes made every rating/tags save pile up duplicate
XMP:Subject/IPTC:Keywords entries (e.g. cat x10 plus joined "a; b"
items after three saves):

- _append_metadata_write_args wrote lists as a bare -TAG= clear followed
  by -TAG+=item appends; lists are now written as one plain -TAG=item
  assignment per item (bare -TAG= only when no items remain, to clear).
- _build_exiftool_rating_tags_payload also wrote unqualified
  Keywords/Subject strings, which ExifTool resolves to the same list
  tags and adds a joined item; the keys are dropped.
- _write_exiftool_payload passed preserve_workflow=True, whose
  -tagsFromFile @ copied every existing tag (stale list items included)
  back over the new values; the rating/tags write now uses
  preserve_workflow=False. Other callers keep their behaviour.

After any number of saves the file holds exactly the latest tag set;
PNG prompt/workflow text chunks are preserved (covered by a real
ExifTool round-trip test that skips when exiftool is not on PATH).
2026-11-03 21:16:33 -08:00
Wiley Walarus bc2dd28a51 fix(index): skip hidden and internal folders in recursive scan
FileSystemWalker._next_dir returned every subdirectory, so a recursive
scan descended into send2trash's per-volume .Trash-<uid>/files and the
internal _mjr_index, and trashed images reappeared as live cards. The
walker now never descends into a subdirectory whose name starts with '.'
or whose lowercased name is in IGNORED_DIR_NAMES (moved from watcher.py
so walker and watcher share one set). The scan root itself is exempt, so
roots under dot-paths such as ~/.config/ComfyUI/output still scan.
File-level filtering, the non-recursive path and watcher matching are
unchanged.
2026-11-03 21:16:33 -08:00
Wiley Walarus 6054b71c00 feat(config): make delete and asset-write rate limits configurable
Add MJR_AM_DELETE_RATE_LIMIT (default 20) and MJR_AM_ASSET_WRITE_RATE_LIMIT
(default 30) env knobs, clamped to 1..10000 per 60 s window, and wire the
single-asset delete route and the shared rating/tags request preparation to
use them instead of hard-coded literals. Defaults are unchanged.
2026-11-03 21:10:18 -08:00
Ewald ALOEBOETOE d0ab7d594e Resolve remaining ComfyUI integration conflicts
- Move the read-only OpenAPI compat surface from /api/v2/assets to
  /mjr/am/compat/assets so it never squats ComfyUI core's /api namespace;
  the legacy alias is opt-in via MJR_AM_LEGACY_API_V2_ASSETS=1.
- Allow Python 3.14 (requires-python <3.15) and add 3.14 to CI and tox.
- Stop wrapping api.queuePrompt: progress tracking now resolves the
  running prompt from the core Jobs API (getJobDetail), then /queue and
  /history, driven by websocket events. Remove wrapHostQueuePrompt.
- Add opt-in Majoor.Integration.HideNativeAssetsTab setting that hides
  ComfyUI's native Assets sidebar tab through the official
  getSidebarTabs/unregisterSidebarTab API and restores it when disabled.
- Fix all 913 type errors in tsconfig.test.json and type-check tests in
  CI; drop a duplicated `stubs` key in asset_card_inner test; make
  addToastHistory's type argument optional for the object form.
- Update audit report, changelog, API reference and env var docs.
2026-11-03 21:16:34 +00:00
copilot-swe-agent[bot]andMajoorWaldi 4dcc663796 Filter benign Florence optional custom-generation probe log
Co-authored-by: MajoorWaldi <129623145+MajoorWaldi@users.noreply.github.com>
2026-10-25 19:14:01 +00:00
copilot-swe-agent[bot]andMajoorWaldi acc5e9732b Fix Ruff import ordering in quality-gate tests
Co-authored-by: MajoorWaldi <129623145+MajoorWaldi@users.noreply.github.com>
2026-10-25 16:00:15 +00:00
copilot-swe-agent[bot]andMajoorWaldi 2154a58d5c Fix Python typecheck errors in graph links and EXR thumbnails
Co-authored-by: MajoorWaldi <129623145+MajoorWaldi@users.noreply.github.com>
2026-10-24 17:29:43 +00:00
copilot-swe-agent[bot]andMajoorWaldi 14d773f06d Fix custom Inputs indexing and expose an explicit scan button
Co-authored-by: MajoorWaldi <129623145+MajoorWaldi@users.noreply.github.com>
2026-10-24 16:46:36 +00:00
Ewald f093348cf5 fix: resolve collection exports and floating viewer input conflicts 2026-10-23 11:21:08 +02:00
Ewald b406535bf1 Stop rate limiting the local grid on the list route
Paging, prefetch and a reload per generation could exceed 50 list requests per minute and stall the grid. Loopback clients are exempt; remote clients are still throttled.
2026-10-01 13:02:04 +02:00
Ewald 30c964a7c1 Index opus, EXR, TIFF, SVG, BMP, AVI and M4V assets
Add the missing extensions to the shared classifier. EXR and TIFF are served to the viewer as a JPEG preview (EXR tone-mapped from scene-linear), ?original=1 returns the source file, and SVG is served sandboxed.
2026-10-01 12:18:20 +02:00
Ewald 39248a8f6d Fix metadata extraction for MKV, WebM, AVIF, JPEG and TIFF
Read generation time and execution ids case-insensitively from Matroska tags, read Majoor keys from AVIF/WebP EXIF text, and route JPEG and TIFF through the EXIF text reader so Prompt:/Workflow: and A1111 parameters are found.
2026-10-01 12:18:20 +02:00
Ewald 227b78cc62 Fix gen info on subgraph workflows and multi-output prompts
Resolve dict-form subgraph links, bridge subgraph inputs and outputs, expand nested subgraphs, keep linked widgets aligned with widgets_values and name widgets from the live node schema. Derive the sampler name from sampler selector classes, recognise the remaining core output nodes as sinks, accept single-node prompts, and parse gen info per producing node when a prompt writes several files.
2026-10-01 12:18:20 +02:00
Ewald 990071069f Remove automatic GitHub release/update check
The frontend called checkMajoorVersion() unconditionally on startup,
and the backend /mjr/am/releases endpoint made outbound requests to
api.github.com to power it. This violates the no-internet-requests
policy for core ComfyUI code, even for update checks framed as
diagnostic or opt-out. Removes the endpoint, the frontend check, the
now-dead version-update badge dot in HeaderSection.vue, and associated
tests/docs.
2026-09-30 16:55:50 +02:00
copilot-swe-agent[bot]andMajoorWaldi aa9d28bc53 Merge remote-tracking branch 'origin/main' into fix/registry-runtime-hardening
# Conflicts:
#	dist/chunks/FloatingViewer-AB1oLZ0d.js
#	dist/chunks/FloatingViewer-BVmALIs3.js
#	dist/chunks/FloatingViewer-Cg2hGEZM.js
#	dist/chunks/LiveStreamTracker-0EQGV-lK.js
#	dist/chunks/LiveStreamTracker-BUT5H4M5.js
#	dist/chunks/LiveStreamTracker-DdMfL0ro.js
#	dist/chunks/SidebarWorkflowSection-B4wvtrtQ.js
#	dist/chunks/SidebarWorkflowSection-B_P-QZwl.js
#	dist/chunks/SidebarWorkflowSection-DckvqBNY.js
#	dist/chunks/TagsEditor-B8xpRa5e.js
#	dist/chunks/TagsEditor-BHGoWuSC.js
#	dist/chunks/TagsEditor-cUM_tRt-.js
#	dist/chunks/Viewer-DDNDTRcP.js
#	dist/chunks/Viewer-Dzb5KE6D.js
#	dist/chunks/Viewer-GH30s1No.js
#	dist/chunks/ViewerPortal-BAh1499M.js
#	dist/chunks/ViewerPortal-C-GBMubk.js
#	dist/chunks/ViewerPortal-DvYVQ32S.js
#	dist/chunks/floatingViewerManager-5-IYujSt.js
#	dist/chunks/floatingViewerManager-BVG4XDLW.js
#	dist/chunks/floatingViewerManager-Bnd82Qrd.js
#	dist/chunks/genInfo-Bq-kF66o.js
#	dist/chunks/genInfo-CV-v139t.js
#	dist/chunks/genInfo-CwY4j1FN.js
#	dist/chunks/mjr-primevue-C955bvXT.js
#	dist/chunks/mjr-primevue-DtKnnCVn.js
#	dist/chunks/mjr-primevue-n1rsQYJg.js
#	dist/chunks/mjr-vue-vendor-BU1tBlvz.js
#	dist/chunks/mjr-vue-vendor-CF0zsqr1.js
#	dist/chunks/mjr-vue-vendor-D2GeV7Qd.js
#	dist/chunks/openMajoorSettings-CHrLP8DR.js
#	dist/chunks/openMajoorSettings-DU4OegtI.js
#	dist/chunks/openMajoorSettings-JYq392b-.js
#	dist/chunks/viewerOpenRequest-C4hEgmOj.js
#	dist/chunks/viewerOpenRequest-CzyrZA71.js
#	dist/chunks/viewerOpenRequest-DQQY02Vk.js
#	dist/chunks/viewerRuntimeHosts-CIiyEfr6.js
#	dist/chunks/viewerRuntimeHosts-CuR8T4j6.js
#	dist/chunks/viewerRuntimeHosts-DC1iA_jY.js
#	dist/entry.js
#	mjr_am_backend/features/index/vector_service.py
#	mjr_am_backend/routes/core/request_json.py
#	mjr_am_backend/routes/core/security_proxies.py
#	mjr_am_backend/routes/core/security_tokens.py
#	mjr_am_shared/version.py

Co-authored-by: MajoorWaldi <129623145+MajoorWaldi@users.noreply.github.com>
2026-09-26 17:40:42 +00:00
Ewald 9c5078d174 fix: harden registry packaging and runtime boundaries
Exclude development-only content from Registry packages while retaining runtime
docs and vendor assets. Centralize environment access and media process execution,
validate filesystem inputs, and restrict nested media protocols.

Route update checks through the backend GitHub boundary and read version metadata
without spawning Git. Preserve annotated-tag priority over lightweight nightly
tags, including packed refs, with regression coverage. Rebuild the frontend bundle.

Validation: Python tests with coverage, JS tests, targeted media/version regression
tests, and the canonical Python quality gate.
2026-09-26 19:21:04 +02:00
Ewald df22cb501c fix(workflows): resolve ComfyUI root via folder_paths.base_path (GH #222)
_detect_comfy_root() located the ComfyUI install by walking up from the
output directory (or this package's own file) looking for a folder
containing both main.py and folder_paths.py side by side. Under
non-standard install layouts that heuristic can silently fail and return
None, which makes managed_workflow_root() return None too - so every
workflow path check fails with "Workflow path is not allowed" regardless
of the configured Workflow Roots setting.

Add get_base_path() to the comfy_core adapter (folder_paths.base_path,
the root ComfyUI itself resolves at startup) and try it first, falling
back to the old heuristic only when it's unavailable.
2026-09-11 12:14:10 +02:00
Ewald a0638ca4d3 fix(runtime): index output and temp prompt files under separate roots (GH #222)
A prompt that produces both an "output" file (Save Image) and a "temp" file
(e.g. a Preview Image node) was indexed with one shared base_dir computed via
commonpath across both, which walks up to their shared ComfyUI-root ancestor
and makes every subfolder wrongly include "output" or "temp" as a literal
leading segment - breaking the /view URL built from it and preventing the
grid from loading the image.

Group refs by item_type and call index_paths once per group against its own
correct root (runtime output root vs ComfyUI temp dir).
2026-09-11 11:55:58 +02:00
Ewald 094cb552c2 fix(security,ci): gate reads behind auth, harden release pipeline, fix cache-provider coupling and delete atomicity
- Require the same Comfy auth on all Majoor GET routes as on writes, closing
  a read-confidentiality gap for remote/multi-user deployments (no-op when
  Comfy auth is disabled, the default single-user setup).
- Gate nightly and stable releases on a quality job (pytest, mypy, frontend
  typecheck/build/tests, dist/ drift check) before publishing, and refresh
  the committed dist/ bundle to match a clean build.
- Pin softprops/action-gh-release and Comfy-Org/publish-node-action to
  commit SHAs.
- Resolve ComfyUI's CacheProvider through the public comfy_api.latest.Caching
  alias instead of the underscore-private _caching module.
- Make asset-delete DB cleanup atomic: a failed cleanup statement now aborts
  the transaction instead of committing a partial delete.
2026-09-04 20:53:57 +02:00
Ewald 0db328352a fix: close auth bypass on /api route mirror, revert PrimeVue to MIT 4.5.5
Security
--------
ComfyUI's PromptServer.add_routes() mirrors every registered route under a
second "/api" prefix, so /mjr/am/<mutation> is also served at
/api/mjr/am/<mutation>. The auth middleware matched only the canonical
prefix, so the mirrored path reached the same handler with the
authentication check skipped entirely, and without the hardening headers:

    POST /mjr/am/assets/delete      -> requires_auth = True
    POST /api/mjr/am/assets/delete  -> requires_auth = False

Replaced the prefix test with a shared _is_majoor_path() boundary covering
the canonical prefixes, ComfyUI's /api mirror, and the /api/v2/assets
compat surface. Verified it does not capture ComfyUI's own routes. CSRF,
rate limiting and safe-mode gates are per-handler and were unaffected.

Licensing
---------
PrimeVue 5 is no longer MIT: PrimeTek moved it to the commercial "PrimeUI"
license, which requires a key, shows a license notice without one, and
forbids redistributing it "as a component library or development tool"
without a separate OEM License. Dependabot had auto-merged 4.5.5 -> 5.0.1.
This project is GPL-3.0 and commits dist/ to the repo, so shipping it would
nag every user and conflict with the GPL's redistribution requirement.

Pinned back to 4.5.5 (last MIT release). The 5.x bump had touched only
package.json/package-lock.json, so no source depended on v5 APIs. The
revert drops @primeui/license-manager and its @noble/ed25519 key-signature
stack; the primevue chunk shrinks 555.70 -> 520.61 kB. Dependabot is now
configured to ignore primevue major bumps.

Correctness
-----------
- api_v2_assets: stop returning the DB's absolute filepath on this
  network-reachable surface; subfolder + root_id already convey location
  without disclosing local disk layout.
- watcher: enforce _RECENT_GENERATED_HARD_CAP after inserting a batch;
  pruning only beforehand let a large batch overshoot the cap.
- routes/registry: track registered route groups individually so a group
  failing part-way through does not re-register earlier groups on retry.
- fs_walker/scanner: apply the viewer's root check to symlinked files, so
  the scanner stops indexing symlinks whose target escapes every allowed
  root ("ghost assets" the viewer then refuses to open). Consulted only for
  actual symlinks, so ordinary scans pay no extra I/O.
- routes/registry_app: skip the redundant app.add_routes() on the live
  PromptServer app; ComfyUI adds the shared table itself after node
  loading, so every core and Majoor route was registered twice at startup.
- Result: unwrap()/unwrap_or()/map() gated on `data is not None`, treating
  a legitimate Ok(None) as failure; gate on `ok` instead.
- custom_roots: replace a leftover debug print() that wrote user file paths
  to stderr on every move request with logger.debug.
- schema: drop the redundant UNIQUE(filepath, source, root_id) index
  (migration m022). assets.filepath is already UNIQUE, so it could never
  reject a row the column constraint does not, nor narrow a lookup - it
  only cost a second B-tree write per asset on the scan hot path.

Frontend
--------
- entry.ts: app.registerExtension() throws on a duplicate name and ComfyUI
  exposes no unregisterExtension, so a live re-import threw before setup()
  ran and the reload-safe teardown never executed. Catch it and re-run
  setup() directly.
- Rebuilt dist/ so both the reload fix and the PrimeVue revert ship.

CI / tooling
------------
- frontend-compat-nightly: the types step died with a bare "cp: cannot
  stat" (upstream's build has not emitted dist/index.d.ts since Aug 26).
  Check both candidate paths and dump dist/ with an actionable message.
- package.json: lenient checks that swallowed their exit code are now
  suffixed :advisory, the plain names are strict, and quality:strict runs
  the full set.

Verified: 1841 Python tests pass (5 skipped, symlink privileges), ruff
clean; tsc --noEmit clean, 831 JS tests pass, eslint clean, build succeeds.
2026-09-04 18:41:48 +02:00
Ewald 59afa1caec Fix viewer video and audio playback 2026-08-13 09:53:09 +02:00
Ewald b700104588 feat: modernize ComfyUI integration and add KJNodes previews 2026-08-12 11:16:06 +02:00
bsawang 1d974209d5 fix: add test adapters for folder-browsing browse mode and missing 'mode' field
- Add _Settings mock returning show_folders=False to 3 DB-index tests
  so they bypass the new browse mode and exercise the index path.
- Add mode='filesystem' to _build_browse_response payload for
  consistency with the filesystem-fallback path.
2026-07-29 14:09:09 +08:00
Ewald 17db2fe9d7 fix(security): harden workflow path containment and bump brace-expansion
- Resolve CodeQL py/path-injection alerts: enforce lexical containment
  (normpath + prefix check) before any filesystem access in
  list_workflow_versions, diff_workflow_versions,
  list_workflow_thumbnail_candidates and _resolve_path_under_roots,
  with post-resolve symlink re-validation. Also removes a file
  existence oracle for paths outside the allowed roots.
- npm audit fix: brace-expansion DoS (GHSA-3jxr-9vmj-r5cp, dev-only).
2026-07-24 16:16:50 +02:00
Ewald e3afb1a0d3 feat: add Collect Files (context menu + sidebar) bundling asset, workflow, traced prompt text and media inputs into a zip
- New POST /mjr/am/collect-files route (CSRF, write token, rate limit, path allowlist)
- collect_service: extracts workflow media/model refs, resolves inputs within allowed roots, builds {stem}_collected.zip next to the asset with writable-dir fallback to output/_mjr_collected
- Zip contains asset, workflow.json, prompt_graph.json, prompt.json (positive/negative traced via geninfo parser), inputs/ and collected_files.txt manifest
- comfy_core adapter: get_model_full_path helper
- Frontend: 'Collect files' grid context menu item + sidebar (D) MButton, collectFiles() API client op
- Tests: tests/features/test_collect_service.py (10 tests)
2026-07-24 15:41:48 +02:00
Ewald 10f851aaae Add metadata FTS backfill, registry logging collision fixes, i18n locales, and doc updates 2026-07-22 16:33:34 +02:00
Ewald b98edbb80f Fix viewer paths and clarify write access 2026-07-10 11:43:00 +02:00
Ewald ed8e33c5e4 Prepare 2.5.0 features and release notes 2026-07-09 11:18:28 +02:00
Ewald cdd0314ad9 Fix search filter parsing and grid query typing 2026-07-01 16:16:26 +02:00