From cb19b2df556ed5f4fd2764a5ee51541ac34f1928 Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Wed, 27 May 2026 23:53:49 +0200 Subject: [PATCH] feat(defects): file a defect via a board-section modal (T5) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit POST /api/defects validates the body with arktype (known section, uuid project, non-empty trimmed verbatim) and resolves the reporter through a dev seam (getReporter, ADR 0002) until OAuth lands. DefectForm is a DaisyUI modal opened by a section click — pick a project, describe the problem, submit. --- app/components/DefectForm.vue | 114 +++++++++++++++++++++++++++++++++ app/pages/index.vue | 34 ++++++++-- server/api/defects.post.ts | 15 +++++ server/utils/defectInput.ts | 17 +++++ server/utils/getReporter.ts | 10 +++ tasks/todo.md | 2 +- tests/defect-filing.spec.ts | 80 +++++++++++++++++++++++ tests/defect-form.nuxt.spec.ts | 73 +++++++++++++++++++++ 8 files changed, 337 insertions(+), 8 deletions(-) create mode 100644 app/components/DefectForm.vue create mode 100644 server/api/defects.post.ts create mode 100644 server/utils/defectInput.ts create mode 100644 server/utils/getReporter.ts create mode 100644 tests/defect-filing.spec.ts create mode 100644 tests/defect-form.nuxt.spec.ts diff --git a/app/components/DefectForm.vue b/app/components/DefectForm.vue new file mode 100644 index 0000000..db79d4e --- /dev/null +++ b/app/components/DefectForm.vue @@ -0,0 +1,114 @@ + + +