All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m6s
2.1 KiB
2.1 KiB
Subtitle Jobs Async Implementation Plan
For Claude: REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
Goal: Convert subtitle generation to an async job flow with 5-second polling and a staged progress bar.
Architecture: Add a backend in-memory subtitle job store, make /api/generate-subtitles return 202 immediately, expose a job lookup endpoint, and teach the frontend subtitle service and editor UI to poll and render stage-based progress.
Tech Stack: Express, TypeScript, React, Vitest
Task 1: Add backend job store helpers
Files:
- Create:
E:\Downloads\ai-video-dubbing-&-translation\src\server\subtitleJobs.ts - Test:
E:\Downloads\ai-video-dubbing-&-translation\src\server\subtitleJobs.test.ts
Task 2: Convert subtitle route to async job submission
Files:
- Modify:
E:\Downloads\ai-video-dubbing-&-translation\server.ts - Modify:
E:\Downloads\ai-video-dubbing-&-translation\src\server\subtitleGeneration.ts - Modify:
E:\Downloads\ai-video-dubbing-&-translation\src\server\videoSubtitleGeneration.ts
Task 3: Poll subtitle jobs from the frontend
Files:
- Modify:
E:\Downloads\ai-video-dubbing-&-translation\src\services\subtitleService.ts - Modify:
E:\Downloads\ai-video-dubbing-&-translation\src\services\subtitleService.test.ts - Modify:
E:\Downloads\ai-video-dubbing-&-translation\src\types.ts
Task 4: Show staged progress in the editor UI
Files:
- Modify:
E:\Downloads\ai-video-dubbing-&-translation\src\components\EditorScreen.tsx - Modify:
E:\Downloads\ai-video-dubbing-&-translation\src\components\EditorScreen.test.tsx
Task 5: Verify focused tests and typecheck
Files:
- Test:
E:\Downloads\ai-video-dubbing-&-translation\src\server\subtitleJobs.test.ts - Test:
E:\Downloads\ai-video-dubbing-&-translation\src\services\subtitleService.test.ts - Test:
E:\Downloads\ai-video-dubbing-&-translation\src\components\EditorScreen.test.tsx - Test:
E:\Downloads\ai-video-dubbing-&-translation\src\server\subtitleGeneration.test.ts - Test:
E:\Downloads\ai-video-dubbing-&-translation\src\server\videoSubtitleGeneration.test.ts