feat(22-02): build AddToThreadModal with thread picker and new thread flow

- Create AddToThreadModal with pick/create modes for thread selection
- Support existing thread selection with category display
- Support new thread creation with candidate in one step
- Pre-select session thread via catalogSessionThreadId
- Auto-switch to create mode when no active threads exist
- Wire AddToThreadModal at root layout level
This commit is contained in:
2026-04-06 16:00:34 +02:00
parent e8b7907a22
commit c33b7c7bdc
2 changed files with 292 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ import { useState } from "react";
import { Toaster } from "sonner";
import "../app.css";
import { AddToCollectionModal } from "../components/AddToCollectionModal";
import { AddToThreadModal } from "../components/AddToThreadModal";
import { CatalogSearchOverlay } from "../components/CatalogSearchOverlay";
import { ConfirmDialog } from "../components/ConfirmDialog";
import { ExternalLinkDialog } from "../components/ExternalLinkDialog";
@@ -208,6 +209,8 @@ function RootLayout() {
{/* Add to Collection Modal */}
<AddToCollectionModal />
{/* Add to Thread Modal */}
<AddToThreadModal />
<Toaster position="bottom-right" richColors />
{/* Onboarding Wizard */}