- Add drag-to-resize sidebar with localStorage persistence - Rewrite issue detail page with Tiptap rich text editor, due date picker, acceptance criteria - Redesign create-issue modal with pill-based property toolbar and expand/collapse - Consolidate @multica/sdk and @multica/types into apps/web/shared/ - Simplify auth: remove verification codes, PATs, email service (dev-only login) - Add 401 unauthorized handler to redirect expired sessions to login - Fix due date format to send full RFC3339 timestamps - Increase description editor debounce to 1500ms - Remove arbitrary Tailwind values in create-issue modal - Renumber migrations (inbox_actor 012→009), remove unused migrations - UI polish across agents, settings, inbox, knowledge-base pages Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
50 lines
1.3 KiB
TypeScript
50 lines
1.3 KiB
TypeScript
"use client";
|
|
|
|
import { useState } from "react";
|
|
import type { IssueStatus, UpdateIssueRequest } from "@/shared/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 shrink-0" />
|
|
<span className="truncate">{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>
|
|
);
|
|
}
|