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>
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>
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>
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>
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>
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>
_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>
_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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
ProjectKey onMouseDown now triggers _syncFromSource + _refreshKeys so
clicking a relay always picks up source config changes. Added console
logs to notifyRelays and _refreshKeys for diagnosing sync issues.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reverses the previous merge migration. Lora data is now stored as
separate keys: 'lora 1 high' (STRING name) and 'lora 1 high strength'
(FLOAT). This allows ProjectKey relay nodes to output name and strength
as properly typed separate values.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When ProjectSource widgets (url, project, file, sequence_number)
change, all ProjectKey nodes referencing that source now re-sync
and refresh their key dropdown immediately.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Combo widgets show "undefined" when values list is empty. Now ensures
at least one entry (empty string placeholder) and picks a valid default.
Also populates source labels immediately on node creation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- INT widgets (sequence_number) now properly hidden using origType +
hidden flag pattern from fast_saver.js
- source_label and key_name are now replaced with real combo widgets
via addWidget("combo") instead of just setting type="combo" on
STRING widgets, which didn't produce working dropdowns
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ProjectKey fetches live API data, so it must re-execute on every queue.
Added comment explaining why source_label exists but is unused in Python.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The history_tree_backup (created by _delete_nodes) was storing full
snapshot data in every backed-up node — 185MB+ per backup entry.
This caused the JSON file to re-bloat to 300MB on every save.
Now:
- _delete_nodes backs up tree metadata only (no snapshot data)
- Load paths strip snapshot data from existing backup entries
- Prevents both disk and RAM bloat from backup accumulation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>