Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
feat: move Loom concierge migration into the Loom import page
Richie McIlroy8779caaf3dd4
diff --git a/apps/web/__tests__/unit/loom-import-ui.test.ts b/apps/web/__tests__/unit/loom-import-ui.test.tsindex 07fd55309..09e290dc5 100644--- a/apps/web/__tests__/unit/loom-import-ui.test.ts+++ b/apps/web/__tests__/unit/loom-import-ui.test.ts@@ -99,6 +99,12 @@ vi.mock("next/link", () => ({vi.mock("@cap/env", () => ({buildEnv: { NEXT_PUBLIC_IS_CAP: "true" },}));+vi.mock("@/actions/loom-concierge", () => ({+ answerLoomMigrationQuestion: vi.fn(),+ confirmLoomMigrationInvite: vi.fn(),+ getLoomMigrationDashboard: vi.fn(async () => ({ isPro: true, requests: [] })),+ requestLoomMigration: vi.fn(),+}));vi.mock("@/actions/loom", () => ({getLoomImportFolders: mocks.folders,importFromLoom: mocks.import,@@ -189,11 +195,9 @@ describe("Loom importer component", () => {it("shows the inherited subfolder and submits it then returns there", async () => {await render({ folderId: Folder.FolderId.make("child") });await ready();- expect(- Array.from(container.querySelectorAll("a")).find(- (link) => link.getAttribute("href") === "/dashboard/migrations/loom",- )?.textContent,- ).toContain("Want Cap to move your whole Loom workspace for you?");+ await waitFor(() =>+ expect(container.textContent).toContain("Moving a whole Loom workspace?"),+ );expect(getByRole(container, "combobox", { name: "Import to" }).textContent,).toContain("My Caps / Course / Live Calls - Two");diff --git a/apps/web/actions/loom-concierge.tsx b/apps/web/actions/loom-concierge.tsxindex b332c0c2e..5b9452dd1 100644--- a/apps/web/actions/loom-concierge.tsx+++ b/apps/web/actions/loom-concierge.tsx@@ -47,7 +47,7 @@ function affectedRows(result: unknown) {}function refreshMigrationPages() {- revalidatePath("/dashboard/migrations/loom");+ revalidatePath("/dashboard/import/loom");revalidatePath("/dashboard/admin/loom-migrations");}@@ -370,7 +370,7 @@ async function saveMigrationStatus({organizationName={organization?.name ?? "your Cap workspace"}statusLabel={LOOM_MIGRATION_STATUS_LABELS[nextStatus]}message={normalizedMessage || null}- dashboardUrl={`${serverEnv().WEB_URL}/dashboard/migrations/loom`}+ dashboardUrl={`${serverEnv().WEB_URL}/dashboard/import/loom`}/>),replyTo: SUPPORT_EMAIL,diff --git a/apps/web/actions/loom.ts b/apps/web/actions/loom.tsindex 2f8ce51d1..96dca601f 100644--- a/apps/web/actions/loom.ts+++ b/apps/web/actions/loom.ts@@ -1094,7 +1094,7 @@ async function importConciergeCsvRows({migrationRequestId: requestId,migrationLeaseToken: leaseToken,});- revalidatePath("/dashboard/migrations/loom");+ revalidatePath("/dashboard/import/loom");revalidatePath("/dashboard/admin/loom-migrations");return result;} finally {@@ -1506,7 +1506,7 @@ async function startConciergeLoomFileProcessing({processingMessage: "Processing Loom video...",startFailureMessage: "Loom file processing could not start.",});- revalidatePath("/dashboard/migrations/loom");+ revalidatePath("/dashboard/import/loom");revalidatePath("/dashboard/admin/loom-migrations");return { status };} finally {diff --git a/apps/web/app/(org)/dashboard/_components/Navbar/Items.tsx b/apps/web/app/(org)/dashboard/_components/Navbar/Items.tsxindex d5d0ebfe6..7461c2395 100644--- a/apps/web/app/(org)/dashboard/_components/Navbar/Items.tsx+++ b/apps/web/app/(org)/dashboard/_components/Navbar/Items.tsx@@ -111,17 +111,6 @@ const AdminNavItems = ({ toggleMobileNav }: Props) => {icon: <ImportIcon />,subNav: [],},- ...(buildEnv.NEXT_PUBLIC_IS_CAP- ? [- {- name: "Loom Migration",- href: "/dashboard/migrations/loom",- adminOnly: true,- icon: <ImportIcon />,- subNav: [],- },- ]- : []),{name: "Organization Settings",href: `/dashboard/settings/organization`,diff --git a/apps/web/app/(org)/dashboard/import/ImportPage.tsx b/apps/web/app/(org)/dashboard/import/ImportPage.tsxindex 1cf0fe847..9712a3af2 100644--- a/apps/web/app/(org)/dashboard/import/ImportPage.tsx+++ b/apps/web/app/(org)/dashboard/import/ImportPage.tsx@@ -1,34 +1,18 @@"use client";-import { buildEnv } from "@cap/env";-import { faArrowsRotate, faUpload } from "@fortawesome/free-solid-svg-icons";+import { faUpload } from "@fortawesome/free-solid-svg-icons";import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import Link from "next/link";-import { useDashboardContext } from "@/app/(org)/dashboard/Contexts";import {type LoomImportDestination,loomImportPageHref,} from "@/lib/loom-import-destination";-import {- canManageOrganizationSettings,- getEffectiveOrganizationRole,-} from "@/lib/permissions/roles";export const ImportPage = ({initialDestination = {},}: {initialDestination?: LoomImportDestination;}) => {- const { user, activeOrganization } = useDashboardContext();- const currentMember = activeOrganization?.members.find(- (member) => member.userId === user.id,- );- const currentRole = getEffectiveOrganizationRole({- userId: user.id,- ownerId: activeOrganization?.organization.ownerId,- memberRole: currentMember?.role,- });- const canRequestMigration = canManageOrganizationSettings(currentRole);return (<div className="flex flex-col w-full h-full"><div className="mb-8">@@ -87,26 +71,6 @@ export const ImportPage = ({</p></div></Link>- {buildEnv.NEXT_PUBLIC_IS_CAP && canRequestMigration && (- <Link- href="/dashboard/migrations/loom"- className="flex overflow-hidden relative flex-col w-full rounded-xl border transition-all duration-200 group border-gray-3 bg-gray-1 hover:border-blue-10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-8"- >- <div className="flex justify-center items-center w-full h-32 transition-colors duration-200 bg-gray-3 group-hover:bg-gray-4">- <div className="flex justify-center items-center rounded-full transition-all duration-200 size-14 bg-gray-1 text-gray-10 group-hover:text-gray-12 group-hover:scale-110">- <FontAwesomeIcon className="size-5" icon={faArrowsRotate} />- </div>- </div>- <div className="flex flex-col gap-1 p-4">- <p className="text-sm font-medium text-left text-gray-12">- Concierge Loom Migration- </p>- <p className="text-xs text-left text-gray-10">- Let Cap move your Loom workspace. Free with Cap Pro.- </p>- </div>- </Link>- )}</div></div>);diff --git a/apps/web/app/(org)/dashboard/import/loom/ImportLoomPage.tsx b/apps/web/app/(org)/dashboard/import/loom/ImportLoomPage.tsxindex 8e5db52a2..085577b42 100644--- a/apps/web/app/(org)/dashboard/import/loom/ImportLoomPage.tsx+++ b/apps/web/app/(org)/dashboard/import/loom/ImportLoomPage.tsx@@ -67,6 +67,7 @@ import {canManageOrganizationSettings,getEffectiveOrganizationRole,} from "@/lib/permissions/roles";+import { LoomConciergeRow } from "./LoomConciergeRow";type Mode = "single" | "csv";@@ -554,14 +555,6 @@ export const ImportLoomPage = ({? "Bring a single Loom video into Cap, or bulk import recordings for organization members and new users from a CSV.": "Paste a Loom share link to bring it into Cap."}</p>- {buildEnv.NEXT_PUBLIC_IS_CAP && canUseCsvImport && (- <Link- href="/dashboard/migrations/loom"- className="mt-2 inline-block text-sm text-blue-11 underline"- >- Want Cap to move your whole Loom workspace for you?- </Link>- )}</div></div></div>@@ -1062,6 +1055,14 @@ export const ImportLoomPage = ({)}</div>)}++ {buildEnv.NEXT_PUBLIC_IS_CAP &&+ canUseCsvImport &&+ activeOrganization?.organization.id && (+ <LoomConciergeRow+ organizationId={activeOrganization.organization.id}+ />+ )}</div><Dialog open={confirmOpen} onOpenChange={setConfirmOpen}>diff --git a/apps/web/app/(org)/dashboard/import/loom/LoomConciergeRow.tsx b/apps/web/app/(org)/dashboard/import/loom/LoomConciergeRow.tsxnew file mode 100644index 000000000..145440abd--- /dev/null+++ b/apps/web/app/(org)/dashboard/import/loom/LoomConciergeRow.tsx@@ -0,0 +1,286 @@+"use client";++import {+ Button,+ Dialog,+ DialogContent,+ DialogFooter,+ DialogHeader,+ DialogTitle,+ Input,+} from "@cap/ui";+import type { Organisation } from "@cap/web-domain";+import { faPeopleCarryBox } from "@fortawesome/free-solid-svg-icons";+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";+import { useId, useState } from "react";+import { toast } from "sonner";+import {+ answerLoomMigrationQuestion,+ confirmLoomMigrationInvite,+ getLoomMigrationDashboard,+ requestLoomMigration,+} from "@/actions/loom-concierge";+import type { LoomMigrationView } from "@/lib/loom-concierge";+import { unwrapLoomMigrationResult } from "@/lib/loom-migration-state";++const textareaClassName =+ "w-full min-h-20 px-4 py-3 rounded-xl border text-[16px] md:text-[13px] text-gray-12 bg-gray-1 border-gray-4 outline-0 transition-all duration-200 hover:bg-gray-2 hover:border-gray-5 focus:bg-gray-2 focus:border-gray-5 placeholder:text-gray-8";++function statusCopy(request: LoomMigrationView) {+ if (request.status === "completed") {+ const finished = request.completedAt+ ? new Date(request.completedAt).toLocaleDateString()+ : null;+ return {+ title: "Loom migration complete",+ body: `${request.importedVideoCount} ${request.importedVideoCount === 1 ? "video" : "videos"} moved${finished ? ` on ${finished}` : ""}.`,+ };+ }+ if (request.status === "needs_information") {+ return {+ title: "We need a little more information",+ body: "Reply below so we can keep moving your videos.",+ };+ }+ if (request.status === "in_progress") {+ return {+ title: "Moving your Loom videos",+ body: "We'll email you when everything has been checked.",+ };+ }+ if (!request.invitedAt) {+ return {+ title: "Loom migration requested",+ body: "Next, invite [email protected] to your Loom workspace with download permission.",+ };+ }+ return {+ title: "Loom migration requested",+ body: "We'll review your workspace and email you with next steps.",+ };+}++export function LoomConciergeRow({+ organizationId,+}: {+ organizationId: Organisation.OrganisationId;+}) {+ const queryClient = useQueryClient();+ const [dialogOpen, setDialogOpen] = useState(false);+ const [workspaceName, setWorkspaceName] = useState("");+ const [note, setNote] = useState("");+ const [answer, setAnswer] = useState("");+ const workspaceNameId = useId();+ const noteId = useId();+ const answerId = useId();++ const queryKey = ["loom-concierge", organizationId];+ const migrationQuery = useQuery({+ queryKey,+ queryFn: () => getLoomMigrationDashboard(organizationId),+ refetchInterval: 60_000,+ });+ const refresh = () => queryClient.invalidateQueries({ queryKey });++ const requestMutation = useMutation({+ mutationFn: async () =>+ unwrapLoomMigrationResult(+ await requestLoomMigration({ organizationId, workspaceName, note }),+ ),+ onSuccess: async () => {+ await refresh();+ setDialogOpen(false);+ setWorkspaceName("");+ setNote("");+ toast.success("Migration requested");+ },+ onError: (error) => toast.error(error.message),+ });+ const inviteMutation = useMutation({+ mutationFn: async (requestId: string) =>+ unwrapLoomMigrationResult(await confirmLoomMigrationInvite(requestId)),+ onSuccess: async () => {+ await refresh();+ toast.success("Thanks, we'll take it from here");+ },+ onError: (error) => toast.error(error.message),+ });+ const answerMutation = useMutation({+ mutationFn: async (input: { requestId: string; answer: string }) =>+ unwrapLoomMigrationResult(await answerLoomMigrationQuestion(input)),+ onSuccess: async () => {+ setAnswer("");+ await refresh();+ toast.success("Reply sent");+ },+ onError: (error) => toast.error(error.message),+ });++ if (!migrationQuery.data?.isPro) return null;++ const requests = migrationQuery.data.requests;+ const request =+ requests.find((item) => item.status !== "completed") ?? requests[0];+ const copy = request+ ? statusCopy(request)+ : {+ title: "Moving a whole Loom workspace?",+ body: "We'll move it for you, keeping owners and spaces. Included with Cap Pro.",+ };++ return (+ <>+ <div className="flex flex-col gap-4 p-5 rounded-xl border bg-gray-2 border-gray-3">+ <div className="flex flex-col gap-4 justify-between sm:flex-row sm:items-center">+ <div className="flex gap-4 items-start sm:items-center">+ <div className="flex flex-shrink-0 justify-center items-center rounded-lg size-10 bg-gray-3 text-gray-11">+ <FontAwesomeIcon className="size-4" icon={faPeopleCarryBox} />+ </div>+ <div className="flex flex-col gap-1.5">+ <p className="text-sm font-medium text-gray-12">{copy.title}</p>+ <p className="text-xs text-gray-10">{copy.body}</p>+ </div>+ </div>+ {(!request || request.status === "completed") && (+ <Button+ type="button"+ variant="white"+ size="sm"+ className="flex-shrink-0"+ onClick={() => setDialogOpen(true)}+ >+ {request ? "Request another" : "Request migration"}+ </Button>+ )}+ {request?.status === "pending" && !request.invitedAt && (+ <Button+ type="button"+ variant="white"+ size="sm"+ className="flex-shrink-0"+ spinner={inviteMutation.isPending}+ disabled={inviteMutation.isPending}+ onClick={() => inviteMutation.mutate(request.id)}+ >+ I've sent the invite+ </Button>+ )}+ </div>++ {request?.status === "needs_information" && (+ <form+ className="flex flex-col gap-3 sm:pl-14"+ onSubmit={(event) => {+ event.preventDefault();+ answerMutation.mutate({ requestId: request.id, answer });+ }}+ >+ {request.capMessage && (+ <p className="text-sm whitespace-pre-wrap text-gray-12">+ {request.capMessage}+ </p>+ )}+ <label htmlFor={answerId} className="sr-only">+ Your reply+ </label>+ <textarea+ id={answerId}+ className={textareaClassName}+ maxLength={2000}+ placeholder="Your reply"+ value={answer}+ onChange={(event) => setAnswer(event.target.value)}+ />+ <Button+ type="submit"+ variant="dark"+ size="sm"+ className="self-end"+ spinner={answerMutation.isPending}+ disabled={answerMutation.isPending || !answer.trim()}+ >+ Send reply+ </Button>+ </form>+ )}+ </div>++ <Dialog open={dialogOpen} onOpenChange={setDialogOpen}>+ <DialogContent className="w-[calc(100%-20px)] max-w-md">+ <DialogHeader+ icon={+ <FontAwesomeIcon icon={faPeopleCarryBox} className="size-3.5" />+ }+ >+ <DialogTitle>Request Loom migration</DialogTitle>+ </DialogHeader>+ <form+ onSubmit={(event) => {+ event.preventDefault();+ requestMutation.mutate();+ }}+ >+ <div className="flex flex-col gap-4 p-5">+ <p className="text-sm text-gray-11">+ We'll move your Loom videos into this organization. After you+ request, invite [email protected] to your Loom workspace with+ download permission.+ </p>+ <div className="flex flex-col gap-2">+ <label+ htmlFor={workspaceNameId}+ className="text-sm font-medium text-gray-12"+ >+ Loom workspace name+ </label>+ <Input+ id={workspaceNameId}+ maxLength={255}+ placeholder="Optional"+ value={workspaceName}+ onChange={(event) => setWorkspaceName(event.target.value)}+ />+ </div>+ <div className="flex flex-col gap-2">+ <label+ htmlFor={noteId}+ className="text-sm font-medium text-gray-12"+ >+ Notes+ </label>+ <textarea+ id={noteId}+ className={textareaClassName}+ maxLength={2000}+ placeholder="Roughly how many videos, which spaces matter most"+ value={note}+ onChange={(event) => setNote(event.target.value)}+ />+ </div>+ </div>+ <DialogFooter>+ <Button+ type="button"+ size="sm"+ variant="gray"+ onClick={() => setDialogOpen(false)}+ >+ Cancel+ </Button>+ <Button+ type="submit"+ size="sm"+ variant="dark"+ spinner={requestMutation.isPending}+ disabled={requestMutation.isPending}+ >+ Request migration+ </Button>+ </DialogFooter>+ </form>+ </DialogContent>+ </Dialog>+ </>+ );+}diff --git a/apps/web/app/(org)/dashboard/migrations/loom/LoomMigrationPage.tsx b/apps/web/app/(org)/dashboard/migrations/loom/LoomMigrationPage.tsxdeleted file mode 100644index 6c3cd6742..000000000--- a/apps/web/app/(org)/dashboard/migrations/loom/LoomMigrationPage.tsx+++ /dev/null@@ -1,403 +0,0 @@-"use client";--import { Button } from "@cap/ui";-import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";-import { CheckCircle2, CircleHelp, Clock3, LoaderCircle } from "lucide-react";-import Link from "next/link";-import { useId, useState } from "react";-import { toast } from "sonner";-import {- answerLoomMigrationQuestion,- confirmLoomMigrationInvite,- getLoomMigrationDashboard,- requestLoomMigration,-} from "@/actions/loom-concierge";-import { useDashboardContext } from "@/app/(org)/dashboard/Contexts";-import type { LoomMigrationView } from "@/lib/loom-concierge";-import {- LOOM_MIGRATION_STATUS_LABELS,- type LoomMigrationStatus,- unwrapLoomMigrationResult,-} from "@/lib/loom-migration-state";--const STATUS_STYLE: Record<LoomMigrationStatus, string> = {- pending: "bg-amber-500/10 text-amber-600",- in_progress: "bg-blue-3 text-blue-11",- needs_information: "bg-orange-500/10 text-orange-600",- completed: "bg-green-500/10 text-green-600",-};--function MigrationStatus({ request }: { request: LoomMigrationView }) {- return (- <div className="rounded-xl border border-gray-4 bg-gray-1 p-5">- <div className="flex flex-wrap items-center justify-between gap-3">- <div>- <h2 className="text-lg font-medium text-gray-12">Your migration</h2>- <p className="mt-1 text-sm text-gray-10">- Requested on {new Date(request.createdAt).toLocaleDateString()}- {request.workspaceName ? ` for ${request.workspaceName}` : ""}- </p>- </div>- <span- className={`rounded-full px-3 py-1 text-xs font-medium ${STATUS_STYLE[request.status]}`}- >- {LOOM_MIGRATION_STATUS_LABELS[request.status]}- </span>- </div>- {request.status === "pending" && (- <p className="mt-4 text-sm text-gray-11">- Your request is in Cap’s queue. We’ll review your Loom workspace and- confirm the migration plan.- </p>- )}- {request.status === "in_progress" && (- <p className="mt-4 text-sm text-gray-11">- Cap is moving your videos. We’ll mark this complete after checking the- imported library.- </p>- )}- {request.status === "completed" && (- <div className="mt-4 flex items-start gap-3 text-sm text-gray-11">- <CheckCircle2 className="mt-0.5 size-4 shrink-0 text-green-600" />- <div>- <p>Your migration is complete.</p>- {request.expectedVideoCount !== null && (- <p className="mt-1">- {request.importedVideoCount} of {request.expectedVideoCount}{" "}- videos verified in Cap.- </p>- )}- <Link- className="mt-2 inline-block text-blue-11 underline"- href="/dashboard/caps"- >- View your Caps- </Link>- </div>- </div>- )}- {request.capMessage && (- <div className="mt-4 rounded-lg bg-gray-3 p-4 text-sm text-gray-12">- <p className="font-medium">Update from Cap</p>- <p className="mt-1 whitespace-pre-wrap">{request.capMessage}</p>- </div>- )}- {request.customerReply && (- <p className="mt-3 text-xs text-gray-10">- Your latest reply: {request.customerReply}- </p>- )}- </div>- );-}--export function LoomMigrationPage() {- const { activeOrganization, user } = useDashboardContext();- const organizationId = activeOrganization?.organization.id;- const queryClient = useQueryClient();- const [requestFormOpen, setRequestFormOpen] = useState(false);- const [workspaceName, setWorkspaceName] = useState("");- const [note, setNote] = useState("");- const [answer, setAnswer] = useState("");- const answerId = useId();- const workspaceNameId = useId();- const noteId = useId();-- const migrationQuery = useQuery({- queryKey: ["loom-concierge", organizationId],- queryFn: () => {- if (!organizationId) throw new Error("Select a Cap workspace.");- return getLoomMigrationDashboard(organizationId);- },- enabled: Boolean(organizationId),- refetchInterval: 30_000,- });-- const refresh = () =>- queryClient.invalidateQueries({- queryKey: ["loom-concierge", organizationId],- });- const requestMutation = useMutation({- mutationFn: async () => {- if (!organizationId) throw new Error("Select a Cap workspace.");- return unwrapLoomMigrationResult(- await requestLoomMigration({ organizationId, workspaceName, note }),- );- },- onSuccess: async (result) => {- await refresh();- setRequestFormOpen(false);- toast.success(- result.alreadyRequested- ? "Your migration request is already in the queue."- : "Migration requested. Invite [email protected] in Loom next.",- );- },- onError: (error) => toast.error(error.message),- });- const inviteMutation = useMutation({- mutationFn: async (requestId: string) =>- unwrapLoomMigrationResult(await confirmLoomMigrationInvite(requestId)),- onSuccess: async () => {- await refresh();- toast.success("Thanks. Cap can now review your Loom invite.");- },- onError: (error) => toast.error(error.message),- });- const answerMutation = useMutation({- mutationFn: async (input: { requestId: string; answer: string }) =>- unwrapLoomMigrationResult(await answerLoomMigrationQuestion(input)),- onSuccess: async () => {- setAnswer("");- await refresh();- toast.success("Your answer has been sent to Cap.");- },- onError: (error) => toast.error(error.message),- });-- const requests = migrationQuery.data?.requests ?? [];- const activeRequest = requests.find(- (request) => request.status !== "completed",- );- const completedRequest = requests.find(- (request) => request.status === "completed",- );- const isPro = migrationQuery.data?.isPro ?? false;-- return (- <div className="flex w-full max-w-5xl flex-col gap-6">- <div>- <p className="text-xs font-medium uppercase tracking-wide text-blue-11">- Switch from Loom- </p>- <h1 className="mt-2 text-2xl font-medium text-gray-12">- Move your Loom library to Cap- </h1>- <p className="mt-2 max-w-2xl text-sm text-gray-10">- Import it yourself, or let Cap handle the move. Concierge migration is- included with Cap Pro at no extra cost.- </p>- </div>-- {!organizationId && (- <p className="rounded-lg border border-gray-4 bg-gray-1 p-4 text-sm text-gray-10">- Select a Cap workspace to request a Loom migration.- </p>- )}- {organizationId && migrationQuery.isPending && (- <div className="flex items-center gap-2 text-sm text-gray-10">- <LoaderCircle className="size-4 animate-spin" /> Loading your- migration…- </div>- )}- {migrationQuery.isError && (- <div className="rounded-lg border border-red-400/30 bg-red-400/10 p-4 text-sm text-red-400">- Could not load your migration. {migrationQuery.error.message}- <button- className="ml-2 underline"- onClick={() => migrationQuery.refetch()}- type="button"- >- Try again- </button>- </div>- )}-- {activeRequest && <MigrationStatus request={activeRequest} />}- {!activeRequest && completedRequest && (- <MigrationStatus request={completedRequest} />- )}-- {activeRequest && !activeRequest.invitedAt && (- <div className="rounded-xl border border-blue-6 bg-blue-2 p-5">- <div className="flex items-start gap-3">- <Clock3 className="mt-0.5 size-5 shrink-0 text-blue-11" />- <div>- <h2 className="font-medium text-gray-12">- One step left: invite Cap to Loom- </h2>- <p className="mt-2 text-sm text-gray-11">- In your Loom workspace settings, invite{" "}- <strong>[email protected]</strong> with video access and download- permission. Some private Library videos need access shared- separately. If we find any, we’ll ask you here. You can keep- using Loom until we confirm the migration is complete.- </p>- <a- className="mt-2 inline-block text-sm text-blue-11 underline"- href="https://support.atlassian.com/loom/docs/add-remove-and-manage-members-in-your-workspace/"- rel="noreferrer"- target="_blank"- >- Loom’s workspace invite steps- </a>- <Button- className="mt-4"- disabled={inviteMutation.isPending}- onClick={() => inviteMutation.mutate(activeRequest.id)}- size="sm"- variant="dark"- >- I sent the Loom invite- </Button>- </div>- </div>- </div>- )}- {activeRequest?.invitedAt && activeRequest.status !== "completed" && (- <p className="text-sm text-gray-10">- Loom invite marked as sent. Cap will take it from here.- </p>- )}- {activeRequest?.status === "needs_information" && (- <form- className="rounded-xl border border-orange-500/30 bg-orange-500/5 p-5"- onSubmit={(event) => {- event.preventDefault();- answerMutation.mutate({ requestId: activeRequest.id, answer });- }}- >- <div className="flex items-center gap-2 font-medium text-gray-12">- <CircleHelp className="size-5 text-orange-600" /> Cap needs a little- more information- </div>- <label className="mt-4 block text-sm text-gray-11" htmlFor={answerId}>- Your answer- </label>- <textarea- className="mt-2 min-h-24 w-full rounded-lg border border-gray-6 bg-gray-1 p-3 text-sm text-gray-12"- id={answerId}- maxLength={2000}- onChange={(event) => setAnswer(event.target.value)}- value={answer}- />- <Button- disabled={answerMutation.isPending || !answer.trim()}- size="sm"- type="submit"- variant="dark"- >- Send answer- </Button>- </form>- )}-- <div className="grid gap-5 md:grid-cols-2">- <div className="rounded-xl border border-gray-4 bg-gray-1 p-5">- <h2 className="text-lg font-medium text-gray-12">Do it yourself</h2>- <p className="mt-2 text-sm text-gray-10">- Best when you already have a list of Loom links and video owners.- </p>- <ol className="mt-4 list-inside list-decimal space-y-2 text-sm text-gray-11">- <li>- Prepare a CSV with loom_video_url and user_email. space_name is- optional.- </li>- <li>- Upload up to 500 videos per CSV and review the owner mapping.- </li>- <li>- Check the import results and your Cap library before leaving Loom.- </li>- </ol>- {user.isPro ? (- <Link- className="mt-5 inline-block rounded-lg bg-gray-12 px-4 py-2 text-sm text-gray-1"- href="/dashboard/import/loom?mode=csv"- >- Open CSV importer- </Link>- ) : (- <p className="mt-5 text-sm text-gray-10">- The self-service importer requires your own Cap Pro account.- </p>- )}- </div>- <div className="rounded-xl border border-blue-6 bg-blue-2 p-5">- <div className="flex items-center justify-between gap-2">- <h2 className="text-lg font-medium text-gray-12">- Cap handles it for you- </h2>- <span className="rounded-full bg-blue-4 px-2 py-1 text-xs text-blue-11">- Free with Pro- </span>- </div>- <p className="mt-2 text-sm text-gray-11">- Request the migration and invite [email protected] to Loom. We’ll- inventory, move, and verify your videos. No CSV preparation needed.- If Loom restricts a video, we’ll ask for the specific access we- need.- </p>- {!migrationQuery.isPending && !migrationQuery.isError && !isPro && (- <div className="mt-5 text-sm text-gray-11">- Your organization owner needs Cap Pro to request this service.- <Link- className="ml-1 text-blue-11 underline"- href="/dashboard/settings/organization/billing"- >- View billing- </Link>- </div>- )}- {isPro && !activeRequest && !requestFormOpen && (- <Button- className="mt-5"- onClick={() => setRequestFormOpen(true)}- size="sm"- variant="dark"- >- Enable concierge migration- </Button>- )}- {isPro && !activeRequest && requestFormOpen && (- <form- className="mt-5 space-y-4"- onSubmit={(event) => {- event.preventDefault();- requestMutation.mutate();- }}- >- <div>- <label- className="text-sm text-gray-12"- htmlFor={workspaceNameId}- >- Loom workspace name{" "}- <span className="text-gray-10">(optional)</span>- </label>- <input- className="mt-2 w-full rounded-lg border border-gray-6 bg-gray-1 px-3 py-2 text-sm text-gray-12"- id={workspaceNameId}- maxLength={255}- onChange={(event) => setWorkspaceName(event.target.value)}- value={workspaceName}- />- </div>- <div>- <label className="text-sm text-gray-12" htmlFor={noteId}>- Anything we should know?{" "}- <span className="text-gray-10">(optional)</span>- </label>- <textarea- className="mt-2 min-h-20 w-full rounded-lg border border-gray-6 bg-gray-1 p-3 text-sm text-gray-12"- id={noteId}- maxLength={2000}- onChange={(event) => setNote(event.target.value)}- value={note}- />- </div>- <Button- disabled={requestMutation.isPending}- size="sm"- type="submit"- variant="dark"- >- Request migration- </Button>- </form>- )}- </div>- </div>- </div>- );-}diff --git a/apps/web/app/(org)/dashboard/migrations/loom/page.tsx b/apps/web/app/(org)/dashboard/migrations/loom/page.tsxindex bb06782ed..14b7a491c 100644--- a/apps/web/app/(org)/dashboard/migrations/loom/page.tsx+++ b/apps/web/app/(org)/dashboard/migrations/loom/page.tsx@@ -1,10 +1,5 @@-import type { Metadata } from "next";-import { LoomMigrationPage } from "./LoomMigrationPage";--export const metadata: Metadata = {- title: "Loom Migration — Cap",-};+import { redirect } from "next/navigation";export default function Page() {- return <LoomMigrationPage />;+ redirect("/dashboard/import/loom");}diff --git a/apps/web/content/docs/migrating-to-cap.mdx b/apps/web/content/docs/migrating-to-cap.mdxindex dcc74ca84..0054bdfd8 100644--- a/apps/web/content/docs/migrating-to-cap.mdx+++ b/apps/web/content/docs/migrating-to-cap.mdx@@ -14,19 +14,18 @@ A successful migration is not just a count of accepted URLs. It preserves owners|---------|------------------|| One Loom video | Paste the Loom URL in **Dashboard > Import > Loom** || Up to 500 mapped videos | Use the organization CSV importer |-| A library you want Cap to move for you | Request the free Cap Pro concierge migration in **Dashboard > Loom Migration** |+| A library you want Cap to move for you | Request the free Cap Pro concierge migration in **Dashboard > Import > Loom** || More than 500 videos or a complex hierarchy | Request concierge migration or run controlled batches with an agent |Loom import is a Cap Pro feature. Bulk CSV import is available to organization owners and admins. Concierge migration is included at no extra cost when the Cap organization owner has Pro.## Request concierge migration-1. Open **Dashboard > Loom Migration** and select your Cap organization.-2. Choose **Enable concierge migration**, then **Request migration**. The request enters Cap's queue as **Pending**.-3. Invite [[email protected]](mailto:[email protected]) to your Loom workspace with access and download permission for the videos you want moved, then mark the invite as sent in Cap.-4. Cap inventories the source, maps owners and spaces, imports in batches, and checks the destination. The dashboard shows **In progress** while this is underway.-5. If a video needs separate access or another detail, the dashboard shows **Information needed** with Cap's exact request. Reply there so the migration can continue.-6. Cap marks **Migration complete** only after the agreed source count and imported library are reconciled and checked. Keep Loom available until that confirmation.+1. Open **Dashboard > Import > Loom** in the Cap organization you are moving to, then choose **Request migration**.+2. Invite [[email protected]](mailto:[email protected]) to your Loom workspace with access and download permission for the videos you want moved, then choose **I've sent the invite**.+3. Cap inventories the source, maps owners and spaces, imports in batches, and checks the destination.+4. If a video needs separate access or another detail, the Loom import page shows Cap's exact request. Reply there so the migration can continue.+5. Cap marks the migration complete only after the agreed source count and imported library are reconciled and checked. Keep Loom available until that confirmation.Loom workspace membership may not expose private Library videos automatically. An account without Loom download rights also cannot export every video. Cap will ask for specific access when the workspace invite does not cover a source video.