summaryrefslogtreecommitdiff
path: root/internal/cli/prompts_test.go
AgeCommit message (Collapse)Author
2026-04-08refactor: slim cmd composition root, move story video flow to internal/videoPaul Buetow
- Add newProcessor() and newProcessorConfig in processor_config.go; newStoryRunner and storyUltraRealistic in story.go; main.go focuses on runCommand wiring. - Move gallery prompts, GenerateSelectedVideos, and RunStoryVideos into internal/video; cli.GenerateSelectedVideos delegates for GUI compatibility. - Remove t.Parallel from Veo tests that patch newGenaiClient (race with globals). Made-with: Cursor
2026-04-06test: add missing unit tests for Veo video feature (task 016)Paul Buetow
- internal/video/veo_test.go: add pageNumFromPath table test, loadGalleryImage multiple-matches edge case, saveMP4 fallback name, and NewVeoGenerator success path with mock client injection - internal/cli/prompts_test.go: add parseSelection edge cases — zero max with "all", page number exceeding max, and whitespace-only input - internal/cli/video_runner_test.go: new file covering GenerateSelectedVideos for empty/nil paths (early return) and empty/whitespace API key (error path) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06fix: correct video integration after comic generationPaul Buetow
PromptForGalleryVideos now returns []string paths (from recursive walk) instead of []int page numbers, so GenerateSelectedVideos always has the exact path to each gallery PNG regardless of which comics/<slug>/ subdirectory it lives in. Previously, GenerateSelectedVideos passed "." as galleryPath and called loadGalleryImage with a non-recursive filepath.Glob that could not find PNGs in subdirectories, causing video generation to always fail with "no gallery image found". Additional changes: - Add VeoGenerator.GenerateVideoFromPath that accepts a full image path and writes the MP4 next to the source PNG - Make runStoryVideos non-fatal: video errors print a warning and return nil so comic/PDF/narration outputs are never invalidated by Veo errors - Add filterPathsByPages helper and tests for the new behaviour - Add TestFindGalleryPages_Recursive to cover the comics/<slug>/ layout Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06feat: add CLI prompt helper for gallery video generationPaul Buetow
Implements promptForGalleryVideos(outputDir) which lists *_gallery_*.png files, asks the user y/n, then prompts for page selection (1,3,5 or all), returning a sorted slice of chosen page numbers. Also adds the pure helper parseSelection(input, max) with full unit tests covering all branches. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>