Skip to content

Conversation

@google-labs-jules
Copy link
Contributor

Implemented the "Enhance Transcript" feature.

  1. Backend:

    • Created app/api/transcript/enhance/route.ts:
      • Validates input using enhanceTranscriptSchema (based on videoInfoSchema and transcriptSchema).
      • Checks for sufficient video credits.
      • Constructs a system prompt for grok-4-1-fast-non-reasoning to clean up text (grammar, filler words) while strictly maintaining a 1:1 segment mapping.
      • Parses the AI response (JSON array of strings) and reconstructs the TranscriptSegment array.
      • Consumes 1 video credit atomically.
      • Updates the transcript column in the video_analyses table.
    • Updated lib/validation.ts: Added optional description field to videoInfoSchema to resolve TypeScript errors and allow passing context to the AI.
  2. Frontend:

    • Updated components/transcript-viewer.tsx:
      • Added an "Enhance" button (Sparkles icon) to the header.
      • Added a confirmation dialog explaining the cost (1 credit) and permanence of the action.
      • Added onTranscriptUpdate prop to propagate changes to the parent.
    • Updated components/right-column-tabs.tsx:
      • Passes videoInfo and onTranscriptUpdate down to TranscriptViewer.
    • Updated app/analyze/[videoId]/page.tsx:
      • Implemented onTranscriptUpdate callback to update the local transcript state.
      • Added logic to re-hydrate topics and baseTopics with the new transcript text, resetting character offsets to ensure highlighting still works (albeit less precise until full re-analysis, but functional).
  3. Verification:

    • Verified the frontend UI via Playwright screenshot (analyze_page.png), confirming the presence of the "Enhance" button.
    • Verified TypeScript compilation (pnpm tsc --noEmit) passes successfully after updating lib/validation.ts.

PR created automatically by Jules for task 7610923124901016416 started by @SamuelZ12

- Added `POST /api/transcript/enhance` endpoint to clean up transcripts using Grok AI.
- Added "Enhance" button to `TranscriptViewer` with a confirmation dialog.
- Updated `lib/validation.ts` to include `description` in `videoInfoSchema`.
- Updated `app/analyze/[videoId]/page.tsx` to handle transcript updates and re-hydrate topics.
- Consumes 1 video credit for each enhancement operation.
- Persists enhanced transcript to `video_analyses` table.
@google-labs-jules
Copy link
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

@supabase
Copy link

supabase bot commented Dec 13, 2025

This pull request has been ignored for the connected project ioczjdqhdcjmrnsicqqz because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@vercel
Copy link

vercel bot commented Dec 13, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
tldw Ready Ready Preview, Comment Dec 13, 2025 8:48pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant