import { useMutation } from "@tanstack/react-query"; import { motion } from "motion/react"; import { startPairing } from "../../api"; import { useReducedMotion } from "../../hooks/useReducedMotion"; import { ambientPulse } from "../../lib/motion"; import { Button } from "../ui/Button"; import { Hint } from "../ui/EmptyState"; import { TelemetryPanel } from "../ui/Telemetry"; export function WormholeView({ pairing, onPaired, }: { pairing: { code: string; expires_at: string } | null; onPaired: (p: { code: string; expires_at: string }) => void; }) { const gen = useMutation({ mutationFn: startPairing, onSuccess: onPaired, }); const reducedMotion = useReducedMotion(); const expires = pairing ? new Date(pairing.expires_at).toLocaleTimeString() : ""; return (
Link a remote machine once — it beams snapshots through an encrypted wormhole.
{!pairing ? (Pairing code
{pairing.code}
Burns at {expires}
tessera-agent pair {pairing.code}
No outposts paired yet
Grey dot means offline or waiting.
Open a wormhole when you're ready to claim an outpost.