feat: add command palette with cross-board search and actions

This commit is contained in:
Your Name
2026-02-15 19:12:49 +02:00
parent b527d441e3
commit 5b3bf2b058
5 changed files with 283 additions and 4 deletions

View File

@@ -41,6 +41,20 @@ export function BoardView() {
const [newColumnTitle, setNewColumnTitle] = useState("");
const inputRef = useRef<HTMLInputElement>(null);
// Listen for custom event to open card detail from command palette
useEffect(() => {
function handleOpenCard(e: Event) {
const detail = (e as CustomEvent<{ cardId: string }>).detail;
if (detail?.cardId) {
setSelectedCardId(detail.cardId);
}
}
document.addEventListener("open-card-detail", handleOpenCard);
return () => {
document.removeEventListener("open-card-detail", handleOpenCard);
};
}, []);
// Drag state
const [activeId, setActiveId] = useState<string | null>(null);
const [activeType, setActiveType] = useState<"card" | "column" | null>(null);