Commit Graph

342 Commits

Author SHA1 Message Date
Ethanfel f857485bc8 feat: add ProjectFrameNames node — outputs stem of 3 frame paths
New node in JSON Manager/project that fetches start/middle/end frame
path from the sequence and outputs Path(value).stem for each, so
e.g. '/path/to/keyframe8.png' → 'keyframe8'. Avoids manual string
filtering in large workflows.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 12:16:23 +02:00
Ethanfel 410c80afc8 feat: ProjectSource auto-fills active project from Manager
Added /api/active-project endpoint that reads current_project from
config. ProjectSource now hides the project_name widget and fetches
the active project automatically on create, load, and click.
Title shows "Source: <label> [<project>]" for at-a-glance status.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 12:07:37 +02:00
Ethanfel 2277e6e427 feat: highlight ProjectKey nodes sharing the same key_name on select
Clicking any ProjectKey node temporarily highlights all other nodes
in the workflow that share the same key_name with an amber color.
Deselecting restores their original colors.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 12:04:32 +02:00
Ethanfel 3065dd7e71 fix: use raw <img> tags to bypass q-img dialog rendering bug
NiceGUI's ui.image (Quasar q-img) fails to display inside ui.dialog
regardless of URL type — shows alt text instead of image. Switched
both thumbnail and dialog content to plain HTML <img> tags which
the browser renders directly without component interference.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 11:59:44 +02:00
Ethanfel 783da171e7 fix: serve images via FastAPI endpoint to fix dialog preview
NiceGUI's ui.image with a local file path fails to register static
files when inside a ui.dialog, showing alt text instead of the image.
Added /api/image-preview?path=... endpoint that streams the file via
FileResponse, and updated frame path thumbnails to use this URL.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 11:54:50 +02:00
Ethanfel 783f07e57a feat: make logic index read-only, driven solely by frame switches
Removed end_frame mirror. Logic index is now entirely computed
from the 3 frame switches (bit 0=start, bit 1=middle, bit 2=end).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 11:49:13 +02:00
Ethanfel c7ca3ae277 fix: replace broken hover tooltip with click-to-open dialog for image preview
Quasar tooltip size constraints prevent large images from rendering.
Thumbnail is now clickable (cursor:pointer) and opens a full-size dialog.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 11:48:14 +02:00
Ethanfel f376fd5622 feat: show frame image preview on hover via thumbnail tooltip
Replaces click-to-dialog with a small thumbnail that reveals
the full image on hover.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 11:41:00 +02:00
Ethanfel fec843f804 feat: move frame paths to left column with strength + logic index switch
Each frame path row (start/middle/end) now has:
- path input with preview
- strength float (default 1.0)
- switch linked to the corresponding logic index bit

Switches and logic index are bidirectionally synced.
end_frame → logic index → switches mirror chain preserved.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 11:38:30 +02:00
Ethanfel 2619d2c7e2 feat: move resolutions into collapsible expansion above VACE Settings
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 11:33:36 +02:00
Ethanfel 03dcb1c13a feat: add tooltip to Logic Index explaining binary flag mapping
Bit 0 = start frame, bit 1 = middle frame, bit 2 = end frame.
Tooltip shows the full 0-7 truth table on hover.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 00:41:03 +02:00
Ethanfel 9ffdf6287d fix: import folder scans project's folder_path not current_dir
Was scanning state.current_dir which could differ from the project's
actual folder, causing no JSON files to be found.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 00:26:17 +02:00
Ethanfel 735d905833 fix: move default DB path to project directory
projects.db now lives next to main.py instead of ~/.comfyui_json_manager/
so it survives Docker container updates when the project dir is mounted.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 00:24:59 +02:00
Ethanfel 932295ed27 fix: replace direction:rtl with text-align:right on path inputs
direction:rtl caused path characters to render in wrong order.
text-align:right right-aligns the text (shows end of path) without
breaking the character display order.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 00:21:55 +02:00
Ethanfel a5da8b26f4 feat: add 'logic index' field mirroring end_frame
Temporary field to ease node migration. Initializes to end_frame's
value and stays in sync whenever end_frame changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 00:14:25 +02:00
Ethanfel 5bc2838b21 feat: rename 'reference image path' to 'start frame path'
Updates DEFAULTS, standard_keys, UI label, timeline known_keys.
Migration auto-renames old key on load.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 00:11:43 +02:00
Ethanfel a7a4794adb feat: rename 'flf image path' to 'end frame path'
Updates DEFAULTS, standard_keys, UI label, timeline known_keys.
Migration auto-renames old key on load.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 00:10:09 +02:00
Ethanfel d33ce4da38 feat: rename 'reference path' to 'middle frame path'
Updates DEFAULTS, standard_keys, UI label, and timeline known_keys.
Adds _migrate_key_renames() called on load_json to auto-migrate
existing JSON files with the old key name.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 00:09:08 +02:00
Ethanfel 4fe9a9c958 feat: add BinaryIndexDecoder node (INT index → 3 BOOLEANs, binary encoding)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 00:05:15 +02:00
Ethanfel 820cb426aa test: add missing index 5 and 6 cases for BinaryIndexDecoder
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 00:04:15 +02:00
Ethanfel b75b177591 test: add failing tests for BinaryIndexDecoder node
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 00:02:43 +02:00
Ethanfel c8cc397cc6 docs: add BinaryIndexDecoder implementation plan
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 00:01:36 +02:00
Ethanfel f0e785afab docs: add BinaryIndexDecoder node design
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 00:00:56 +02:00
Ethanfel 20be3204b3 fix: await all commit() calls in sequence card event handlers
commit() is async but was called without await from sync handlers
(clone_next, clone_end, clone_sub, delete, copy_source, del_custom,
add_param, _sync_entry, _randomize) — causing saves and UI refreshes
to silently never run. Made all handlers async and added await.

Also fixed for i,entry loop shadowing the card's i parameter,
which was causing _render_vace_settings to receive the wrong index.
Removed unawaited render-time commit() in resolutions init block.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 12:59:25 +02:00
Ethanfel fe8f91b477 feat: show resolutions and custom fields in timeline preview
_render_preview_fields was only rendering hardcoded known keys.
Now adds a Resolutions section (W/H/Seed per slot) and a Custom Fields
catch-all for any other keys not in the standard set.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 12:46:57 +02:00
Ethanfel 55900e7c43 feat: 8 resolution slots with per-slot seed + node outputs seed
- Resolution entries expanded from 6 to 8 fixed slots
- Each slot now stores [w, h, seed] (migrates old [w, h] entries to [w, h, 0])
- UI adds seed number input + casino randomize button per row
- ProjectResolution node now outputs (width, height, seed) instead of (width, height)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 11:27:11 +02:00
Ethanfel 062f7880a6 fix: read sequence data directly from JSON file in API endpoints
_get_data and _get_keys were querying the SQLite DB which only gets
populated when db_enabled is on. JSON file is always the source of
truth, so read from it directly — fixes missing keys (e.g. resolutions)
when DB hasn't been synced.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 01:33:29 +02:00
Ethanfel cf8496ec08 fix: default key_name to 'resolutions' on new ProjectResolution node
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 01:24:58 +02:00
Ethanfel ca26da303c fix: persist resolutions on init and on every value change
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 01:22:08 +02:00
Ethanfel 29be286eb1 fix: move nodes to JSON Manager/project category
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 01:19:30 +02:00
Ethanfel f97f8a0616 feat: resolutions — 6 fixed slots, always visible
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 01:11:07 +02:00
Ethanfel 4b51d3c95d feat: simplify resolutions UI — fixed key, index-labeled rows, single add button
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 01:07:59 +02:00
Ethanfel 281c04dd2e feat: ProjectResolution JS extension for ComfyUI frontend
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 00:42:46 +02:00
Ethanfel 31406cb092 feat: resolution series editor in sequence card
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 00:42:46 +02:00
Ethanfel b31faa4274 feat: add ProjectResolution node
Implements ProjectResolution with TDD: fetches a [width, height] pair
from a resolution series by loop index, clamping out-of-bounds indices
to the last entry and returning (512, 512) defaults on error or missing key.
Also registers the node in mappings and updates TestNodeMappings count to 4.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 00:42:46 +02:00
Ethanfel 80aff2ba43 fix: update ProjectSource tests for file_name output
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 00:42:16 +02:00
Ethanfel c1c929722c Merge branch 'feat/snapshot-timeline' 2026-04-03 00:41:44 +02:00
Ethanfel d3becdc598 docs: fix 4 bugs in resolution series plan
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 00:21:32 +02:00
Ethanfel 4f31d792df docs: resolution series implementation plan
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 00:19:03 +02:00
Ethanfel 67c40c1ebe docs: resolution series design doc
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 00:15:08 +02:00
Ethanfel ba8ce45846 fix: make snapshot list fill available viewport height
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 18:23:56 +01:00
Ethanfel 74b57f71ac feat: add file_name output to ProjectSource node
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 18:16:31 +01:00
Ethanfel 1ec3abf17a feat: replace Git-DAG timeline with flat snapshot browser
Replace HistoryTree (DAG with branches, Graphviz rendering) with a flat
chronological SnapshotTimeline. New UI features: split-view layout,
snapshot compare/diff, cherry-pick restore of individual sequences or
fields, auto-snapshots with debounce, and pin/filter support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 18:14:22 +01:00
Ethanfel 686d4687c3 fix: cast sequence_number to int in fetch_key
Hidden widget sync passes sequence_number as string, causing format
code errors downstream. Cast to int before use.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 11:42:19 +01:00
Ethanfel a37dd82ae3 fix: parse file list API response format correctly
API returns {"files": [{"name": "...", "data_type": "..."}]}, not a
plain array. Extract file names from the nested structure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 11:26:39 +01:00
Ethanfel 3b11a4e974 feat: file_name combo on ProjectSource, sequence_number output
- file_name is now a combo dropdown populated from the API when
  manager_url and project_name are set
- ProjectSource outputs sequence_number (INT) for downstream use
- Refreshes file list when project_name or manager_url changes
- Updated tests for new output and error-default behavior

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 11:20:41 +01:00
Ethanfel 5eb82f8ff6 fix: preserve saved combo value across load-order race
When ProjectKey configures before ProjectSource, _getSourceLabels
returns empty. replaceWithCombo now always keeps the saved value in
the options list so it survives the race condition.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 22:24:17 +01:00
Ethanfel bf598ebf80 fix: make key_name selection sticky, never auto-reset
The key_name combo now only updates its dropdown options from the API
but never changes the user's selected value. Only the output value
refreshes on execution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 21:01:03 +01:00
Ethanfel 6e232da193 fix: remove _refreshKeys from onMouseDown to prevent key reset
The async _refreshKeys call on every mouse click caused a race condition
where clicking the key_name dropdown would trigger a re-fetch that
overwrote the user's selection. Keys are now only refreshed on source
label change and workflow load.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 21:00:19 +01:00
Ethanfel ff5802ab63 fix: don't crash on 404, add sync debug logging
ProjectKey.fetch_key now returns empty defaults instead of raising
RuntimeError on API errors. Added logging to _syncFromSource and
fetch_key to trace the seq=4001 vs seq=4 mismatch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 20:58:42 +01:00