- Fix 3D viewport not filling node by adding resize={{ offsetSize: true }} for correct measurement in CSS-transformed React Flow nodes
- Replace grid/axis indicators with spot light for cleaner scene
- Add labeled input (3D) and output (Image) handles matching generate node style
- Add native wheel event listener to prevent graph zoom/pan while scrolling to zoom 3D model
- Remove redundant CSS workarounds (absolute positioning style, extra relative wrapper)
- Add edge-to-edge viewport via contentClassName (removes default padding when GLB loaded)
- Overlay controls bar on viewport with gradient background
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fixes duplicate image files in generations folder when Gemini returns JPEG.
Changes:
- POST handler now extracts MIME type from data URL and uses correct extension
- GET handler searches multiple extensions (png, jpg, jpeg, gif, webp)
- GET handler returns correct MIME type in data URL based on file extension
Root cause: workflow-images/route.ts hardcoded .png extension regardless of
actual image format, while save-generation/route.ts correctly preserved formats.
This caused Gemini's JPEG images to be saved twice (once as .jpg, once as .png).
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Move @types/three to devDependencies, fix blob URL cleanup to track
changes (not just unmount), add try/catch to capture and scene disposal,
remove GLBViewerNode from barrel export to preserve lazy-loading, fix
JSDoc, update CLAUDE.md with glbViewer node and ? shortcut, add
connectedInputs and nodeDefaults tests for glbViewer.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove unused `useLoader` import from GLBViewerNode
- Add useEffect cleanup to revoke blob URL on node unmount (memory leak)
- Replace alert() with useToast for file validation errors
- Lazy-load GLBViewerNode via next/dynamic to avoid bundling three.js for all users
- Add glbViewer to ConnectionDropMenu IMAGE_SOURCE_OPTIONS
- Add glbViewer case to quickstart validation createDefaultNodeData (build fix)
- Restore trailing newline in gemini.ts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When a Prompt node receives text from an LLM Generate node, the text
should be editable by the user. Previously, the textarea was marked as
readOnly when there was an incoming text connection, preventing edits
in both the main view and the expanded modal.
Changes:
- Track last received LLM output to detect when it changes
- Only update prompt when LLM node runs again (output changes)
- Allow user edits in between LLM runs
- Remove readOnly restriction on textarea
- Update placeholder text to indicate editability
This allows users to edit the LLM-generated text, which will be
replaced only when the LLM node runs again, not on every render.
Fixes#1470061054246518927
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- New KeyboardShortcutsDialog component showing all available shortcuts
- Accessible via ? button in header and ? key on canvas
- Groups shortcuts by category: General, Add Nodes, Layout, Canvas
- Auto-detects Mac vs Windows/Linux for modifier key display
- Follows existing modal patterns (Escape to close, backdrop click)
Replace identical inline context creation in executeWorkflow and regenerateNode
with a single shared helper, ensuring consistent behavior across both code paths.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- fal.ts: Use model capabilities to determine fallback content-type
(video/mp4 vs image/png) instead of defaulting to video for all models
- replicate.ts: Increase polling timeout to 10 min for video models;
filter output array to valid strings before URL validation
- nanoBananaExecutor.ts: Replace read-modify-write on outputGallery with
atomic appendOutputGalleryImage using Zustand set() callback
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Providers:
- replicate: add SSRF validation on mediaUrl before fetch
- fal/kie/replicate/wavespeed: large-video returns data="" with url set
instead of putting raw URL in data field (violates GenerationOutput.data semantic)
- kie: remove stale WaveSpeed JSDoc block from kie provider file
- route.ts: update all output handling to support data="" + url for large videos
Executors:
- generateVideoExecutor/nanoBananaExecutor: track save-generation fetch in
pendingImageSyncs via new trackSaveGeneration context method so auto-save
waits for server ID resolution
- videoProcessingExecutors: throw errors instead of returning in validation
branches (encoderSupported, insufficient videos, no video connected) so
Promise.allSettled sees rejections
- types.ts: add trackSaveGeneration to NodeExecutionContext interface
- workflowStore: wire trackSaveGeneration into both execution context sites
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix video element not reloading on regeneration by adding key prop tied
to video history ID. Fix cancel showing timeout message by passing
"user-cancelled" reason through AbortController and checking it in all
three executor catch blocks.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove dead trackSaveGeneration function (no longer called after executor
extraction) and unused type imports. Store: 3,838 -> 1,721 lines (55% reduction).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wire extracted executors into workflowStore, replacing the ~1000-line
switch statement in executeWorkflow and ~750-line if-else chain in
regenerateNode with executor registry calls. Store reduced from 3,402
to 1,782 lines.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move getConnectedInputs (136 lines) and validateWorkflow (59 lines) into
connectedInputs.ts as pure functions taking (nodeId, nodes, edges).
Store methods become thin wrappers. Add 22 new tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move groupNodesByLevel, chunk, revokeBlobUrl, clearNodeImageRefs,
and concurrency settings into executionUtils.ts with 21 new tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace 6 duplicated header-building if/else chains (across executeWorkflow
and regenerateNode) with buildGenerateHeaders() and buildLlmHeaders() utility
functions. Add 13 new tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move generateWithFalQueue, generateWithKie, generateWithWaveSpeed and all
their helpers into providers/fal.ts, providers/kie.ts, providers/wavespeed.ts.
Add barrel export at providers/index.ts.
route.ts reduced from 2,838 to 518 lines (POST handler + routing only).
Re-export clearFalInputMappingCache from route.ts for test backward compat.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move generateWithReplicate() into providers/replicate.ts.
It imports schema utilities from schemaUtils.ts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move MODEL_MAP and generateWithGemini() into providers/gemini.ts.
Remove unused imports (GoogleGenAI, uploadImageForUrl, shouldUseImageUrl,
deleteImages, ProviderModel) from route.ts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract INPUT_PATTERNS, InputMapping, ParameterTypeInfo, getParameterTypesFromSchema,
coerceParameterTypes, and getInputMappingFromSchema into schemaUtils.ts with 23 new tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The loopCount (1x/2x/3x) feature was only applied in executeWorkflow()
but not in regenerateNode(), which is the code path triggered by
clicking the "Stitch" button. This adds the blob duplication logic to
both code paths and includes the UI controls and type definitions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Validate uploadUrl and fileUrl from fal CDN initiate response through
validateMediaUrl() and HTTPS check before performing the PUT request.
Throws if either URL is missing or fails validation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Validate fal-provided status_url and response_url against validateMediaUrl()
and domain allowlist (queue.fal.run) before using them for polling. Falls back
to constructed URLs on validation failure.
Also updates mockFalCdnUpload test helper to match the two-step CDN upload
flow (initiate + PUT) introduced in 3fea13e.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
WaveSpeed's CloudFront CDN returns `binary/octet-stream` which wasn't
caught by the old `!== "application/octet-stream"` check, producing
unplayable data URLs. Now only accepts content types starting with
`video/` or `image/`, falling back to `video/mp4` or `image/png`.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The old single-POST endpoint (fal.ai/api/storage/upload) returns 404.
Switched to the current fal.ai upload API: initiate via
rest.alpha.fal.ai/storage/upload/initiate, then PUT binary data to
the returned signed URL.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Delete unused generateWithFal function (replaced by generateWithFalQueue)
- Add 20MB size guard in uploadImageToFal to prevent memory spikes
- Add refresh button to ModelSearchDialog that clears model and schema
localStorage caches plus in-memory fetch cache
- Wire "Try Again" error button to also clear stale caches
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace blocking fal.run endpoint with async queue.fal.run + 1s polling
to match Replicate/WaveSpeed behavior. Upload base64 images to fal CDN
before queue submission to avoid large inline payloads. Cache schema
mappings in-memory (30min TTL) to eliminate redundant API calls per
generation. Also fix localStorage cache leaking between tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Derive provider capabilities from mediaType instead of hardcoding
text-to-image, so isVideoModel is correct for video generations.
Treat application/octet-stream as unhelpful content-type and fall back
to video/mp4 or image/png based on model type. Add safety net in
save-generation to override .bin extension when media type is known.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds 48-hour client-side caching to persist model data across dev server
restarts and page refreshes, eliminating repeated API calls during hot
reloading in development mode.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add Veo 3 and Veo 3 Fast models (text-to-video + image-to-video) with
custom API integration using Kie's /api/v1/veo/ endpoints and numeric
successFlag polling. Also document Kie model integration SOP in CLAUDE.md.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Stabilize thumbnail extraction deps with a string key derived from clip
edge IDs, preventing excessive re-runs on unrelated node changes
- Use ref-based cache for thumbnails and add cleanup abort for pending
extractions
- Fix clipOrder sync triggering extra render by tracking last written order
- Add WaveSpeed case to ProviderBadge in GenerateImageNode and
GenerateVideoNode
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>