- Remove tab system entirely (tab-store, tab-bar, tab-link) - Split monolithic AuthContext into zustand auth + workspace stores - Move issue components/config to features/issues/ - Move WebSocket provider to features/realtime/ - Move api.ts to shared/ - Migrate all consumers from useAuth() to direct store imports - Simplify sidebar: replace hand-built dropdown with shadcn DropdownMenu, replace custom layout wrapper with SidebarInset - Remove unused @multica/store and @multica/hooks dependencies - Add @/ path alias and zustand dependency - Update CLAUDE.md with feature-based architecture conventions Net change: +293 / -2435 lines Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
50 lines
1.2 KiB
TypeScript
50 lines
1.2 KiB
TypeScript
"use client";
|
|
|
|
import { useState } from "react";
|
|
import type { IssueStatus, UpdateIssueRequest } from "@multica/types";
|
|
import { ALL_STATUSES, STATUS_CONFIG } from "@/features/issues/config";
|
|
import { StatusIcon } from "../status-icon";
|
|
import { PropertyPicker, PickerItem } from "./property-picker";
|
|
|
|
export function StatusPicker({
|
|
status,
|
|
onUpdate,
|
|
}: {
|
|
status: IssueStatus;
|
|
onUpdate: (updates: Partial<UpdateIssueRequest>) => void;
|
|
}) {
|
|
const [open, setOpen] = useState(false);
|
|
const cfg = STATUS_CONFIG[status];
|
|
|
|
return (
|
|
<PropertyPicker
|
|
open={open}
|
|
onOpenChange={setOpen}
|
|
width="w-44"
|
|
trigger={
|
|
<>
|
|
<StatusIcon status={status} className="h-3.5 w-3.5" />
|
|
<span>{cfg.label}</span>
|
|
</>
|
|
}
|
|
>
|
|
{ALL_STATUSES.map((s) => {
|
|
const c = STATUS_CONFIG[s];
|
|
return (
|
|
<PickerItem
|
|
key={s}
|
|
selected={s === status}
|
|
hoverClassName={c.hoverBg}
|
|
onClick={() => {
|
|
onUpdate({ status: s });
|
|
setOpen(false);
|
|
}}
|
|
>
|
|
<StatusIcon status={s} className="h-3.5 w-3.5" />
|
|
<span>{c.label}</span>
|
|
</PickerItem>
|
|
);
|
|
})}
|
|
</PropertyPicker>
|
|
);
|
|
}
|