feat: "My Notes" view + identity-aware dashboard + attribution display #103

Closed
opened 2026-04-12 18:04:31 +00:00 by forgejo_admin · 0 comments
Contributor

Type

Feature

Lineage

Depends on user attribution on pal-e-api (backend must return created_by/updated_by). Part of pal-e-app "app definition" compliance.

Repo

forgejo_admin/pal-e-production

User Story

As a pal-e-app user, I want to see notes I created and recently edited so that I can quickly find my own work.
As a note reader, I want to see who created/edited a note so I know who to ask about it.

Context

pal-e-app dashboard shows global activity with no user filtering. Note detail shows updated_at but not who edited. With user attribution landed on the API (created_by_name, updated_by_name, filter by created_by_sub), the frontend can build identity-aware views. This is the ticket that turns pal-e-app from "authenticated website" into a real app per definition-app.

File Targets

Files the agent should modify or create:

  • src/routes/my-notes/+page.svelte (new) — notes filtered by logged-in user's sub
  • src/routes/dashboard/+page.svelte — add "My Recent Edits" section
  • src/routes/notes/[slug]/+page.svelte or NoteLayout.svelte — display created_by_name / updated_by_name
  • src/routes/+layout.svelte — add "My Notes" nav link when authenticated
  • src/lib/api-client.ts — add user-filtered API calls (?created_by_sub=X)

Files the agent should NOT touch:

  • src/lib/keycloak.ts — already handled in role extraction ticket

Acceptance Criteria

  • /my-notes shows only notes created by logged-in user
  • Dashboard includes "My Recent Edits" section when authenticated
  • Note detail shows "Created by X" / "Last edited by Y" when attribution exists
  • "My Notes" nav link visible when authenticated, hidden when not
  • Graceful handling when attribution is NULL (older notes without attribution)

Test Expectations

  • Manual test: navigate to /my-notes → see only own notes
  • Manual test: dashboard shows personalized "My Recent Edits"
  • Manual test: note detail shows author attribution
  • Manual test: unauthenticated user doesn't see "My Notes" link
  • Verify: notes without attribution display gracefully (no crash, no "null")
  • Run command: npm run build

Constraints

  • Reuse existing note list component pattern from /notes route
  • Match existing CSS/layout conventions — no new design system
  • Handle NULL attribution gracefully (older notes won't have it)
  • User sub comes from the identity store created in the role extraction ticket

Checklist

  • PR opened
  • Build passes (npm run build)
  • No unrelated changes
  • pal-e-app — project this affects
  • definition-app — the app definition driving this work
### Type Feature ### Lineage Depends on user attribution on pal-e-api (backend must return created_by/updated_by). Part of pal-e-app "app definition" compliance. ### Repo `forgejo_admin/pal-e-production` ### User Story As a **pal-e-app user**, I want to see notes I created and recently edited so that I can quickly find my own work. As a **note reader**, I want to see who created/edited a note so I know who to ask about it. ### Context pal-e-app dashboard shows global activity with no user filtering. Note detail shows `updated_at` but not who edited. With user attribution landed on the API (created_by_name, updated_by_name, filter by created_by_sub), the frontend can build identity-aware views. This is the ticket that turns pal-e-app from "authenticated website" into a real app per `definition-app`. ### File Targets Files the agent should modify or create: - `src/routes/my-notes/+page.svelte` (new) — notes filtered by logged-in user's sub - `src/routes/dashboard/+page.svelte` — add "My Recent Edits" section - `src/routes/notes/[slug]/+page.svelte` or `NoteLayout.svelte` — display `created_by_name` / `updated_by_name` - `src/routes/+layout.svelte` — add "My Notes" nav link when authenticated - `src/lib/api-client.ts` — add user-filtered API calls (`?created_by_sub=X`) Files the agent should NOT touch: - `src/lib/keycloak.ts` — already handled in role extraction ticket ### Acceptance Criteria - [ ] `/my-notes` shows only notes created by logged-in user - [ ] Dashboard includes "My Recent Edits" section when authenticated - [ ] Note detail shows "Created by X" / "Last edited by Y" when attribution exists - [ ] "My Notes" nav link visible when authenticated, hidden when not - [ ] Graceful handling when attribution is NULL (older notes without attribution) ### Test Expectations - [ ] Manual test: navigate to /my-notes → see only own notes - [ ] Manual test: dashboard shows personalized "My Recent Edits" - [ ] Manual test: note detail shows author attribution - [ ] Manual test: unauthenticated user doesn't see "My Notes" link - [ ] Verify: notes without attribution display gracefully (no crash, no "null") - Run command: `npm run build` ### Constraints - Reuse existing note list component pattern from `/notes` route - Match existing CSS/layout conventions — no new design system - Handle NULL attribution gracefully (older notes won't have it) - User sub comes from the identity store created in the role extraction ticket ### Checklist - [ ] PR opened - [ ] Build passes (`npm run build`) - [ ] No unrelated changes ### Related - `pal-e-app` — project this affects - `definition-app` — the app definition driving this work
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ldraney/pal-e-app#103
No description provided.