feat: Note editing (edit form + PUT proxy + Edit button) #27
Labels
No labels
domain:backend
domain:devops
domain:frontend
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/pal-e-docs-app#27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Lineage
plan-pal-e-docs→ Phase F8 (Note Editing)Repo
forgejo_admin/pal-e-appUser Story
As an authenticated pal-e-app user
I want to edit existing notes from the browser
So that I can update titles, content, tags, and metadata without using the API directly
Context
Notes can be created via Quick-Jot but cannot be edited from the browser. The backend PUT /notes/{slug} endpoint exists and fully works — it supports title, slug, html_content, is_public, project_slug, tags, note_type, status, parent_slug, and position updates. The backend also auto-creates revisions when html_content changes. The frontend just needs an edit form + API proxy.
File Targets
Files to create:
src/routes/api/notes/[slug]/+server.ts— PUT proxy (authenticated, forwards to backend PUT /notes/{slug})src/routes/notes/[slug]/edit/+page.svelte— edit formsrc/routes/notes/[slug]/edit/+page.server.ts— load note data for editingFiles to modify:
src/lib/api.ts— addupdateNote(slug, data)function, addgetNoteLinks(slug)if neededsrc/lib/components/NoteLayout.svelte— add Edit button (visible only to authenticated users)src/routes/notes/[slug]/+page.svelte— pass session to NoteLayout for auth checksrc/routes/notes/[slug]/+page.server.ts— include session in returned dataFiles NOT to touch:
src/routes/api/notes/+server.ts— POST proxy is separatesrc/auth.ts— no auth changes neededAcceptance Criteria
Test Expectations
npm run buildcd ~/pal-e-app && npm run buildConstraints
Checklist
Related
pal-e-docs— project this affects