aboutsummaryrefslogtreecommitdiffstats
path: root/packages/trpc/routers/bookmarks.test.ts (follow)
Commit message (Collapse)AuthorAgeFilesLines
* feat: Add collaborative lists (#2146)Mohamed Bassem2025-11-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: Add collaborative lists backend implementation This commit implements the core backend functionality for collaborative lists, allowing multiple users to share and interact with bookmark lists. Database changes: - Add listCollaborators table to track users with access to lists and their roles (viewer/editor) - Add addedBy field to bookmarksInLists to track who added bookmarks - Add relations for collaborative list functionality Access control updates: - Update List model to support role-based access (owner/editor/viewer) - Add methods to check and enforce permissions for list operations - Update Bookmark model to allow access through collaborative lists - Modify bookmark queries to include bookmarks from collaborative lists List collaboration features: - Add/remove/update collaborators - Get list of collaborators - Get lists shared with current user - Only manual lists can have collaborators tRPC procedures: - addCollaborator: Add a user as a collaborator to a list - removeCollaborator: Remove a collaborator from a list - updateCollaboratorRole: Change a collaborator's role - getCollaborators: Get all collaborators for a list - getSharedWithMe: Get all lists shared with the current user - cloneBookmark: Clone a bookmark to the current user's collection Implementation notes: - Editors can add/remove bookmarks from the list (must own the bookmark) - Viewers can only view bookmarks in the list - Only the list owner can manage collaborators and list metadata - Smart lists cannot have collaborators (only manual lists) - Users cannot edit bookmarks they don't own, even in shared lists * feat: Add collaborative lists frontend UI This commit implements the frontend user interface for collaborative lists, allowing users to view shared bookmarks and manage list collaborators. New pages: - /dashboard/shared: Shows bookmarks from lists shared with the user - Displays bookmarks from all collaborative lists - Uses SharedBookmarks component - Shows empty state when no lists are shared Navigation: - Added "Shared with you" link to sidebar with Users icon - Positioned after "Home" in main navigation - Available in both desktop and mobile sidebar Collaborator management: - ManageCollaboratorsModal component for managing list collaborators - Add collaborators by user ID with viewer/editor role - View current collaborators with their roles - Update collaborator roles inline - Remove collaborators - Shows empty state when no collaborators - Integrated into ListOptions dropdown menu - Accessible via "Manage Collaborators" menu item Components created: - SharedBookmarks.tsx: Server component fetching shared lists/bookmarks - ManageCollaboratorsModal.tsx: Client component with tRPC mutations - /dashboard/shared/page.tsx: Route for shared bookmarks page UI features: - Role selector for viewer/editor permissions - Real-time collaborator list updates - Toast notifications for success/error states - Loading states for async operations - Responsive design matching existing UI patterns Implementation notes: - Uses existing tRPC endpoints (getSharedWithMe, getCollaborators, etc.) - Follows established modal patterns from ShareListModal - Integrates seamlessly with existing list UI - Currently uses user ID for adding collaborators (email lookup TBD) * fix typecheck * add collaborator by email * add shared list in the sidebar * fix perm issue * hide UI components from non list owners * list leaving * fix shared bookmarks showing up in homepage * fix getBookmark access check * e2e tests * hide user specific fields from shared lists * simplify bookmark perm checks * disable editable fields in bookmark preview * hide lists if they don't have options * fix list ownership * fix highlights * move tests to trpc * fix alignment of leave list * make tag lists unclickable * allow editors to remove from list * add a badge for shared lists * remove bookmarks of user when they're removed from a list * fix tests * show owner in the manage collab modal * fix hasCollab * drop shared with you * i18n * beta badge * correctly invalidate caches on collab change * reduce unnecessary changes * Add ratelimits * stop manually removing bookmarks on remove * some fixes * fixes * remove unused function * improve tests --------- Co-authored-by: Claude <noreply@anthropic.com>
* feat: Add per user bookmark count quotaMohamed Bassem2025-07-041-0/+259
|
* feat: Allow enabling/disabling RSS feedsMohamed Bassem2025-05-171-1/+5
|
* tests: Add tests for various trpc endpointsMohamed Bassem2025-04-161-3/+147
|
* chore: Rename hoarder packages to karakeepMohamedBassem2025-04-121-2/+2
|
* feat: Allow editing bookmark detailsMohamedBassem2025-04-081-1/+62
|
* feat: Add a setting page to manage assets. Fixes #730Mohamed Bassem2025-02-231-117/+2
|
* refactor: Start tracking bookmark assets in the assets tableMohamedBassem2024-10-061-1/+19
|
* refactor: Include userId in the assets tableMohamedBassem2024-10-061-0/+4
|
* fix(web):Add validation on updateTags request to ensure that an empty ↵kamtschatka2024-09-261-0/+15
| | | | | | | | | | | | tagName doesn't attach all tags to a bookmark #421 (#428) * [Bug Report] Importing bookmarks adds all tags to all bookmarks #421 fixed an issue that caused all existing tags to be assigned to a new bookmark * Add validation on the input of update tags to ensure that its not empty --------- Co-authored-by: MohamedBassem <me@mbassem.com>
* feature(web): Show attachments and allow users to manipulate them.MohamedBassem2024-09-221-2/+95
|
* feature(cli): Allow updating tags/lists from CLI (#211)kamtschatka2024-07-271-5/+19
| | | | | | | | | | | | * Improve the CLI #209 added the possibility to assign tags to bookmarks while creating added the possibility to assign a newly created to a list right away added the possibility to add and remove tags from bookmarks * minor tweaks --------- Co-authored-by: MohamedBassem <me@mbassem.com>
* refactor: added the bookmark type to the database (#256)kamtschatka2024-07-011-18/+20
| | | | | | | | | | | | | | | | | * refactoring asset types Extracted out functions to silently delete assets and to update them after crawling Generalized the mapping of assets to bookmark fields to make extending them easier * Added the bookmark type to the database Introduced an enum to have better type safety cleaned up the code and based some code on the type directly * add BookmarkType.UNKNWON * lint and remove unused function --------- Co-authored-by: MohamedBassem <me@mbassem.com>
* fix: Fix missing bookmarks during pagination if they got created in the same ↵MohamedBassem2024-05-191-0/+60
| | | | second. Fixes #140
* tests: Add tests for bookmark deduplicationMohamedBassem2024-05-121-0/+38
|
* feature: Dedup links on creation. Fixes #49MohamedBassem2024-05-061-6/+6
|
* feature(web): Allow uploading directly into lists/tags. Fixes #69MohamedBassem2024-04-091-2/+15
|
* format: Add missing lint and format, and format the entire repoMohamedBassem2024-03-301-2/+4
|
* refactor: Extract trpc logic into its packageMohamedBassem2024-03-051-0/+200