Skip to content

feat(lists): add user lists feature with ownership validation - #188

Merged
jpcmf merged 70 commits into
developfrom
feature/lists-frontend
Jul 16, 2026
Merged

feat(lists): add user lists feature with ownership validation#188
jpcmf merged 70 commits into
developfrom
feature/lists-frontend

Conversation

@jpcmf

@jpcmf jpcmf commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Summary

Adds user-curated lists (wish/like/want/recommend) with public discovery, dashboard management, and profile integration.

Changes

New Pages

  • /lists — public discovery with type filter pills
  • /lists/[id] — public detail view with items
  • /dashboard/lists — dashboard management with edit/delete
  • /dashboard/lists/[id]/edit — full item CRUD with image upload

New Feature Module

  • src/features/lists/ — types, 9 services, 9 TanStack Query hooks, 6 components, barrel export

Modified Files

  • Sidebar, profile, dashboard card, user types, docs, specs

Security Fix

  • Edit page now verifies list ownership — non-owners are redirected, preventing unauthorized item edits/deletions

jpcmf added 30 commits November 8, 2024 12:05
jpcmf added 10 commits July 15, 2026 23:20
- Move /dashboard/lists to /lists (protected)

- Move /dashboard/lists/[id]/edit to /lists/[id]/edit

- Add /lists/new page following /spots/new pattern

- Remove old /dashboard/lists directory

- Remove unused (public)/lists page
- Dashboard: link to /lists/new instead of /dashboard/lists

- CreateListModal: redirect to /lists/:id/edit after creation

- ListDetail: edit link points to /lists/:id/edit
- Strapi returns id as number; AuthContext was storing it raw

- User type declares id: string, fix both signIn and loadUserData paths

- Fixes === comparisons with string values like URL params
- User.id from AuthContext vs userId from URL params can be different types

- Use String() on both sides for reliable comparison
- Add createListItem service and hook

- Update list types with owner avatar support

- Improve ListDetail with owner link and delete from detail

- Refactor ListItemForm, ListItemList for better UX

- Add useUpdateList, useDeleteListItem hooks

- Add loading states to useCreateList, useDeleteList

- Add staleTime to list queries
- Add UserBasics type with proper fields

- Update User type

- Update getUser service

- Fix Edit component usage
@jpcmf

jpcmf commented Jul 16, 2026

Copy link
Copy Markdown
Owner Author

@jpcmf
jpcmf merged commit fce666b into develop Jul 16, 2026
3 checks passed
@jpcmf
jpcmf deleted the feature/lists-frontend branch July 16, 2026 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant