From 8888acb2c6643abb68c687aa24d9077ebeeb9e6d Mon Sep 17 00:00:00 2001 From: Dave Date: Thu, 17 Sep 2026 08:13:24 +0200 Subject: [PATCH] fix(tests): stop the settings test destroying the configured API key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test overwrote ai_api_key with a marker and then restored it to "" rather than to its previous value, so every run of the integration suite silently wiped the AI provider key. Symptom appears much later and looks nothing like a test problem: AI features quietly stop working. Captures the existing value first and restores it in a finally block, so a failed assertion cannot leave the marker in place either. Deletes the record instead when the test created it. The suite runs against the shared instance — there is no separate test database — so anything it touches, it must put back exactly. feat(board): give the owner both a quick box and Plan with AI The Phase 4 spec made the intake wizard client-facing only, reasoning that the developer creates cards directly. That was wrong about how he wants to work. The quick box stays the default for lines he already understands; Plan with AI runs the same interview for work that is genuinely unformed. Hidden entirely when no provider is configured. Co-Authored-By: Claude Opus 5 --- src/components/board/board.tsx | 6 +- src/components/intake/owner-add.tsx | 81 +++++++++++++++++++++++++++ tests/integration/ai-settings.test.ts | 34 ++++++++--- 3 files changed, 111 insertions(+), 10 deletions(-) create mode 100644 src/components/intake/owner-add.tsx diff --git a/src/components/board/board.tsx b/src/components/board/board.tsx index 40f7b28..927edae 100644 --- a/src/components/board/board.tsx +++ b/src/components/board/board.tsx @@ -19,7 +19,7 @@ import { } from "@dnd-kit/sortable"; import { CSS } from "@dnd-kit/utilities"; -import { AddCard } from "@/components/board/add-card"; +import { OwnerAdd } from "@/components/intake/owner-add"; import { BoardColumn } from "@/components/board/board-column"; import { CardTile } from "@/components/board/card-tile"; import { ClientCardControls } from "@/components/board/client-card-controls"; @@ -261,8 +261,8 @@ export function Board({ ))} {role === "owner" && ( -