Context
Form lifecycle management is incomplete: old/botched forms pile up forever, forms can't be renamed after creation, and a "draft" is not actually hidden from applicants (the New Form dialog promises otherwise).
Current behavior
- No delete/archive: no
deleteForm/archive action; forms list only offers New Form + Clone. Prisma forms has no archived flag; deleting a form cascades submissions (schema.prisma, onDelete: Cascade).
- No rename:
updateForm accepts title (unique column) but no UI passes it; title is read-only in list + header.
- Draft ≠ invisible:
draft in config.application only locks the Questions builder. isFormOpen() (src/lib/utils/forms/helpers.ts) checks dates only; apply/page.tsx and startApplication never check draft. A draft with no dates set is treated as open and reachable by URL.
- New Form dialog copy ("Nothing is visible to applicants until you launch it") is inaccurate today.
Desired behavior
- Delete with guardrails: confirm dialog explaining cascade (submissions + related rows), archive alternative so past forms remain queryable.
- Rename affordance on the Questions/Builder page header (and/or list row) writing via
updateForm.
- Draft visibility: applicants must not be able to reach or start a draft form (
isFormOpen and/or entry pages consult the draft flag). Launch flips it off.
- Clarify dialog copy and the "Launched" chip on the Questions page accordingly.
Acceptance criteria
Context
Form lifecycle management is incomplete: old/botched forms pile up forever, forms can't be renamed after creation, and a "draft" is not actually hidden from applicants (the New Form dialog promises otherwise).
Current behavior
deleteForm/archive action; forms list only offers New Form + Clone. Prismaformshas noarchivedflag; deleting a form cascades submissions (schema.prisma,onDelete: Cascade).updateFormacceptstitle(unique column) but no UI passes it; title is read-only in list + header.draftinconfig.applicationonly locks the Questions builder.isFormOpen()(src/lib/utils/forms/helpers.ts) checks dates only;apply/page.tsxandstartApplicationnever checkdraft. A draft with no dates set is treated as open and reachable by URL.Desired behavior
updateForm.isFormOpenand/or entry pages consult the draft flag). Launch flips it off.Acceptance criteria