Commit Graph
47 Commits
Author SHA1 Message Date
Ewald 37fb1b00e6 chore: release 2.5.1 2026-09-04 21:18:35 +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 c669c03439 Improve viewer compatibility and media handling 2026-08-13 10:02:39 +02:00
Ewald b700104588 feat: modernize ComfyUI integration and add KJNodes previews 2026-08-12 11:16:06 +02:00
Ewald bf0fe4b9af Hide unavailable file info and update frontend build 2026-08-06 20:22:59 +02:00
MajoorWaldi 30b2d394b9 Harden bundled Pinia state merging 2026-08-06 19:12:07 +02:00
MajoorWaldi e7a2f8b88d Improve save placeholders and floating viewer 2026-08-06 19:08:06 +02:00
bsawang 10a6fd6fa3 feat: folder browsing, drag-move, parent navigation & subfolder create 2026-07-29 13:35:38 +08: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 fff2b03e94 Fix floating viewer gen info layout 2026-07-06 13:32:53 +02:00
Ewald faf4055e08 Improve asset sidebar viewer and panel UX 2026-07-02 17:38:46 +02:00
Ewald cdd0314ad9 Fix search filter parsing and grid query typing 2026-07-01 16:16:26 +02:00
Ewald 2633e67ede Improve workflow metadata and viewer UX 2026-06-30 22:58:41 +02:00
Ewald 8e9e525317 Polish asset sidebar UI 2026-06-30 09:27:05 +02:00
Ewald 5fadbbbeb1 Fix metadata sidebar extraction and display 2026-06-29 18:07:21 +02:00
Ewald 6f116a3eb4 Fix generation prompt tracing 2026-06-29 08:54:20 +02:00
Ewald 11d1a9c659 Clarify remote LAN write auth failures 2026-06-25 17:15:55 +02:00
Ewald 67a8aa4961 Release 2.4.9 and fix LTX video drops 2026-06-25 12:29:16 +02:00
Ewald 30ae52d978 Integrate ComfyUI app mode and workflow UX fixes 2026-06-22 16:03:28 +02:00
Ewald cf1ea341a7 Fix MFV topbar integration 2026-06-22 09:44:07 +02:00
Ewald 431faa8557 Fix security findings and test environment 2026-06-22 09:35:10 +02:00
Ewald b97f13d153 Optimize asset grid and viewer performance 2026-06-17 10:09:52 +02:00
Ewald bacc50000e Improve VRAM controls and settings organization 2026-06-16 17:17:19 +02:00
Ewald 0b3d27c000 Fix grid thumbnail aspect ratio 2026-06-12 14:09:11 +02:00
Ewald e825b12fbd fix(grid): correct thumbnail blink and reload impression
Root causes found by deep CSS + Vue audit:

1. Missing .mjr-show-details CSS rule (PRIMARY cause of reload impression)
   - .mjr-card-info had no hide rule in the main grid
   - applyGridSettingsClasses() toggles .mjr-show-details on the container
   - estimateRowHeight() assumed metaHeight=0 when showDetails=false
   - But .mjr-card-info was always rendered (~44px) -> virtualizer under-
     estimated every row -> repositioned all rows on first measure -> visual
     jump that looked like a full grid reload on each scroll
   Fix: add .mjr-grid .mjr-card-info { display:none } default with
        .mjr-grid.mjr-show-details .mjr-card-info { display:block } toggle
        (same pattern already used by the bottom feed at line 9119)

2. estimateRowHeight metaHeight constant was 82px instead of ~52px
   - Actual card-info height: padding 12 + filename 15 + margin 4 + row 13 = 44px
   - 82px caused over-allocation when showDetails=true -> gap between rows
     that the virtualizer would correct on measure -> same jump artifact
   Fix: reduce to 52px (44px actual + 8px buffer for font variance)

3. scale(0.92) on .is-selected caused a visible blink on selection change
   - The 8% shrink animated over 120ms transition; rapid selection change
     (e.g. keyboard nav) caused all de-selected cards to snap back -> blink
   Fix: reduce to scale(0.97) - still gives inset feel without the flash

4. Skeleton card min-height:146px conflicted with computed skeletonCardStyle
   height -> skeleton cards taller than real cards -> layout jump on first
   asset load
   Fix: remove min-height from .mjr-grid-skeleton-card
2026-06-12 12:26:26 +02:00
Ewald 43a1fad285 chore: update dist, tests, and UI components 2026-06-12 10:19:33 +02:00
Ewald 5c31f29ecc Add workflow roots and fix video previews 2026-06-11 20:50:18 +02:00
Ewald fe0f24299a Fix path widget false positives 2026-06-11 10:26:08 +02:00
Ewald ca6288a1c0 Improve Comfy theme styling and audio viewer 2026-06-11 10:20:33 +02:00
Ewald 42f6cc72ce chore: save current worktree 2026-06-09 17:32:25 +02:00
Ewald 20a50040a6 Add workflow library scope 2026-06-09 10:28:25 +02:00
Ewald d96b10b27f docs: remove contribution docs 2026-06-05 17:44:32 +02:00
Ewald 78d3adc3a2 fix(dnd): raise per-widget string limit to avoid rejecting valid workflows
Nodes like iToolsPromptRecord store large texts in widgets_values.
The 8 KB per-value cap caused isValidWorkflowShape() to return false,
making canvas drops create loader nodes instead of loading the workflow.

The total workflow size (MAX_WORKFLOW_BYTES = 5 MB) is the right security
boundary; the per-value cap is raised to 500 KB (safety ceiling only).

Fixes #128
2026-06-05 17:34:00 +02:00
Ewald 9de075d197 Fix graph map node action params 2026-06-03 17:21:01 +02:00
Ewald 0a3271cdd7 Fix workflow graph map sampler params 2026-06-03 17:15:29 +02:00
Ewald e4f9053219 Stabilize JS CI and workflow sidebar tests 2026-06-03 15:15:38 +02:00
Ewald 04ca1f444e Improve workflow metadata filters and UI localization 2026-06-03 14:55:00 +02:00
Ewald b255c25c49 refactor(filter): style popover neutre + fermeture via mjr:filters-changed 2026-06-02 16:58:15 +02:00
Ewald 31e5ae0d73 Fix asset grid refresh and media card handling 2026-06-02 16:25:20 +02:00
MajoorWaldi f52b54912d Fix remaining mojibake in panel messages 2026-05-31 20:31:25 +02:00
Ewald c009e7f92b Regenerate frontend bundle 2026-05-26 13:44:02 +02:00
Ewald 85a82f130a test: migrate ui/tests from .mjs to .ts
- Rename 132 *.vitest.mjs -> *.vitest.ts
- Rename vitest.setup.mjs -> vitest.setup.ts
- Rename helpers/vitestEnvironment.mjs -> vitestEnvironment.ts
- Delete settings_store.test.mjs (Node test runner, superseded by .vitest.ts)
- Fix .mjs imports in vitest.setup.ts and grid_loader_adaptive_paging.vitest.ts

Config updates:
- vitest.config.mjs: setupFiles, include, coverage.include -> .ts
- tsconfig.test.json: new dedicated config for test files (strict:false)
- knip.json: update project pattern for tests
- package.json: add typecheck:tests script (audit-only)
2026-05-26 13:04:05 +02:00
Ewald a78f4572c8 Align frontend layout with ComfyUI conventions 2026-05-26 10:42:22 +02:00