feat: Private notes frontend (Quick-Jot toggle + lock icon + API key) #26
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#26
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 F6 (Private Notes Enforcement) — frontend halfRepo
forgejo_admin/pal-e-appUser Story
As an authenticated pal-e-app user
I want to create private notes and see which notes are private
So that I can use the "private thought" pattern from the browser
Context
The backend (pal-e-docs) is adding is_public filtering with X-PaleDocs-Token header auth. The frontend needs to: (1) pass the API key in all server-side fetches so authenticated browsing sees private notes, (2) add a Private toggle to Quick-Jot so users can create private notes, (3) show a lock icon on private notes in lists/search.
File Targets
Files to modify:
src/lib/api.ts— add X-PaleDocs-Token header to apiFetch() using env.PAL_E_DOCS_API_KEY; addis_publicfield to Note, SearchResult interfacessrc/lib/components/QuickJot.svelte— add Private toggle (checkbox or switch) that setsis_public: falsein payloadsrc/routes/notes/+page.svelte— show lock icon next to private note titlessrc/routes/search/+page.svelte— show lock icon next to private search resultsFiles NOT to touch:
src/auth.ts— Keycloak config is separate from API key authsrc/routes/api/— API proxies don't need the API key (they call browser-side)Acceptance Criteria
Test Expectations
cd ~/pal-e-app && npm run buildConstraints
$env/dynamic/private(already imported in api.ts)Checklist
Related
pal-e-docs— project this affects