Merged
Conversation
Add ability for users to save/bookmark notes via a new userMetadataToNotes table, savedNote tRPC router, and SaveButton component on FileCard.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Integrate SaveButton alongside NoteEditButton using develop's updated card layout.
TyHil
requested changes
Mar 16, 2026
Member
TyHil
left a comment
There was a problem hiding this comment.
Bit of a nitpick but dyt we could just throw the saved notes trpc procedures in the notes router and throw the userMetadataToNotes schema in the users.ts schema file. Like in Clubs.
Otherwise looking good, just a few small things
TyHil
approved these changes
Mar 17, 2026
Member
There was a problem hiding this comment.
I don't think we need any package lock changes in this PR if you wanna just do git checkout develop -- package-lock.json and commit the changes. Other than that, tested and looks good!
@ShriramJana on merge if you would make a comment on #98 to add a SavedNotes component to the profile page for that issue, that'd be great.
Open
ShriramJana
approved these changes
Mar 23, 2026
- models.ts: include all new types from develop (SelectFileWithAuthorPreview, SelectFileWithUserMetadata, SectionWithFilesWithUserMetadata) alongside savedNote types from save-notes - FileCard.tsx: use SelectFileWithAuthorPreview type and authorDisplay logic from develop, keep SaveButton from save-notes
Catches up 5 files that were behind develop due to incomplete auto-merge:
- section.ts: add with: { author: true } to all file queries
- FilesGrid.tsx: use SectionWithFilesWithUserMetadata | SelectFileWithAuthorPreview[]
- CreatedNotes.tsx: use SelectFileWithAuthorPreview type
- SettingsForm.tsx: use SelectFileWithAuthorPreview type
- notes/[...slug]/page.tsx: use SectionWithFilesWithUserMetadata
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
userMetadataToNotesjunction table with composite(userId, fileId)primary key andsavedbooleansavedNotetRPC router withtoggle,isSaved, andgetSavedNotesendpointsSaveButtoncomponent with optimistic updates and auth redirect on FileCardCloses #116
Note: Since #98 is not yet done, a
SavedNotesprofile component should be added there when implemented.