diff --git a/.planning/ROADMAP.md b/.planning/ROADMAP.md index 2d7ae341..b460e925 100644 --- a/.planning/ROADMAP.md +++ b/.planning/ROADMAP.md @@ -116,7 +116,7 @@ Plans: Plans: - [x] 08-01: Error notifications with persistent toast and node overlays -#### Phase 9: Video History +#### Phase 9: Video History ✅ **Goal**: Add history carousel for generated videos matching image history pattern **Depends on**: Phase 8 @@ -124,7 +124,7 @@ Plans: **Plans**: 1 plan Plans: -- [ ] 09-01: Video history types, store support, load API, and carousel UI +- [x] 09-01: Video history types, store support, load API, and carousel UI #### Phase 10: Node Autosizing @@ -172,7 +172,7 @@ Phases execute in numeric order: 1 → 2 → 3 → 4 → 5 → 6 → 7 → 8 → | 6. Video & Polish | v1.0 | 4/4 | Complete | 2026-01-11 | | 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/1 | Planned | - | +| 9. Video History | v1.1 | 1/1 | Complete | 2026-01-12 | | 10. Node Autosizing | v1.1 | 0/? | Not started | - | | 11. UI Polish | v1.1 | 0/? | Not started | - | | 12. Model Improvements | v1.1 | 0/? | Not started | - | diff --git a/.planning/STATE.md b/.planning/STATE.md index 13f81712..2dec2a7b 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 8 - Error Display +**Current focus:** Phase 10 - Node Autosizing ## Current Position -Phase: 8 of 12 (Error Display) +Phase: 9 of 12 (Video History) Plan: 1 of 1 complete Status: Phase complete -Last activity: 2026-01-12 - Completed 08-01-PLAN.md +Last activity: 2026-01-12 - Completed 09-01-PLAN.md -Progress: ██░░░░░░░░ 25% +Progress: ███░░░░░░░ 33% ## Performance Metrics **Velocity:** -- Total plans completed: 17 -- Average duration: 7.2 min -- Total execution time: 2.03 hours +- Total plans completed: 18 +- Average duration: 7.4 min +- Total execution time: 2.23 hours **By Phase:** @@ -35,10 +35,11 @@ Progress: ██░░░░░░░░ 25% | 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 | +| 9. Video History | 1/1 | 12 min | 12 min | **Recent Trend:** -- Last 5 plans: 10 min, 28 min, 5 min, 4 min, 14 min -- Trend: UAT checkpoints add time but improve quality +- Last 5 plans: 28 min, 5 min, 4 min, 14 min, 12 min +- Trend: Consistent execution with established patterns ## Accumulated Context @@ -96,6 +97,6 @@ Recent decisions affecting current work: ## Session Continuity Last session: 2026-01-12 -Stopped at: Phase 8 Error Display completed +Stopped at: Phase 9 Video History completed Resume file: None -Next action: Plan Phase 9 (Video History) +Next action: Plan Phase 10 (Node Autosizing) diff --git a/.planning/phases/09-video-history/09-01-SUMMARY.md b/.planning/phases/09-video-history/09-01-SUMMARY.md new file mode 100644 index 00000000..bb490a93 --- /dev/null +++ b/.planning/phases/09-video-history/09-01-SUMMARY.md @@ -0,0 +1,122 @@ +--- +phase: 09-video-history +plan: 01 +subsystem: ui +tags: [react, zustand, carousel, video, history] + +# Dependency graph +requires: + - phase: 06-video-polish + provides: GenerateVideoNode, video generation execution + - phase: 08-error-display + provides: Error overlay pattern in generate nodes +provides: + - Video history carousel matching image history pattern + - Multi-format load-generation API (images + videos) + - CarouselVideoItem type for video history tracking +affects: [video-generation, node-autosizing] + +# Tech tracking +tech-stack: + added: [] + patterns: [video history carousel mirroring image pattern] + +key-files: + created: [] + modified: + - src/types/index.ts + - src/store/workflowStore.ts + - src/app/api/load-generation/route.ts + - src/components/nodes/GenerateVideoNode.tsx + - src/lib/quickstart/validation.ts + +key-decisions: + - "Use same carousel pattern as GenerateImageNode for consistency" + - "Store videoHistory as array of CarouselVideoItem with IDs for lazy loading" + - "Multi-format load-generation API searches all supported extensions" + - "Video files saved with timestamp ID like images for carousel support" + +patterns-established: + - "Video history carousel: same UI/UX as image carousel" + - "Content-type detection in load-generation API based on file extension" + +issues-created: [] + +# Metrics +duration: 12min +completed: 2026-01-12 +--- + +# Phase 9: Video History Summary + +**Video history carousel with prev/next navigation for GenerateVideoNode, matching the existing image history pattern** + +## Performance + +- **Duration:** 12 min +- **Started:** 2026-01-12T15:30:00Z +- **Completed:** 2026-01-12T15:42:00Z +- **Tasks:** 3 +- **Files modified:** 5 + +## Accomplishments +- Added CarouselVideoItem type and videoHistory fields to GenerateVideoNodeData +- Updated load-generation API to support multiple formats (png, jpg, jpeg, webp, gif, mp4, webm, mov) +- Added carousel controls to GenerateVideoNode matching GenerateImageNode pattern +- Videos now persist to generations folder with IDs for carousel navigation + +## Task Commits + +Each task was committed atomically: + +1. **Task 1: Add video history types and store support** - `bcc9108` (feat) +2. **Task 2: Update load-generation API for video formats** - `62964c3` (feat) +3. **Task 3: Add carousel controls to GenerateVideoNode** - `198319e` (feat) + +**Plan metadata:** (pending) + +## Files Created/Modified +- `src/types/index.ts` - Added CarouselVideoItem type and videoHistory fields to GenerateVideoNodeData +- `src/store/workflowStore.ts` - Added default values and history tracking in executeWorkflow/regenerateNode +- `src/app/api/load-generation/route.ts` - Multi-format support with extension search and content type detection +- `src/components/nodes/GenerateVideoNode.tsx` - Carousel UI, navigation handlers, loading state +- `src/lib/quickstart/validation.ts` - Added videoHistory fields to generateVideo case + +## Decisions Made +- Used same carousel UX pattern as GenerateImageNode for consistency +- Limit video history to 50 items (same as image history) +- Return appropriate response field (video vs image) based on actual file type +- Include contentType field in API response for explicit type indication + +## Deviations from Plan + +### Auto-fixed Issues + +**1. [Rule 3 - Blocking] Fixed validation.ts missing videoHistory fields** +- **Found during:** Task 3 (build verification) +- **Issue:** validation.ts had duplicate createDefaultNodeData that was missing new videoHistory fields +- **Fix:** Added videoHistory: [] and selectedVideoHistoryIndex: 0 to validation.ts +- **Files modified:** src/lib/quickstart/validation.ts +- **Verification:** npm run build passes +- **Committed in:** 198319e (Task 3 commit) + +### Deferred Enhancements + +None - all planned functionality implemented. + +--- + +**Total deviations:** 1 auto-fixed (blocking build error), 0 deferred +**Impact on plan:** Auto-fix necessary for TypeScript compilation. No scope creep. + +## Issues Encountered +None - plan executed as specified. + +## Next Phase Readiness +- Video history works identically to image history +- Ready for Phase 10 (Node Autosizing) +- Carousel UI may need adjustment when node autosizing is implemented + +--- +*Phase: 09-video-history* +*Completed: 2026-01-12*