diff --git a/apps/api/src/media-capabilities.test.ts b/apps/api/src/media-capabilities.test.ts index 1da582d..be74a1e 100644 --- a/apps/api/src/media-capabilities.test.ts +++ b/apps/api/src/media-capabilities.test.ts @@ -1,5 +1,6 @@ import type { MediaCapabilities } from "@rakazo/adapter-kit"; import type { Actor } from "@rakazo/contracts"; +import { MediaOperationSchema } from "@rakazo/contracts"; import { describe, expect, it } from "vitest"; import type { MediaRouteDeps } from "./media-jobs.js"; import { getMediaCapabilities } from "./media-jobs.js"; @@ -28,7 +29,7 @@ describe("media capabilities", () => { it("reports nothing available without a media runtime", async () => { const capabilities = await getMediaCapabilities({} as MediaRouteDeps, actor); - expect(Object.values(capabilities)).toHaveLength(6); + expect(Object.keys(capabilities)).toEqual(MediaOperationSchema.options); expect(Object.values(capabilities).every((value) => value === false)).toBe(true); }); }); diff --git a/apps/web/e2e/media-card.spec.ts b/apps/web/e2e/media-card.spec.ts index 6697d4a..af3da7a 100644 --- a/apps/web/e2e/media-card.spec.ts +++ b/apps/web/e2e/media-card.spec.ts @@ -223,6 +223,33 @@ test("renders a media job card while it runs and when it is done", async ({ page }); }); +test("shows a finished video analysis as a done card without files", async ({ page }, testInfo) => { + const stamp = Date.now(); + await signup(page, `media-analysis-${stamp}@rakazo.test`, "password12", "Media Analysis"); + await completeOnboarding(page); + const botId = activeBotId(page); + // The cut points go to the bot only; the card just tells the user the analysis ran. + await seedMediaMessage(page, botId, () => ({ + kind: "media", + jobId: "media-job-analysis", + operation: "analyze_video", + status: "done", + title: "Find the cut points", + progress: 1, + outputs: [], + })); + await page.reload(); + + const card = page.getByTestId("media-card"); + await expect(card).toBeVisible({ timeout: 30_000 }); + await expect(card).toHaveAttribute("data-status", "done"); + await expect(card).toContainText("Find the cut points"); + await expect(card).toContainText("Done"); + await expect(card.getByRole("button")).toHaveCount(0); + await expect(card.getByRole("link")).toHaveCount(0); + await captureScreenshot(page, testInfo, "media-card-analysis"); +}); + test("a platform export names its platform, shows a failed check and exports for others", async ({ page, }, testInfo) => { diff --git a/apps/web/e2e/new-bot-ux.spec.ts b/apps/web/e2e/new-bot-ux.spec.ts index 35645fb..7a45c61 100644 --- a/apps/web/e2e/new-bot-ux.spec.ts +++ b/apps/web/e2e/new-bot-ux.spec.ts @@ -46,8 +46,8 @@ test("create opens form, then empty chat; picker lists bots; sidebar collapses", page.getByTestId("transcript").getByText("What do you want me on first?", { exact: true }), ).toHaveCount(0); await expect( - page.getByTestId("transcript").getByText("Start the conversation — New Bot is on stage above."), - ).toBeVisible(); + page.getByTestId("transcript").getByText("Start the conversation", { exact: false }), + ).toHaveCount(0); await captureScreenshot(page, testInfo, "create-chat-sidepanel-closed"); await page.getByTestId("toggle-bots-sidebar").click(); diff --git a/apps/web/src/components/media/MediaCard.test.tsx b/apps/web/src/components/media/MediaCard.test.tsx index eb9513d..b0c35de 100644 --- a/apps/web/src/components/media/MediaCard.test.tsx +++ b/apps/web/src/components/media/MediaCard.test.tsx @@ -109,6 +109,23 @@ describe("media card", () => { expect(html).not.toContain("Cancel"); }); + it("shows a finished analysis as done, with nothing to open or act on", () => { + const html = renderToString( + , + ); + expect(html).toContain('data-status="done"'); + expect(html).toContain("Find the cut points"); + expect(html).toContain("Done"); + expect(html).toContain("lucide-scan-search"); + expect(html).not.toContain("Download"); + expect(html).not.toContain("Export"); + expect(html).not.toContain("Transcribe"); + }); + it("offers only what the space can run and what fits the output", () => { const audio = { ...video, artifactId: "audio-1", kind: "audio" as const, name: "take.m4a" }; const onlyTranscribe = renderToString( diff --git a/apps/web/src/components/media/MediaCard.tsx b/apps/web/src/components/media/MediaCard.tsx index 85375eb..aa6cfc8 100644 --- a/apps/web/src/components/media/MediaCard.tsx +++ b/apps/web/src/components/media/MediaCard.tsx @@ -19,7 +19,16 @@ import { DropdownMenuTrigger, } from "@rakazo/ui-web"; import type { LucideIcon } from "lucide-react"; -import { Captions, ChevronDown, Download, Film, ImageIcon, Scissors, Sparkles } from "lucide-react"; +import { + Captions, + ChevronDown, + Download, + Film, + ImageIcon, + ScanSearch, + Scissors, + Sparkles, +} from "lucide-react"; import { useEffect, useId, useState } from "react"; import type { ArtifactTarget } from "../../lib/artifact-open"; import { artifactUrl } from "../../lib/artifact-url"; @@ -54,6 +63,7 @@ const OPERATION_ICONS: Record = { edit_video: Scissors, export_video: Film, transcribe: Captions, + analyze_video: ScanSearch, }; export function isActiveMediaStatus(status: MediaJobStatus): boolean { diff --git a/apps/web/src/locales/de/messages.po b/apps/web/src/locales/de/messages.po index d2229fe..f5da7c7 100644 --- a/apps/web/src/locales/de/messages.po +++ b/apps/web/src/locales/de/messages.po @@ -1457,10 +1457,6 @@ msgstr "Im Hintergrund fortsetzen" msgid "Continue with email" msgstr "Mit E-Mail fortfahren" -#: src/pages/shell/transcript.tsx -msgid "Conversation record" -msgstr "Gesprächsverlauf" - #: src/pages/ProjectSessionTimeline.tsx msgid "Conversations" msgstr "Unterhaltungen" @@ -4783,14 +4779,6 @@ msgstr "Chat starten" msgid "Start recording" msgstr "Aufnahme starten" -#: src/pages/shell/transcript.tsx -msgid "Start the conversation — {activeName} is on stage above." -msgstr "Starte die Unterhaltung — {activeName} steht oben auf der Bühne." - -#: src/pages/shell/transcript.tsx -msgid "Start the conversation." -msgstr "Starte die Unterhaltung." - #: src/components/CookingMode.tsx msgid "Start timer" msgstr "Timer starten" @@ -5121,7 +5109,6 @@ msgid "Transcribe" msgstr "Transkribieren" #: src/components/voice/VoiceStage.tsx -#: src/pages/shell/transcript.tsx msgid "Transcript" msgstr "Transkript" diff --git a/apps/web/src/locales/en/messages.po b/apps/web/src/locales/en/messages.po index c05a37e..9c60084 100644 --- a/apps/web/src/locales/en/messages.po +++ b/apps/web/src/locales/en/messages.po @@ -1457,10 +1457,6 @@ msgstr "Continue in Background" msgid "Continue with email" msgstr "Continue with email" -#: src/pages/shell/transcript.tsx -msgid "Conversation record" -msgstr "Conversation record" - #: src/pages/ProjectSessionTimeline.tsx msgid "Conversations" msgstr "Conversations" @@ -4783,14 +4779,6 @@ msgstr "Start chat" msgid "Start recording" msgstr "Start recording" -#: src/pages/shell/transcript.tsx -msgid "Start the conversation — {activeName} is on stage above." -msgstr "Start the conversation — {activeName} is on stage above." - -#: src/pages/shell/transcript.tsx -msgid "Start the conversation." -msgstr "Start the conversation." - #: src/components/CookingMode.tsx msgid "Start timer" msgstr "Start timer" @@ -5121,7 +5109,6 @@ msgid "Transcribe" msgstr "Transcribe" #: src/components/voice/VoiceStage.tsx -#: src/pages/shell/transcript.tsx msgid "Transcript" msgstr "Transcript" diff --git a/apps/web/src/locales/es/messages.po b/apps/web/src/locales/es/messages.po index b6fa997..00b1fac 100644 --- a/apps/web/src/locales/es/messages.po +++ b/apps/web/src/locales/es/messages.po @@ -1457,10 +1457,6 @@ msgstr "" msgid "Continue with email" msgstr "Continuar con el correo" -#: src/pages/shell/transcript.tsx -msgid "Conversation record" -msgstr "" - #: src/pages/ProjectSessionTimeline.tsx msgid "Conversations" msgstr "" @@ -4783,14 +4779,6 @@ msgstr "" msgid "Start recording" msgstr "Iniciar grabación" -#: src/pages/shell/transcript.tsx -msgid "Start the conversation — {activeName} is on stage above." -msgstr "" - -#: src/pages/shell/transcript.tsx -msgid "Start the conversation." -msgstr "" - #: src/components/CookingMode.tsx msgid "Start timer" msgstr "" @@ -5121,7 +5109,6 @@ msgid "Transcribe" msgstr "" #: src/components/voice/VoiceStage.tsx -#: src/pages/shell/transcript.tsx msgid "Transcript" msgstr "" diff --git a/apps/web/src/locales/hi/messages.po b/apps/web/src/locales/hi/messages.po index 4594935..1ac27a5 100644 --- a/apps/web/src/locales/hi/messages.po +++ b/apps/web/src/locales/hi/messages.po @@ -1457,10 +1457,6 @@ msgstr "" msgid "Continue with email" msgstr "ईमेल से जारी रखें" -#: src/pages/shell/transcript.tsx -msgid "Conversation record" -msgstr "" - #: src/pages/ProjectSessionTimeline.tsx msgid "Conversations" msgstr "" @@ -4783,14 +4779,6 @@ msgstr "" msgid "Start recording" msgstr "रिकॉर्डिंग शुरू करें" -#: src/pages/shell/transcript.tsx -msgid "Start the conversation — {activeName} is on stage above." -msgstr "" - -#: src/pages/shell/transcript.tsx -msgid "Start the conversation." -msgstr "" - #: src/components/CookingMode.tsx msgid "Start timer" msgstr "" @@ -5121,7 +5109,6 @@ msgid "Transcribe" msgstr "" #: src/components/voice/VoiceStage.tsx -#: src/pages/shell/transcript.tsx msgid "Transcript" msgstr "" diff --git a/apps/web/src/locales/ko/messages.po b/apps/web/src/locales/ko/messages.po index f8b8c6a..ae28686 100644 --- a/apps/web/src/locales/ko/messages.po +++ b/apps/web/src/locales/ko/messages.po @@ -1457,10 +1457,6 @@ msgstr "" msgid "Continue with email" msgstr "이메일로 계속하기" -#: src/pages/shell/transcript.tsx -msgid "Conversation record" -msgstr "" - #: src/pages/ProjectSessionTimeline.tsx msgid "Conversations" msgstr "" @@ -4783,14 +4779,6 @@ msgstr "" msgid "Start recording" msgstr "작업 녹화 시작" -#: src/pages/shell/transcript.tsx -msgid "Start the conversation — {activeName} is on stage above." -msgstr "" - -#: src/pages/shell/transcript.tsx -msgid "Start the conversation." -msgstr "" - #: src/components/CookingMode.tsx msgid "Start timer" msgstr "" @@ -5121,7 +5109,6 @@ msgid "Transcribe" msgstr "" #: src/components/voice/VoiceStage.tsx -#: src/pages/shell/transcript.tsx msgid "Transcript" msgstr "" diff --git a/apps/web/src/locales/pt-BR/messages.po b/apps/web/src/locales/pt-BR/messages.po index b73eb97..d9e538d 100644 --- a/apps/web/src/locales/pt-BR/messages.po +++ b/apps/web/src/locales/pt-BR/messages.po @@ -1457,10 +1457,6 @@ msgstr "" msgid "Continue with email" msgstr "Continuar com e-mail" -#: src/pages/shell/transcript.tsx -msgid "Conversation record" -msgstr "" - #: src/pages/ProjectSessionTimeline.tsx msgid "Conversations" msgstr "" @@ -4783,14 +4779,6 @@ msgstr "" msgid "Start recording" msgstr "Começar a gravar" -#: src/pages/shell/transcript.tsx -msgid "Start the conversation — {activeName} is on stage above." -msgstr "" - -#: src/pages/shell/transcript.tsx -msgid "Start the conversation." -msgstr "" - #: src/components/CookingMode.tsx msgid "Start timer" msgstr "" @@ -5121,7 +5109,6 @@ msgid "Transcribe" msgstr "" #: src/components/voice/VoiceStage.tsx -#: src/pages/shell/transcript.tsx msgid "Transcript" msgstr "" diff --git a/apps/web/src/locales/ru/messages.po b/apps/web/src/locales/ru/messages.po index 192ab99..940f1dc 100644 --- a/apps/web/src/locales/ru/messages.po +++ b/apps/web/src/locales/ru/messages.po @@ -1457,10 +1457,6 @@ msgstr "Продолжить в фоне" msgid "Continue with email" msgstr "Продолжить по электронной почте" -#: src/pages/shell/transcript.tsx -msgid "Conversation record" -msgstr "" - #: src/pages/ProjectSessionTimeline.tsx msgid "Conversations" msgstr "" @@ -4783,14 +4779,6 @@ msgstr "" msgid "Start recording" msgstr "Начать запись" -#: src/pages/shell/transcript.tsx -msgid "Start the conversation — {activeName} is on stage above." -msgstr "" - -#: src/pages/shell/transcript.tsx -msgid "Start the conversation." -msgstr "" - #: src/components/CookingMode.tsx msgid "Start timer" msgstr "" @@ -5121,7 +5109,6 @@ msgid "Transcribe" msgstr "" #: src/components/voice/VoiceStage.tsx -#: src/pages/shell/transcript.tsx msgid "Transcript" msgstr "" diff --git a/apps/web/src/locales/tr/messages.po b/apps/web/src/locales/tr/messages.po index 9614fc9..461aa94 100644 --- a/apps/web/src/locales/tr/messages.po +++ b/apps/web/src/locales/tr/messages.po @@ -1457,10 +1457,6 @@ msgstr "" msgid "Continue with email" msgstr "E-posta ile devam et" -#: src/pages/shell/transcript.tsx -msgid "Conversation record" -msgstr "" - #: src/pages/ProjectSessionTimeline.tsx msgid "Conversations" msgstr "" @@ -4783,14 +4779,6 @@ msgstr "" msgid "Start recording" msgstr "Kaydı başlat" -#: src/pages/shell/transcript.tsx -msgid "Start the conversation — {activeName} is on stage above." -msgstr "" - -#: src/pages/shell/transcript.tsx -msgid "Start the conversation." -msgstr "" - #: src/components/CookingMode.tsx msgid "Start timer" msgstr "" @@ -5121,7 +5109,6 @@ msgid "Transcribe" msgstr "" #: src/components/voice/VoiceStage.tsx -#: src/pages/shell/transcript.tsx msgid "Transcript" msgstr "" diff --git a/apps/web/src/locales/zh-CN/messages.po b/apps/web/src/locales/zh-CN/messages.po index ec44c53..acaed71 100644 --- a/apps/web/src/locales/zh-CN/messages.po +++ b/apps/web/src/locales/zh-CN/messages.po @@ -1457,10 +1457,6 @@ msgstr "" msgid "Continue with email" msgstr "使用邮箱继续" -#: src/pages/shell/transcript.tsx -msgid "Conversation record" -msgstr "" - #: src/pages/ProjectSessionTimeline.tsx msgid "Conversations" msgstr "" @@ -4783,14 +4779,6 @@ msgstr "" msgid "Start recording" msgstr "开始录制" -#: src/pages/shell/transcript.tsx -msgid "Start the conversation — {activeName} is on stage above." -msgstr "" - -#: src/pages/shell/transcript.tsx -msgid "Start the conversation." -msgstr "" - #: src/components/CookingMode.tsx msgid "Start timer" msgstr "" @@ -5121,7 +5109,6 @@ msgid "Transcribe" msgstr "" #: src/components/voice/VoiceStage.tsx -#: src/pages/shell/transcript.tsx msgid "Transcript" msgstr "" diff --git a/apps/web/src/pages/Shell.tsx b/apps/web/src/pages/Shell.tsx index 765575c..3f5cbcc 100644 --- a/apps/web/src/pages/Shell.tsx +++ b/apps/web/src/pages/Shell.tsx @@ -3321,9 +3321,6 @@ export function ShellPage() { key={activeSnapshot?.threadId} encounterMode={encounterMode} voiceEncounterActive={voiceEncounterActive} - activeName={ - inGroup ? (activeGroup?.name ?? activeSnapshot?.groupName) : active?.name - } scrollRef={messageScroll} artifactTarget={transcriptArtifactTarget} onOpenArtifact={wideLayout ? openArtifactBeside : undefined} diff --git a/apps/web/src/pages/shell/transcript.tsx b/apps/web/src/pages/shell/transcript.tsx index 16edd4d..61dbad9 100644 --- a/apps/web/src/pages/shell/transcript.tsx +++ b/apps/web/src/pages/shell/transcript.tsx @@ -86,7 +86,6 @@ export const Transcript = memo(function Transcript({ voiceReady, speakingMessageId, onSpeak, - activeName, encounterMode = false, voiceEncounterActive = false, }: { @@ -118,7 +117,6 @@ export const Transcript = memo(function Transcript({ voiceReady: boolean; speakingMessageId: string | null; onSpeak: (message: ThreadMessage) => void; - activeName?: string; encounterMode?: boolean; voiceEncounterActive?: boolean; }) { @@ -350,11 +348,6 @@ export const Transcript = memo(function Transcript({ encounterMode ? "gap-2 px-3 py-3 md:px-6 md:py-4" : "gap-3.5 px-3.5 py-4 md:px-8 md:py-6" } ${transcriptSubordinate ? "opacity-75" : ""}`} > - {encounterMode ? ( -

- {voiceEncounterActive ? Transcript : Conversation record} -

- ) : null} {olderCursor != null ? (