Commit Graph

1 Commits

Author SHA1 Message Date
94e5e9520b feat: My calls — the human sees the transcript of the call they took
Third screen, scoped to the signed-in human: the calls Meera transferred to
them, with the handover brief, the live conversation as it happens, and the
co-pilot's quiet suggestions to relay.

The scoping is the server's, not this component's. Each transferred call is a
co-pilot session OWNED BY the human it was routed to, and agents-backend
authorizes every read with `session.user_id == token.sub`. A renderer app-user
token carries the platform user id in `sub`, so someone else's call is a 403 —
no filtering happens in the browser, and none could.

Worth knowing: this talks to agents-backend (/api/agent-sessions) rather than
the app's core/view services, but with the SAME token. agents-backend validates
it against the shared secret and falls back to a DB lookup for user-service
tokens, which omit org_user_id. No new endpoint, no CORS change — it is already
on the console's base URL.

Rendering notes:
  - "[live call] …" lines are speech the AI overheard on the bridged call, from
    both sides; they render as overheard rather than as chat.
  - A lone dash is the co-pilot deliberately staying silent. Dropped, because an
    empty suggestion box reads as a bug.
  - The server only lists sessions with >= 1 user message, and a co-pilot
    session's user messages ARE the overheard lines — so a transfer where the
    listener never attached will not appear here even though the bridge worked.

tsc -b and vite build clean.
2026-08-27 10:51:59 +05:30