feat(HAI-003): replace CreateTaskModal with inline card creation in Todo column

- Create InlineCreateCard component with auto-focused input, dependency
  dropdown, Enter to submit, Escape to cancel
- Update Column to render InlineCreateCard at top of Todo column body
- Update Board to pass through inline-create props to Todo column
- Update App to use isCreating state instead of createModalOpen
- Add CSS styles for inline create card, dependency dropdown
- Delete CreateTaskModal component
This commit is contained in:
Dustin Byrne
2026-03-25 19:37:01 -04:00
parent 020cca3399
commit 28ee12d3c8
6 changed files with 239 additions and 136 deletions

View File

@@ -1,4 +1,4 @@
import type { Task, TaskDetail, Column as ColumnType } from "@hai/core";
import type { Task, TaskDetail, TaskCreateInput, Column as ColumnType } from "@hai/core";
import { COLUMNS } from "@hai/core";
import { Column } from "./Column";
import type { ToastType } from "../hooks/useToast";
@@ -9,9 +9,12 @@ interface BoardProps {
onMoveTask: (id: string, column: ColumnType) => Promise<Task>;
onOpenDetail: (task: TaskDetail) => void;
addToast: (message: string, type?: ToastType) => void;
isCreating: boolean;
onCancelCreate: () => void;
onCreateTask: (input: TaskCreateInput) => Promise<Task>;
}
export function Board({ tasks, maxConcurrent, onMoveTask, onOpenDetail, addToast }: BoardProps) {
export function Board({ tasks, maxConcurrent, onMoveTask, onOpenDetail, addToast, isCreating, onCancelCreate, onCreateTask }: BoardProps) {
return (
<main className="board" id="board">
{COLUMNS.map((col) => (
@@ -24,6 +27,7 @@ export function Board({ tasks, maxConcurrent, onMoveTask, onOpenDetail, addToast
onMoveTask={onMoveTask}
onOpenDetail={onOpenDetail}
addToast={addToast}
{...(col === "todo" ? { isCreating, onCancelCreate, onCreateTask } : {})}
/>
))}
</main>