Commit Graph

56 Commits

Author SHA1 Message Date
a1c6716ef6 Persist branching and timeline expanded toggles across reload
Store branchingEnabled and timelineExpanded in localStorage. Restore
on init with matching UI state (button class, expand arrow, bar class).
Also persist the forced collapse when branching is disabled.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 01:06:48 +01:00
320ab8647d Protect ancestors of locked snapshots during pruning
Pruning could delete unlocked intermediate nodes between locked
snapshots and the root, creating orphan branches. Now ancestors of
all locked snapshots are added to the protected set in both regular
and node capture paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 00:39:23 +01:00
fd14d4f1a6 Auto-select branch containing active snapshot on reload
When activeBranchSelections is empty (after reload or tab switch),
selectBranchContaining is called with the effective active ID so the
highlighted branch matches the active snapshot ring.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 00:23:58 +01:00
0c707b43f3 Add delete button to workflow picker to remove unwanted workflows
Shows × on hover for each workflow row. Confirms before deleting all
snapshots. Clears stale in-memory state for the deleted workflow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 00:18:28 +01:00
463e234cd1 Persist active ring and change detection across reload and tab switch
- Seed lastCapturedIdMap, lastCapturedHashMap, and lastGraphDataMap
  from most recent snapshot on startup so the active ring appears
  immediately after page reload
- Seed lastCapturedIdMap on workflow tab switch so the ring appears
  when switching to a tab with existing snapshots

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 00:11:27 +01:00
4bfc1912f2 Fix timeline losing active ring, add latest marker, cache repeated calls
- Active ring now falls back to lastCapturedIdMap when activeSnapshotId
  is null (cleared on auto-capture), so the ring persists
- Latest snapshot gets a yellow glow ring for quick identification
- Cache getWorkflowKey() in restore/swap/refresh/populatePicker
- Inline getEffectiveWorkflowKey() to avoid redundant getWorkflowKey()
- Replace double filter() with single loop for record counting

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 00:01:55 +01:00
74e1e35e6d Revert "Add Load button to workflow picker to open workflows in new tab"
This reverts commit ea69db87b1.
2026-02-26 14:27:26 +01:00
ea69db87b1 Add Load button to workflow picker to open workflows in new tab
Fetches the latest snapshot and loads it as a named temporary workflow
tab, keeping the current workflow untouched.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 14:19:19 +01:00
b933c34c73 Remove workflow sidebar toggle from picker
ComfyUI only supports one sidebar at a time, so opening the
workflows panel just replaces the snapshot manager. Revert to
simple view-only behavior for cross-workflow snapshot browsing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 14:08:18 +01:00
f0e407616e Open workflows sidebar when selecting a different workflow in picker
Instead of trying to programmatically switch the active workflow,
open the ComfyUI workflows sidebar panel so the user can switch
from there. The snapshot picker still shows the selected workflow's
snapshots in view-only mode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 14:02:13 +01:00
ebbdfa4249 Fix workflow picker not switching active workflow
The store's openWorkflow only updates Pinia state without switching
the canvas. Use app.loadGraphData with the workflow object instead,
matching ComfyUI's internal workflow service pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 13:53:58 +01:00
24fe846646 Skip shared ancestors in expanded timeline, switch workflow on picker click
Expanded timeline: non-active branch rows now only show their unique
markers after the fork point, indented to align with the active branch.
Removes the dimmed-ancestor approach in favor of cleaner layout.

Workflow picker: clicking a workflow that is open in ComfyUI now
switches to that tab instead of just viewing its snapshots.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 13:39:14 +01:00
eddf3c6acc Fix inverted expand/collapse arrows on timeline
The timeline grows upward, so show ▴ when collapsed and ▾ when expanded.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 13:05:20 +01:00
0b0b9d4c39 Add expanded timeline mode to show all branches at once
Adds a toggle button (▾/▴) to the timeline bar that expands it
vertically, displaying every branch as its own row. The active
branch is highlighted, shared ancestors are dimmed on other rows,
and clicking any marker on a non-active row switches to that branch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 12:57:18 +01:00
fa76fbf97a Push arrow glyphs to edges of timeline bar
Top arrow aligns content to flex-start (top edge), bottom arrow to
flex-end (bottom edge), so both arrow tips sit at their respective
edges instead of centering in the available space.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 12:32:22 +01:00
f93441b187 Color timeline branch arrows to match their marker
Arrows inherit the marker's --snap-marker-color so they match the
node color (blue for regular, purple for node snapshots, green for
current, etc).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 12:31:30 +01:00
e1a48a2456 Make top arrow reach top edge of timeline bar
Fork group fills full timeline height with space-between layout.
Arrow buttons flex to fill remaining space so both arrow tips reach
their respective edges of the timeline bar.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 12:26:51 +01:00
54387c2df4 Fix top arrow position with negative margin
Use margin-bottom:-3px on the top arrow to compensate for the Unicode
glyph's built-in whitespace and pull it tight against the marker.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 12:25:29 +01:00
e4d1c496f2 Fix top arrow to mirror bottom arrow style
Restore 8px size for both arrows. Top arrow uses align-items:flex-end
to push glyph down against marker, bottom arrow uses flex-start to
push glyph up against marker, making them symmetrical.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 12:21:43 +01:00
f3fab45bf0 Fix timeline top arrow not mirroring bottom arrow position
Reduce arrow button font-size and height from 8px to 6px and set
line-height to 0 so both arrows sit symmetrically tight against the
marker.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 12:20:40 +01:00
d7bd9c4991 Add toggle to disable snapshot branching
New "Branch" button next to "Hide Auto" in the search row. When
toggled off: captures have no parentId, sidebar/timeline show a flat
timestamp-sorted list, branch navigators are hidden, and pruning
skips tree-aware protection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 12:18:06 +01:00
284f4e9538 Simplify timeline fork display: remove badge, tighten arrows
Remove the fork count badge from timeline markers and the wrapper div.
Reduce arrow button height and remove extra spacing so the up arrow
sits flush against the marker.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 12:12:41 +01:00
d0057db397 Rework timeline fork display to vertical arrows with badge
Replace horizontal arrow layout with vertical stack: up/down arrows
above and below the marker, with a small blue badge showing the fork
count on the marker node.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 12:07:14 +01:00
d142df5332 Bump version to 3.0.0 and update documentation
Some checks failed
Publish to ComfyUI Registry / Publish Custom Node to Registry (push) Has been cancelled
Add documentation for snapshot branching, session profiles,
hide auto-saves toggle, and timeline branch navigation.
Update features list, usage sections, architecture, and FAQ.
Align pyproject.toml and README badge to 3.0.0.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 11:59:58 +01:00
3809af2662 Add hide auto-save toggle to sidebar filter
Toggle button next to the search bar hides Auto and Initial
snapshots to reduce clutter. Filter combines with text search
and persists across refreshes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 11:53:18 +01:00
bca7e7cf8f Add snapshot branching and profile/session manager
Branching: snapshots now track parentId to form a tree structure.
Swapping to an old snapshot and editing forks into a new branch.
Sidebar and timeline show < 1/3 > navigators at fork points to
switch between branches. Pruning protects ancestors and fork points.
Deleting a fork point re-parents its children.

Profiles: save/load named sets of workflows as session profiles.
Backend stores profiles as JSON in data/profiles/. Sidebar has a
collapsible Profiles section with save, load, and delete.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 11:51:00 +01:00
7518821447 Add in-memory metadata cache to avoid redundant disk I/O
List, prune, and delete operations now use a lightweight in-memory cache
of snapshot metadata (everything except graphData). Only get_full_record()
and update_meta() hit disk after warm-up, keeping sidebar loads and
auto-capture prune cycles fast.

Key changes:
- snapshot_storage.py: cache layer (_cache, _cache_warmed, _extract_meta,
  _ensure_cached), new get_full_record() and update_meta() functions,
  all existing functions updated to use cache
- snapshot_routes.py: new /get and /update-meta endpoints
- snapshot_manager.js: db_getFullRecord() and db_updateMeta() helpers,
  lazy graphData fetch in restore/swap/diff/preview/tooltip, label/notes/
  lock use update_meta instead of full put to preserve graphData on disk

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 10:57:41 +01:00
ab3bbc7f71 Refresh timeline after clearing or deleting snapshots
The sidebar refresh didn't trigger a timeline update, leaving stale
markers visible until the next auto-capture or manual action.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 22:31:03 +01:00
0b7fb5be0e Highlight active and current snapshots in sidebar
Add white left border for the swapped-to snapshot and green left border
for the auto-saved "you were here" snapshot, matching timeline markers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 22:28:06 +01:00
e5d9e6ca99 Replace emoji buttons with inline SVG icons
Swap note (pencil), lock/unlock (padlock), and preview (eye) buttons
from emoji characters to crisp inline SVGs using currentColor. Fixes
inconsistent emoji rendering across platforms and enables proper color
transitions (e.g. amber highlight for has-note state via CSS color
instead of filter hacks).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 09:39:54 +01:00
31b846cd5f Add SVG snapshot previews and bump to v2.5.0
Render workflow graphs as SVG previews so users can visually inspect
snapshots without restoring them. Adds hover tooltips, a full-size
preview modal (eye button), and side-by-side SVG comparison with
color-coded highlights in the diff view.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 09:38:02 +01:00
4b392a89cf Add snapshot diff view and bump to v2.4.0
Some checks failed
Publish to ComfyUI Registry / Publish Custom Node to Registry (push) Has been cancelled
Compare any snapshot vs the current workflow (one click) or two snapshots
against each other (Shift+click to set base). Modal shows added/removed/modified
nodes, widget value changes, property diffs, and rewired connections with
collapsible sections and colored indicators.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 08:14:29 +01:00
f9a821f8b4 Bump version to 2.3.0
Some checks failed
Publish to ComfyUI Registry / Publish Custom Node to Registry (push) Has been cancelled
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 00:58:21 +01:00
efc3791a57 Update README for centered timeline bar and smarter swap auto-save
Document the floating centered layout, sidebar layering behavior,
and the skip-when-browsing optimization for swap auto-saves.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 00:53:35 +01:00
dc2e408026 Lower timeline z-index below sidebar so panel covers it when open
Sidebar uses z-index 10; set timeline to 9 so it stays visible on the
canvas but sits underneath the sidebar panel when expanded.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 00:52:37 +01:00
73cde5ade1 Skip redundant auto-save when browsing between snapshots
When activeSnapshotId is set, the current graph state is already a
saved snapshot. Swapping to another one no longer creates a duplicate
"Current" entry — the auto-save only fires on the first swap away
from an unsaved graph state.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 00:46:38 +01:00
e554dc9973 Center timeline bar at 80% width with rounded corners
Replace full-width bar with centered floating pill that clears both the
left sidebar and right controls. Uses left/right: 10% with border-radius
and a small bottom offset. Icons remain left-aligned inside the track.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 00:35:32 +01:00
95cbcd4f6c Offset timeline padding to avoid floating sidebar overlap
Detect whether the sidebar icon strip is in floating mode and on which
side, then add matching padding so timeline markers aren't hidden
behind it. Connected mode (sidebar pushes canvas) needs no offset.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 00:27:38 +01:00
0219d86301 Revert canvas parent z-index to avoid masking sidebar
Keep only the timeline z-index: 1000 bump. Setting z-index on the
canvas parent would create a stacking context that paints over the
sidebar panel, blocking interaction.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 00:25:04 +01:00
862045ecf1 Fix timeline bar hidden behind sidebar by raising z-index
ComfyUI's sidebar container uses z-index: 10. The timeline was at the
same level and lost in the stacking order. Bump timeline to z-index
1000 and set z-index 20 on the canvas parent so it forms a stacking
context above the sidebar.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 00:24:32 +01:00
0b8304f458 Optimize detectChangeType to avoid unnecessary JSON.stringify
Use node count shortcut, element-wise widget comparison, link length
and boundary checks, and skip-when-flagged guards to eliminate most
serialization work in the common case.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 00:13:09 +01:00
8a8a01adff Add Fusion 360-style change-type icons to timeline markers
Each snapshot now detects what kind of change it represents (node add,
node remove, connection, parameter, move, mixed) and displays a distinct
colored icon on the timeline. Sidebar meta line shows the change type.
Existing snapshots without change data gracefully fall back to a faded
"unknown" dot.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 00:10:36 +01:00
51cb2f6855 Update README for v2.2.0 — document timeline, auto-save, Ctrl+S shortcut
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 23:41:23 +01:00
ee4051ad72 Add timeline active marker, auto-save before swap, snapshot button & Ctrl+S
- Track active (white ring) and current (green dot) snapshots on timeline
- Auto-capture "Current" state before swapping so user can navigate back
- Add "Snapshot" button to timeline bar for quick manual captures
- Register Ctrl+S / Cmd+S shortcut for manual snapshots
- Clear active/current markers on new captures and workflow switches
- Return record.id from captureSnapshot (backward-compatible truthy value)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 23:40:03 +01:00
25b909f99f Update README and architecture diagram for v2.1.0
Add SaveSnapshot node to features list and architecture diagram,
update storage label from IndexedDB to Server Storage, add
maxNodeSnapshots setting to the table, and document the
node-triggered capture flow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 22:10:48 +01:00
11c6b7237b Bump version to 2.1.0
Some checks failed
Publish to ComfyUI Registry / Publish Custom Node to Registry (push) Has been cancelled
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 21:24:00 +01:00
3877c5838c Add SaveSnapshot node with visual separation and rolling limit
Introduce a SaveSnapshot custom node that triggers snapshot captures
via WebSocket. Node-triggered snapshots are visually distinct in the
sidebar (purple left border + "Node" badge) and managed with their
own independent rolling limit (maxNodeSnapshots setting), separate
from auto/manual snapshot pruning. Node snapshots skip hash-dedup
so repeated queue runs always capture.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 21:22:53 +01:00
838b3d0b00 Fix swapSnapshot using stale app.workflowManager reference
Missed one occurrence of the old API in swapSnapshot() — the workflow
passed to loadGraphData was always undefined, making Swap behave
like Restore (new tab instead of in-place replacement).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 20:57:29 +01:00
4cbd8fd0a9 Fix workflow key detection — use extensionManager.workflow store
app.workflowManager doesn't exist in the modern Vue-based frontend.
The active workflow is accessed via the Pinia store at
app.extensionManager.workflow.activeWorkflow. Also replaces the
non-existent addEventListener("changeWorkflow") with Pinia's
$onAction watching for "openWorkflow" actions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 20:55:22 +01:00
d32349bfdf Migrate snapshot storage from IndexedDB to server-side JSON files (v2.0.0)
Some checks failed
Publish to ComfyUI Registry / Publish Custom Node to Registry (push) Has been cancelled
Snapshots are now stored as individual JSON files on the server under
data/snapshots/, making them persistent across browsers and resilient
to browser data loss. Existing IndexedDB data is auto-migrated on
first load.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 20:13:23 +01:00