Add pagination, cross-board activity endpoint, and Project updated_at #180
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/pal-e-api#180
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 F11 (Design System Overhaul) → F11-backendRepo
forgejo_admin/pal-e-docsUser Story
As the platform owner viewing the pal-e-app home page
I want to see my most recently updated notes, active board items across all projects, and project activity
So that the home page answers "what changed recently?" instead of showing a static alphabetical dump
Context
Phase F11 is a design system overhaul for pal-e-app. The frontend redesign requires an "activity-first" home page showing recently updated content. The current API has gaps:
GET /notesreturns ALL notes with no pagination (374 notes, growing)updated_atcolumnThe API already sorts notes by
updated_at DESCby default and includesupdated_atin responses — so the foundation is solid. These 3 changes are surgical additions, not architectural rewrites.File Targets
Files to modify:
src/pal_e_docs/routes/notes.py— addlimit+offsetquery params tolist_notes(line ~358)src/pal_e_docs/routes/boards.py— add newGET /boards/activityendpoint for cross-board recency querysrc/pal_e_docs/models.py— addupdated_atcolumn toProjectmodel (line ~52)src/pal_e_docs/schemas.py— addupdated_attoProjectOutschema (line ~51)updated_atcolumnFiles NOT to touch:
src/pal_e_docs/routes/blocks.py— no changes neededsrc/pal_e_docs/routes/search.py— search already haslimitAcceptance Criteria
GET /notes?limit=10&offset=0returns exactly 10 notes sorted byupdated_at DESCGET /notes?limit=5&project=pal-e-docsreturns 5 most recent pal-e-docs notesGET /noteswithout limit/offset continues to work (backwards compatible — default to returning all)GET /boards/activity?limit=10returns 10 most recently updated board items across ALL boardsGET /boards/activity?column=in_progress&limit=5returns 5 most recent in-progress items across all boardsGET /boards/activityresponse uses existingBoardItemOutschemaupdated_atcolumn withserver_default=func.now(), onupdate=func.now()GET /projectsresponse includesupdated_atfieldalembic upgrade head)Test Expectations
test_list_notes_pagination— verify limit/offset params work, verify default behavior unchangedtest_boards_activity_endpoint— verify cross-board query, column filter, limit, ordering by updated_at DESCtest_project_updated_at— verify field exists in response, auto-updates on modificationpytest tests/ -vConstraints
routes/notes.pyandroutes/boards.pyQuery()from FastAPI for new parameters (consistent with existing code)limittoNoneonGET /notesfor backwards compatibility (no limit = return all, same as current)GET /boards/activityshould reuse the existing_item_to_out()helper andBoardItemOutschemaruff formatbefore committingChecklist
Related
phase-pal-e-docs-design-overhaul— parent phase (F11)project-pal-e-docs— project