Skip to content

Recover/phase3 livekit - #29

Open
newbie-del wants to merge 74 commits into
mainfrom
recover/phase3-livekit
Open

Recover/phase3 livekit#29
newbie-del wants to merge 74 commits into
mainfrom
recover/phase3-livekit

Conversation

@newbie-del

Copy link
Copy Markdown
Owner

No description provided.

newbie-del and others added 30 commits July 9, 2025 17:01
git add .
git commit
git push origin <branch-name>
git commit -m "fix: instantly refresh agent details after update"
git commit -m "fix: instantly refresh agent details after update"
newbie-del and others added 25 commits September 3, 2025 01:47
…obs)

Restore the never-committed Phase 3 work that Copilot partially reverted,
replacing Stream Video + OpenAI Realtime with LiveKit + Google Gemini for
the live call and AI voice agent.

Restored from recovered blobs:
- meetings/server/procedures.ts — LiveKit API, guest tokens, connectAgent
- call/ui/components/call-connect.tsx — <LiveKitRoom>, token-based
- call/ui/components/call-provider.tsx — authed vs guest, ownerId->isHost
- call/ui/components/call-lobby.tsx — LiveKit PreJoin
- call/ui/views/call-view.tsx — route authed->CallProvider, guest->GuestCall
- call/ui/components/guest-call.tsx (new) — shared-link guest join
- app/call/[meetingId]/page.tsx — allow guests, no sign-in redirect
- deleted call-ui.tsx (call-connect renders CallActive directly)

Reconciled:
- call-active.tsx — final Props {meetingName, isHost, onEndForEveryone};
  leave via room.disconnect(); removed bogus participant.isHost/unreadChat;
  wired host end-for-everyone into ControlBar
- chat-ui.tsx — restored tracked Stream post-meeting ChatUI (was overwritten)
- db/schema.ts — re-add meetingParticipants table + meetingParticipantRole enum

Verified: tsc --noEmit 0 errors; next build compiles (12/12 routes).
Phase 4 (recording/transcript/summary) left as-is, out of scope.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Remove scratch files that were tracked or cluttering the root:
- dev-server logs, empty config.yml (contained only `{}`)
- scripts/diagnose-*.mjs: targeted the Stream/OpenAI-realtime path that
  Phase 3 replaced, and could not run anyway (`ws` is not a dependency)

Track source files that were never staged. These are real imports
(call-active.tsx pulls in three of them), so a fresh clone could not build:
- src/lib/gemini.ts, src/app/api/livekit/transcript/route.ts
- call-chat, call-reactions, conference-tile, public-navbar, meeting-chat

Rewrite .env.example and README: both documented the old Stream/OpenAI
stack and listed none of the eleven LIVEKIT_* vars or GOOGLE_API_KEY that
the code actually reads. Variable list derived by grepping process.env in src/.

Move past-session screenshots and transcripts to gitignored .local/, and
gitignore assets/ (report, slides, invoices) so it stays out of deploys.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The Python LiveKit agent must run as a long-lived process (it holds an open
connection to LiveKit), so it cannot live on Vercel. Add everything a host
needs to run it unattended:

- Dockerfile (python:3.12-slim, ffmpeg, pre-downloaded model weights)
- Procfile (worker: python agent.py start) for Render/Fly
- railway.toml for Railway
- README explaining dispatch, env vars, and how to deploy
- .env.example: document CONNEXAI_INGEST_URL/SECRET (were undocumented)

Also update agent-worker/.env: CONNEXAI_INGEST_URL pointed at a dead ngrok
tunnel; point it at the deployed app so transcripts actually arrive.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
getCurrentSubscription and getFreeUsage both called
customers.getStateExternal, which throws ResourceNotFound when the user has
no Polar customer record. That is a normal state, not a failure: Polar
customers are per-environment and are created at sign-up, so a user can
legitimately have none.

Letting the 404 propagate took down the whole upgrade page ("Failed to Load
Plans") and the sidebar usage widget, when the honest answer is just that the
user has no subscription.

Route both through one helper that catches ResourceNotFound and returns null,
rethrowing anything else so real failures (bad token, outage) still surface.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The generated agent-worker/.railway-setup.sh inlines LiveKit and Gemini
credentials so it can be run once against a fresh Railway project. It must
never be committed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- Recording backfill matched EGRESS_ABORTED (5) instead of EGRESS_COMPLETE (3),
  so a finished recording was never picked up. Use the EgressStatus enum.
- getTranscript / sendChatMessage: guard JSONL.parse so a malformed transcript
  degrades instead of failing the query or breaking post-meeting chat.
- sendChatMessage sent the latest user turn twice, since recentHistory is read
  after the message is inserted. Pass history alone.
- meetingProcessing: an unparseable transcript threw and left the meeting stuck
  in "processing" forever. Complete it with the fallback summary instead.
- Transcript ingest returned 200 and queued a summary for unknown meetings.
  Return 404 when no row matched and skip the Inngest send.
- CallReactions leaked its removal timers; clear them on unmount.
Copilot AI lite review requested due to automatic review settings August 31, 2026 15:01
@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
connex-ai Ready Ready Preview Aug 31, 2026 3:01pm

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 987792f8-e986-4a67-acdd-381d5ca30931


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

2 participants