Add search functionality to quickly find issues by title: - Backend: add search param (ILIKE) to ListIssues query - Frontend: search modal using CommandDialog with skeleton loading - Sidebar: ghost-style search button next to create issue button - Handle CJK input method composition to avoid premature searches - Responsive max-height for small screens Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
19 lines
522 B
TypeScript
19 lines
522 B
TypeScript
"use client";
|
|
|
|
import { create } from "zustand";
|
|
|
|
type ModalType = "create-workspace" | "create-issue" | "search-issues" | null;
|
|
|
|
interface ModalStore {
|
|
modal: ModalType;
|
|
data: Record<string, unknown> | null;
|
|
open: (modal: NonNullable<ModalType>, data?: Record<string, unknown> | null) => void;
|
|
close: () => void;
|
|
}
|
|
|
|
export const useModalStore = create<ModalStore>((set) => ({
|
|
modal: null,
|
|
data: null,
|
|
open: (modal, data = null) => set({ modal, data }),
|
|
close: () => set({ modal: null, data: null }),
|
|
}));
|