| 1 | import { MemoryBankBoard } from "@/components/workplace/MemoryBankBoard"; |
| 2 | import { ShotMemorySlots } from "@/components/workplace/ShotMemorySlots"; |
| 3 | import { careerMemoryReviewPreview } from "@/lib/memory-review-preview"; |
| 4 | import type { MemoryWorkspaceAsset, WorkplaceShot } from "@/lib/types"; |
| 5 | |
| 6 | export function MemoryBankPreviewPage() { |
| 7 | const entries = |
| 8 | careerMemoryReviewPreview("approved").memoryReview?.selections ?? []; |
| 9 | const assets: MemoryWorkspaceAsset[] = entries.map((entry, index) => ({ |
| 10 | asset_id: `preview-${index}`, |
| 11 | display_name: entry.display_name ?? entry.memory_id, |
| 12 | source: "automatic", |
| 13 | kind: entry.kind, |
| 14 | memory_id: entry.memory_id, |
| 15 | source_shot_id: entry.source_shot_id, |
| 16 | frame_index: entry.frame_index, |
| 17 | image: entry.image, |
| 18 | audio: entry.audio, |
| 19 | })); |
| 20 | const shots: WorkplaceShot[] = [ |
| 21 | { |
| 22 | shot_id: 2, |
| 23 | shot_key: "shot_002", |
| 24 | status: "prompt_ready", |
| 25 | summary: "Preview shot", |
| 26 | cut: true, |
| 27 | has_video: false, |
| 28 | has_actions: false, |
| 29 | accepted: false, |
| 30 | timeline: { |
| 31 | start_seconds: 0, |
| 32 | end_seconds: 5, |
| 33 | duration_seconds: 5, |
| 34 | label: "00:00 - 00:05", |
| 35 | }, |
| 36 | }, |
| 37 | { |
| 38 | shot_id: 3, |
| 39 | shot_key: "shot_003", |
| 40 | status: "prompt_ready", |
| 41 | summary: "Second preview shot", |
| 42 | cut: true, |
| 43 | has_video: false, |
| 44 | has_actions: false, |
| 45 | accepted: false, |
| 46 | timeline: { |
| 47 | start_seconds: 5, |
| 48 | end_seconds: 10, |
| 49 | duration_seconds: 5, |
| 50 | label: "00:05 - 00:10", |
| 51 | }, |
| 52 | }, |
| 53 | ]; |
| 54 | |
| 55 | return ( |
| 56 | <main className="min-h-screen bg-background text-foreground"> |
| 57 | <div className="mx-auto flex min-h-screen w-full max-w-4xl flex-col border-x border-border/55"> |
| 58 | <header className="border-b border-border/55 px-4 py-4"> |
| 59 | <p className="text-[10px] font-medium uppercase text-muted-foreground"> |
| 60 | Echo Director |
| 61 | </p> |
| 62 | <h1 className="mt-1 text-lg font-semibold">Memory Bank Board</h1> |
| 63 | </header> |
| 64 | <div className="h-[42rem] overflow-y-auto bg-foreground/[0.012]"> |
| 65 | <div className="sticky top-0 z-20 bg-background/95 pb-2 backdrop-blur-sm"> |
| 66 | <MemoryBankBoard |
| 67 | assets={assets} |
| 68 | shots={shots} |
| 69 | showSlots={false} |
| 70 | onSaveAsset={async () => undefined} |
| 71 | onDeleteAsset={async () => undefined} |
| 72 | onApplySlots={async () => undefined} |
| 73 | /> |
| 74 | </div> |
| 75 | <div className="space-y-4 p-4"> |
| 76 | {shots.map((shot, index) => ( |
| 77 | <div key={shot.shot_id}> |
| 78 | <ShotMemorySlots |
| 79 | assets={assets} |
| 80 | shot={shot} |
| 81 | conditionImage={index === 0 ? assets[0].image : null} |
| 82 | onApplySlots={async () => undefined} |
| 83 | /> |
| 84 | <div className="grid h-64 place-items-center rounded-2xl border border-border/50 bg-background text-sm text-muted-foreground"> |
| 85 | Shot {shot.shot_id} card |
| 86 | </div> |
| 87 | </div> |
| 88 | ))} |
| 89 | </div> |
| 90 | </div> |
| 91 | </div> |
| 92 | </main> |
| 93 | ); |
| 94 | } |
| 95 |