Phase 4: Post-meeting pipeline — transcript, summary, AI chat, recording - #28
Phase 4: Post-meeting pipeline — transcript, summary, AI chat, recording#28newbie-del wants to merge 8 commits into
Conversation
Wire up the post-meeting pipeline to LiveKit + Gemini, replacing the Stream Chat / OpenAI dependencies for this flow: - Schema: add transcript column, meetingChatMessages table - Gemini helper (src/lib/gemini.ts) for summary + chat - Worker (agent.py): capture transcript during session, POST to ingest endpoint - Ingest endpoint (api/livekit/transcript): receive + store transcript, trigger Inngest - Inngest summarizer: read transcript from DB, summarize with Gemini - Procedures: getTranscript reads from DB, endMeeting → processing status, getChatMessages + sendChatMessage (Postgres-backed AI chat) - Recording: LiveKit egress → R2 with backfill in getOne - UI: new meeting-chat.tsx replaces Stream Chat; recording null guard - Remove: chat-provider.tsx, chat-ui.tsx, generateChatToken, message.new webhook - Deps: add @livekit/components-react, livekit-client, @livekit/components-styles, @google/genai, livekit-server-sdk
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@copilot resolve the merge conflicts in this pull request |
1 similar comment
|
@copilot resolve the merge conflicts in this pull request |
There was a problem hiding this comment.
Pull request overview
This PR implements “Phase 4” of the post-meeting pipeline by moving transcript ingest, summarization, and post-meeting AI chat to a LiveKit + Gemini stack, while also adding LiveKit room recording to R2 and updating the call/meeting UIs accordingly.
Changes:
- Add transcript ingest + DB storage, and an Inngest-driven Gemini summarizer that transitions meetings from
processing→completed. - Replace Stream Chat–based post-meeting chat with a Postgres-backed “Ask AI about this meeting” chat powered by Gemini.
- Add LiveKit egress recording to R2 (plus a local-dev backfill path) and update call UI components (tiles, chat, reactions, roster behavior).
Reviewed changes
Copilot reviewed 21 out of 22 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/modules/meetings/ui/components/meeting-chat.tsx | New post-meeting “Ask AI” chat UI backed by tRPC procedures. |
| src/modules/meetings/ui/components/completed-state.tsx | Swap Stream Chat provider for the new MeetingChat; guard recording playback when URL is missing. |
| src/modules/meetings/ui/components/chat-ui.tsx | Remove Stream Chat UI implementation. |
| src/modules/meetings/ui/components/chat-provider.tsx | Remove Stream Chat session/provider wrapper. |
| src/modules/meetings/server/procedures.ts | Add transcript-from-DB reads, Gemini-backed post-meeting chat procedures, recording start/backfill, and status updates. |
| src/modules/call/ui/components/participants-panel.tsx | Only show mute button when a mute handler is provided. |
| src/modules/call/ui/components/conference-tile.tsx | New LiveKit-based conference tile with pin + fullscreen support and better placeholders. |
| src/modules/call/ui/components/call-reactions.tsx | New emoji reactions over LiveKit data channel with floating overlay. |
| src/modules/call/ui/components/call-connect.tsx | Enable browser audio processing defaults (echo cancellation, etc.) for mic capture. |
| src/modules/call/ui/components/call-chat.tsx | New in-call chat panel supporting “Everyone” and “AI only” (private) messaging. |
| src/modules/call/ui/components/call-active.tsx | Replace prior call UI/sidebar with pinned focus layout, roster panel, in-call chat, and reactions. |
| src/lib/livekit.ts | Pass agent display name via metadata and add LiveKit egress recording helpers for R2. |
| src/lib/gemini.ts | New server-only Gemini helper used by summarizer and post-meeting chat. |
| src/inngest/functions.ts | Replace OpenAI agent-kit summarizer with Gemini summarization; add idempotency and missing-transcript handling. |
| src/db/schema.ts | Add meetings.transcript and new meeting_chat_messages table + enums/indexes. |
| src/app/api/webhook/route.ts | Remove Stream Chat + OpenAI message.new webhook handling for post-meeting chat. |
| src/app/api/livekit/webhook/route.ts | Update egress_ended handling to construct public recording URL from R2 object key. |
| src/app/api/livekit/transcript/route.ts | New transcript ingest endpoint secured by shared secret; triggers Inngest pipeline. |
| package.json | Add Gemini + LiveKit dependencies; maintain Node >= 20 engines requirement. |
| package-lock.json | Lockfile updates for newly added dependencies. |
| next.config.ts | Enable experimental.optimizePackageImports for several large barrel-export packages. |
| agent-worker/agent.py | Capture transcript in the LiveKit agent worker and POST it to the ingest endpoint; tune Gemini Live model settings. |
Suppressed comments (1)
src/modules/call/ui/components/call-reactions.tsx:43
- The
spawnhelper schedules asetTimeoutthat will callsetFloatseven if the component unmounts. Track timeout ids and clear them in a cleanup effect to avoid state updates on an unmounted component.
export const CallReactions = () => {
const [open, setOpen] = useState(false);
const [floats, setFloats] = useState<Floating[]>([]);
const spawn = useCallback((emoji: string) => {
const id = `${Date.now()}-${_seq++}`;
const left = 8 + Math.random() * 84;
setFloats((prev) => [...prev, { id, emoji, left }]);
// Remove after the float animation finishes so the DOM stays small.
window.setTimeout(
() => setFloats((prev) => prev.filter((f) => f.id !== id)),
3800
);
}, []);
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: newbie-del <123349950+newbie-del@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: newbie-del <123349950+newbie-del@users.noreply.github.com>
Implemented the requested review-thread fixes in |
Wire up the post-meeting pipeline to LiveKit + Gemini, replacing the Stream Chat / OpenAI dependencies for this flow: