feat(KB-074): add quick task creation with QuickEntryBox and NewTaskModal

- Add QuickEntryBox component for inline quick task entry in columns
- Add NewTaskModal component with full-featured task creation UI
- Integrate quick create flow through Column → Board → App component hierarchy
- Add comprehensive tests for both new components and updated existing tests
- Add CSS styles for modal, form inputs, and quick entry UI
- Include changeset for @dustinbyrne/kb package release
This commit is contained in:
gsxdsm
2026-03-29 22:40:04 -07:00
parent 99fdc26760
commit bdb4eb782d
11 changed files with 1379 additions and 35 deletions

View File

@@ -10,8 +10,8 @@ vi.mock("../TaskCard", () => ({
vi.mock("../WorktreeGroup", () => ({
WorktreeGroup: () => <div />,
}));
vi.mock("../InlineCreateCard", () => ({
InlineCreateCard: () => <div />,
vi.mock("../QuickEntryBox", () => ({
QuickEntryBox: () => <div data-testid="quick-entry-box" />,
}));
vi.mock("lucide-react", () => ({
Link: () => null,
@@ -75,3 +75,23 @@ describe("Column count-flash", () => {
expect(badge.className).not.toContain("count-flash");
});
});
describe("Column QuickEntryBox", () => {
it("renders QuickEntryBox in triage column when onQuickCreate is provided", () => {
const tasks = [makeTask("KB-001")];
render(<Column {...defaultProps} tasks={tasks} onQuickCreate={vi.fn()} />);
expect(screen.getByTestId("quick-entry-box")).toBeTruthy();
});
it("does not render QuickEntryBox in triage column when onQuickCreate is not provided", () => {
const tasks = [makeTask("KB-001")];
render(<Column {...defaultProps} tasks={tasks} />);
expect(screen.queryByTestId("quick-entry-box")).toBeNull();
});
it("does not render QuickEntryBox in non-triage columns", () => {
const tasks = [makeTask("KB-001")];
render(<Column {...defaultProps} tasks={tasks} column="todo" onQuickCreate={vi.fn()} />);
expect(screen.queryByTestId("quick-entry-box")).toBeNull();
});
});