Phase F8: Note Editing

phase-pal-e-docs-note-editing Phase

phase
Goal: Allow authenticated users to edit existing notes from the browser.
Owner: Dev agent
Repo: forgejo_admin/pal-e-app
Depends on: Phase F5 (auth) — COMPLETED

Scope

  • PUT proxy: src/routes/api/notes/[slug]/+server.ts — authenticated, forwards to backend PUT /notes/{slug}
  • Edit page: /notes/[slug]/edit with form for title, body (raw HTML textarea), note_type (all 16 types), dynamic status per note_type, project dropdown, tags (comma-separated), parent_slug
  • Edit button on NoteLayout component (visible only to authenticated users)
  • updateNote(slug, data) function in api.ts
  • Session data plumbed through +page.server.ts to NoteLayout via isAuthenticated prop

Deliverables

  • PR #30 MERGEDfeat: note editing (edit form + PUT proxy + Edit button)
  • Issue #27 closed
  • 7 files changed (498 additions, 4 deletions)
  • QA approved with 3 nits (non-blocking)

QA Nits (Epilogue)

  • Use API response slug for redirect after save (future-proofs slug editing)
  • E2E tests for edit flow
  • Rebase overlap cleanup (cosmetic)
  • plan-pal-e-docs — parent plan
  • phase-pal-e-docs-private-notes — F6, sibling phase
  • phase-pal-e-docs-frontend-auth — F5, dependency