Skip to content

feat(frontend): continue a Tavus conversation across competencies - #87

Merged
micio86dev merged 3 commits into
developfrom
feature/tavus-continuation-flow
Oct 10, 2026
Merged

micio86dev merged 3 commits into
developfrom
feature/tavus-continuation-flow

Conversation

@micio86dev

Copy link
Copy Markdown
Owner

What

FE-04 of tavus-single-session-interview: the client side of the continuation. Two commits.

  1. chore: sync openapi.json and the generated types with the merged api contract (live_conversation_id request field, continuation, conversation_id; no conversation_ttl_seconds yet, that is API-05/FE-06). Generated with bun run codegen, not hand-typed.
  2. feat: useInterviewSession continues a live Tavus conversation across competencies. isValidStartResponse accepts continuation/conversation_id and rejects a malformed continuation or one combined with a handle; createProvider runs once across three competencies (players.length <= 1); /start carries live_conversation_id only from the 'boundary' target while a handle is joined, never after reload, pause, tab-hidden, re-offer, retry() or embed re-entry; assertBoundary() is idempotent (racing inputs mint one ticket and one /end, a losing 409 unmutes and is a no-op); the mic is muted before /end and unmuted only at the steering ack or steering_failed (resend once for timeout/send_failed, otherwise the new competency ends as timeout); the 'boundary' target neither enters connecting nor publishes a handle; the Tavus continue directive leaves confirmDevices() only when continuation came back. Pause is disabled while a boundary is in flight; the 300 s timer goes through the same assertBoundary().

Decisions

  • No new flag: a handle is retargeted in place only when it is Tavus, the server named its conversation and the provider can steer context; otherwise today's path runs unchanged. HeyGen specs are byte-identical to develop.
  • A malformed continuation goes to the retryable error screen; a continuation for another conversation, or on a caller without a handle, is refused.
  • If the server answers a boundary /start with a fresh handle instead of a continuation, the old provider is stopped and the new handle published.

Verification

RED first (23 of 31 new tests failed; the 8 that passed are negative guards that already held); 31/31 green. Mutations (send the id after pause, skip the mute, drop the in-flight guard) each fail tests and were reverted. Full Vitest 117 files / 2977 tests, typecheck, lint (0 errors) pass. gga passed. Not verified: coverage of this file after the final edits (CI gates it), real Tavus/Daily, Playwright (FE-07).

@micio86dev
micio86dev merged commit d76179b into develop Oct 10, 2026
4 checks passed
@micio86dev
micio86dev deleted the feature/tavus-continuation-flow branch October 10, 2026 13:20
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