diff --git a/.planning/ISSUES.md b/.planning/ISSUES.md index 63180b41..f681893a 100644 --- a/.planning/ISSUES.md +++ b/.planning/ISSUES.md @@ -4,7 +4,26 @@ Deferred enhancements and improvements discovered during development. ## Open Issues -(None currently) +### ISS-002: Multi-image inputs not mapped correctly for fal.ai models + +**Discovered:** 2026-01-12 during Phase 8 UAT +**Severity:** Medium (affects specific models with multiple image inputs) +**Context:** fal.ai Kling 2.6 image-to-video model accepts both `image_url` (first frame) and `tail_image_url` (last frame), but the API route only maps the first connected image to `image_url` and ignores additional images. + +**Evidence from logs:** +``` +Images count: 2 +Added image as 'image_url' (data:image/png;base64,...) +Request body keys: [ 'prompt', 'image_url' ] +``` +Second image was received but not included in request body. + +**Root cause:** `/api/generate/route.ts` fal.ai handling only maps `images[0]` to `image_url`. No logic to map additional images to their correct schema parameters (e.g., `tail_image_url`). + +**Suggested fix:** +1. Fetch model schema to identify all image input parameters +2. Map connected images to schema parameters in order (or by handle name if available) +3. Consider adding named image handles to GenerateVideoNode for explicit mapping ## Resolved Issues @@ -15,4 +34,4 @@ Deferred enhancements and improvements discovered during development. **Resolution:** Added /api/models/[modelId] endpoint to fetch model parameter schemas from Replicate and fal.ai. Created ModelParameters component that renders dynamic inputs based on schema. Parameters flow through to providers during generation. --- -*Last updated: 2026-01-10* +*Last updated: 2026-01-12* diff --git a/.planning/ROADMAP.md b/.planning/ROADMAP.md index 6406cf4e..557b4973 100644 --- a/.planning/ROADMAP.md +++ b/.planning/ROADMAP.md @@ -96,25 +96,25 @@ Plans: **Milestone Goal:** Fix connection issues, improve error visibility, add video history, auto-size nodes, and polish UI -#### Phase 7: Video Connections +#### Phase 7: Video Connections ✅ **Goal**: Fix video handle connections to only allow valid targets (generateVideo, output) **Depends on**: Phase 6 **Research**: Unlikely (internal connection validation patterns) -**Plans**: TBD +**Plans**: 1 plan Plans: -- [ ] 07-01: TBD (run /gsd:plan-phase 7 to break down) +- [x] 07-01: Add video handle type and connection validation -#### Phase 8: Error Display +#### Phase 8: Error Display ✅ **Goal**: Better error visibility with overlay display, not hidden by previous output **Depends on**: Phase 7 **Research**: Unlikely (internal UI patterns) -**Plans**: TBD +**Plans**: 1 plan Plans: -- [ ] 08-01: TBD (run /gsd:plan-phase 8 to break down) +- [x] 08-01: Error notifications with persistent toast and node overlays #### Phase 9: Video History @@ -170,8 +170,8 @@ Phases execute in numeric order: 1 → 2 → 3 → 4 → 5 → 6 → 7 → 8 → | 4. Model Search Dialog | v1.0 | 2/2 | Complete | 2026-01-09 | | 5. Image URL Server | v1.0 | 2/2 | Complete | 2026-01-09 | | 6. Video & Polish | v1.0 | 4/4 | Complete | 2026-01-11 | -| 7. Video Connections | v1.1 | 0/? | Not started | - | -| 8. Error Display | v1.1 | 0/? | Not started | - | +| 7. Video Connections | v1.1 | 1/1 | Complete | 2026-01-12 | +| 8. Error Display | v1.1 | 1/1 | Complete | 2026-01-12 | | 9. Video History | v1.1 | 0/? | Not started | - | | 10. Node Autosizing | v1.1 | 0/? | Not started | - | | 11. UI Polish | v1.1 | 0/? | Not started | - | diff --git a/.planning/STATE.md b/.planning/STATE.md index 265f9e6a..13f81712 100644 --- a/.planning/STATE.md +++ b/.planning/STATE.md @@ -5,23 +5,23 @@ See: .planning/PROJECT.md (updated 2026-01-09) **Core value:** Provider infrastructure that dynamically discovers models from external APIs, enabling users to access hundreds of image/video generation models without hardcoding schemas. -**Current focus:** Phase 7 - Video Connections +**Current focus:** Phase 8 - Error Display ## Current Position -Phase: 7 of 12 (Video Connections) -Plan: Not started -Status: Ready to plan -Last activity: 2026-01-12 - Milestone v1.1 Improvements created +Phase: 8 of 12 (Error Display) +Plan: 1 of 1 complete +Status: Phase complete +Last activity: 2026-01-12 - Completed 08-01-PLAN.md -Progress: ░░░░░░░░░░ 0% +Progress: ██░░░░░░░░ 25% ## Performance Metrics **Velocity:** -- Total plans completed: 15 -- Average duration: 6.9 min -- Total execution time: 1.73 hours +- Total plans completed: 17 +- Average duration: 7.2 min +- Total execution time: 2.03 hours **By Phase:** @@ -33,10 +33,12 @@ Progress: ░░░░░░░░░░ 0% | 4. Model Search Dialog | 2/2 | 17 min | 8.5 min | | 5. Image URL Server | 2/2 | 5 min | 2.5 min | | 6. Video & Polish | 4/4 | 43 min | 14.3 min | +| 7. Video Connections | 1/1 | 4 min | 4 min | +| 8. Error Display | 1/1 | 14 min | 14 min | **Recent Trend:** -- Last 5 plans: 3 min, 2 min, 10 min, 28 min, 5 min -- Trend: returned to normal after human verification checkpoint +- Last 5 plans: 10 min, 28 min, 5 min, 4 min, 14 min +- Trend: UAT checkpoints add time but improve quality ## Accumulated Context @@ -94,6 +96,6 @@ Recent decisions affecting current work: ## Session Continuity Last session: 2026-01-12 -Stopped at: Milestone v1.1 Improvements initialization +Stopped at: Phase 8 Error Display completed Resume file: None -Next action: Plan Phase 7 (Video Connections) +Next action: Plan Phase 9 (Video History) diff --git a/.planning/phases/08-error-display/08-01-SUMMARY.md b/.planning/phases/08-error-display/08-01-SUMMARY.md new file mode 100644 index 00000000..6ba64344 --- /dev/null +++ b/.planning/phases/08-error-display/08-01-SUMMARY.md @@ -0,0 +1,126 @@ +--- +phase: 08-error-display +plan: 01 +subsystem: ui +tags: [toast, error-handling, overlay, notifications] + +# Dependency graph +requires: + - phase: 07-video-connections + provides: Video node with connection validation +provides: + - Persistent toast notifications with expandable details + - Error overlay on generate nodes showing failure state + - Top-right positioned toast (moved from bottom-center) +affects: [error-handling, user-feedback, debugging] + +# Tech tracking +tech-stack: + added: [] + patterns: + - "Persistent toast with manual dismiss for errors" + - "Expandable details in toast notifications" + - "Semi-transparent overlay for error states" + +key-files: + created: [] + modified: + - src/components/Toast.tsx + - src/components/nodes/GenerateImageNode.tsx + - src/components/nodes/GenerateVideoNode.tsx + +key-decisions: + - "Toast position moved to top-right for better visibility" + - "Error overlay at 40% opacity to show previous output" + - "White text on red overlay for contrast" + +patterns-established: + - "Error states trigger persistent toast with full error in details" + - "Overlay pattern for error indication on nodes" + +issues-created: [ISS-002] + +# Metrics +duration: 14 min +completed: 2026-01-12 +--- + +# Phase 8 Plan 01: Error Display Summary + +**Persistent top-right toast notifications with expandable error details, plus semi-transparent red overlays on failed generate nodes** + +## Performance + +- **Duration:** 14 min +- **Started:** 2026-01-11T23:40:10Z +- **Completed:** 2026-01-11T23:54:13Z +- **Tasks:** 4 +- **Files modified:** 3 + +## Accomplishments + +- Toast component enhanced: moved to top-right, added persistent mode, added expandable details +- Error overlay added to GenerateImageNode showing failure state over previous output +- Error overlay added to GenerateVideoNode with same pattern +- Users can now see errors even when previous generation output exists + +## Task Commits + +Each task was committed atomically: + +1. **Task 1: Update Toast component** - `6625449` (feat) +2. **Task 2: GenerateImageNode error overlay** - `77fdea5` (feat) +3. **Task 3: GenerateVideoNode error overlay** - `7356fd0` (feat) +4. **UAT fix: Reduce overlay opacity** - `ee6214d` (fix) +5. **UAT fix: White text for contrast** - `dbc0727` (fix) + +## Files Created/Modified + +- `src/components/Toast.tsx` - Added persistent mode, details expansion, top-right positioning +- `src/components/nodes/GenerateImageNode.tsx` - Added error overlay, toast trigger on error +- `src/components/nodes/GenerateVideoNode.tsx` - Added error overlay, toast trigger on error + +## Decisions Made + +- Moved toast from bottom-center to top-right for better visibility +- Error overlay uses 40% opacity (reduced from 70% during UAT) +- White text on red overlay for better contrast (changed during UAT) +- Toast requires manual dismiss for errors (persistent mode) + +## Deviations from Plan + +### UAT Adjustments + +**1. Reduced overlay opacity** +- **Found during:** UAT verification +- **Issue:** 70% opacity too dark, obscured previous output +- **Fix:** Reduced to 40% opacity +- **Committed in:** ee6214d + +**2. Changed text color for contrast** +- **Found during:** UAT verification +- **Issue:** Red text on red overlay hard to read +- **Fix:** Changed to white text +- **Committed in:** dbc0727 + +--- + +**Total deviations:** 2 UAT fixes (visual adjustments) +**Impact on plan:** Minor visual refinements based on user feedback + +## Issues Encountered + +None - all tasks completed as planned with minor visual adjustments during UAT. + +## Issues Logged + +- **ISS-002:** Multi-image inputs not mapped correctly for fal.ai models (discovered during UAT, unrelated to this phase) + +## Next Phase Readiness + +- Error display complete, ready for Phase 9 (Video History) +- No blockers + +--- +*Phase: 08-error-display* +*Completed: 2026-01-12*