## Store migration (packages → features) - Delete `packages/store/` — stores moved into web app's feature modules - Delete `packages/hooks/` — replaced by feature-level hooks - `features/issues/store.ts` — useIssueStore (was packages/store/issue-store) - `features/inbox/store.ts` — useInboxStore (was packages/store/inbox-store) - `features/workspace/store.ts` — absorbs agent state (was packages/store/agent-store) - All imports updated from `@multica/store` → `@/features/*/store` ## Global modal system - `features/modals/store.ts` — useModalStore (zustand) - `features/modals/registry.tsx` — ModalRegistry renders active modal - Mounted in app/layout.tsx alongside Toaster - Create Workspace dialog now works (was broken: DropdownMenu ate click) ## Workspace real-time sync - useRealtimeSync subscribes to workspace:updated, member:removed - Member removal → auto-switch to another workspace - Workspace settings update → sidebar reflects name change - Workspace switch → parallel fetch issues + inbox + agents ## Bug fixes - theme-provider: guard event.key for IME composition (isComposing check) - task.go: publish comment:created + inbox:new events on task complete/fail - listeners.go: broadcast comment:created, workspace:updated, member events - events.go: add EventCommentUpdated, EventCommentDeleted constants ## Cleanup - Remove _features/ tracking files (dev-only, not for main) - Remove server/server binary from worktree - Update CLAUDE.md to reflect new architecture Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
19 lines
504 B
TypeScript
19 lines
504 B
TypeScript
"use client";
|
|
|
|
import { create } from "zustand";
|
|
|
|
type ModalType = "create-workspace" | "create-issue" | 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 }),
|
|
}));
|