diff --git a/.context/app/questionnaire/ingestion.md b/.context/app/questionnaire/ingestion.md index 9335efe3..f08b3292 100644 --- a/.context/app/questionnaire/ingestion.md +++ b/.context/app/questionnaire/ingestion.md @@ -1,9 +1,11 @@ # Questionnaire — document ingestion > How an uploaded document becomes a populated questionnaire graph. Built by -> **F1.1** ([`../planning/features/f1.1.md`](../planning/features/f1.1.md)); -> **API-only** — the review/edit UI is P2. Every surface here is gated by -> `APP_QUESTIONNAIRES_ENABLED` (seeded off). +> **F1.1** ([`../planning/features/f1.1.md`](../planning/features/f1.1.md)); the +> review/edit UI is P2. Admins drive ingestion from the `UploadQuestionnaireDialog` +> on `/admin/questionnaires` (header button + empty-state CTA), which POSTs to the +> endpoint below. Every surface here is gated by `APP_QUESTIONNAIRES_ENABLED` +> (seeded off). ## The endpoint diff --git a/app/admin/questionnaires/page.tsx b/app/admin/questionnaires/page.tsx index 0ccab5b7..efcfaec3 100644 --- a/app/admin/questionnaires/page.tsx +++ b/app/admin/questionnaires/page.tsx @@ -2,6 +2,7 @@ import type { Metadata } from 'next'; import { notFound } from 'next/navigation'; import { QuestionnairesTable } from '@/components/admin/questionnaires/questionnaires-table'; +import { UploadQuestionnaireDialog } from '@/components/admin/questionnaires/upload-questionnaire-dialog'; import { FieldHelp } from '@/components/ui/field-help'; import { API } from '@/lib/api/endpoints'; import { parseApiResponse, serverFetch } from '@/lib/api/server-fetch'; @@ -51,28 +52,31 @@ export default async function QuestionnairesListPage() { return (
- A questionnaire is a structured set of sections and questions an end user completes - through a streaming conversation rather than a form. An admin ingests a source - document (PDF / DOCX / MD / TXT) and an agent extracts its structure. -
-This page
-- Browse every ingested questionnaire with its latest version and structure counts. - Click a row to view its versions and full section / question graph. -
-- Ingest, review, and edit conversational questionnaires. -
++ A questionnaire is a structured set of sections and questions an end user completes + through a streaming conversation rather than a form. An admin ingests a source + document (PDF / DOCX / MD / TXT) and an agent extracts its structure. +
+This page
++ Browse every ingested questionnaire with its latest version and structure counts. + Click a row to view its versions and full section / question graph. +
++ Ingest, review, and edit conversational questionnaires. +
+POST /api/v1/app/questionnaires to create one.
+ + No questionnaires yet. Upload a document to create your first one. +
+