4.4 KiB
4.4 KiB
phase, plan, type, wave, depends_on, files_modified, autonomous, requirements, must_haves
| phase | plan | type | wave | depends_on | files_modified | autonomous | requirements | must_haves | |||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 19-template-editor-ui | 03 | execute | 3 |
|
false |
|
|
Purpose: Confirm the template editor UI works end-to-end before marking Phase 19 complete.
Output: Human sign-off on all 5 requirements.
<execution_context> @$HOME/.claude/get-shit-done/workflows/execute-plan.md </execution_context>
@.planning/phases/19-template-editor-ui/19-CONTEXT.md @.planning/phases/19-template-editor-ui/19-01-SUMMARY.md @.planning/phases/19-template-editor-ui/19-02-SUMMARY.md Task 1: Full Phase 19 human verification — template editor E2E Human verifies all TMPL-05 through TMPL-09 requirements in a single 9-step browser test.What was built:
- Templates list page at /portal/templates with create-template modal
- Template editor page at /portal/templates/[id] with FieldPlacer + TemplatePanel
- AI auto-place for templates via POST /api/templates/[id]/ai-prepare
- Signer role label system (Buyer/Seller instead of emails)
- Text hint support on client-text fields
- Save via PATCH /api/templates/[id]
- Three supporting API routes (file, fields, ai-prepare)
- "Templates" link in portal nav
Ensure the dev server is running: `cd teressa-copeland-homes && npm run dev`
**Step 1 — Nav link (TMPL-05 prereq):**
Visit http://localhost:3000/portal/dashboard. Confirm "Templates" appears in the top nav between "Clients" and "Profile". Click it.
**Step 2 — Templates list page:**
Confirm the list page loads at /portal/templates. If empty, verify the empty state message "No templates yet" is shown.
**Step 3 — Create a template:**
Click "+ New Template". In the modal, enter a name (e.g. "Test Listing Agreement") and select a form from the dropdown. Click "Create Template". Verify redirect to the editor page.
**Step 4 — TMPL-05: Drag-drop fields:**
On the editor page, verify the PDF is displayed on the left and TemplatePanel is on the right. Drag a "Signature" token from the palette onto the PDF. Verify it appears at the drop location. Drag a "Text" token. Verify it also appears.
**Step 5 — TMPL-07: Signer role labels:**
Verify "Signers / Roles" section shows "Buyer" and "Seller" by default. Place a field while "Buyer" is the active role. Verify the field appears with the Buyer color. Add a custom role (e.g. "Lender") using the Add Role input. Verify no email validation error occurs.
**Step 6 — TMPL-06: AI Auto-place:**
Click "AI Auto-place Fields". Wait for the spinner. Verify fields appear on the PDF after completion. (Requires OPENAI_API_KEY in .env.local — skip if not configured and note in feedback.)
**Step 7 — TMPL-08: Text hints:**
Click on a placed text field. Type a hint value (e.g. "Enter property address"). Click "Save Template". Refresh the page (Ctrl+R). Verify the hint value is still displayed in the text field.
**Step 8 — TMPL-09: Save persists:**
After placing several fields and saving, refresh the page. Verify all field positions, types, and role assignments are preserved. Verify the template name is preserved.
**Step 9 — Templates list page verification:**
Navigate back to /portal/templates. Verify the template you created appears in the list with the correct name, form name, field count, and a recent "last updated" date.
Human confirms all 9 verification steps pass. All TMPL-05 through TMPL-09 requirements satisfied. Phase 19 is complete.
All 5 requirements (TMPL-05 through TMPL-09) verified by human in a single 9-step live browser test.
<success_criteria> Human confirms all 9 verification steps pass. Phase 19 is complete. </success_criteria>
After completion, create `.planning/phases/19-template-editor-ui/19-03-SUMMARY.md`