Repository navigation
Add attachments and links to session feedback - #80
Merged
Merged
Conversation
3 of 4 tasks
VidsterBroyo
force-pushed
the
feat/session-feedback-attachment
branch
2 times, most recently
from
November 30, 2026 02:09
e2338c1 to
0225018
Compare
VidsterBroyo
force-pushed
the
feat/session-feedback-attachment
branch
3 times, most recently
from
November 30, 2026 02:35
b873cf4 to
a02696b
Compare
VidsterBroyo
marked this pull request as ready for review
November 30, 2026 02:36
VidsterBroyo
force-pushed
the
feat/session-feedback-attachment
branch
from
November 30, 2026 02:37
a02696b to
d000a8b
Compare
Feedback can carry several uploaded files and several web links. Files go in a session_feedback_attachments join table so each one is a real FK to files. The file FK is Restrict, matching the files service, which refuses to delete attached files. Links are a text[] column on session_feedback. Links are in the API: SessionFeedback.links, and saveSessionFeedback takes a links list that replaces the saved one (up to 10 http(s) URLs, each at most 2,048 characters). File attachments stay out of the API until file uploads are finished. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
VidsterBroyo
force-pushed
the
feat/session-feedback-attachment
branch
from
November 30, 2026 02:37
d000a8b to
2854940
Compare
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.
Notion ticket link
Ticket
Stack 3 of 3. This builds on #79.
Implementation description
session_feedback_attachmentsjoin table with primary key (session_feedback_id,file_id) and an index onfile_id. Each attachment is a real FK tofiles.Cascade).Restrict). This matches the files service onfile-utils, which already refuses to delete attached files (FileInUseError).session_feedback.links text[], defaulting to empty. Links need no integrity checks, so a plain array is enough.SessionFeedback.links: [String!]!is returned wherever the feedback is visible.SaveSessionFeedbackInput.links: [String!]!is required and replaces the saved list, liketextandpointsdo. Pass[]for none.validateFeedbackLinks(inutils/validation.ts) trims each link and allows up to 10, each a validhttp(s)URL of at most 2,048 characters. It rejects things likejavascript:andftp:links. Errors areBAD_USER_INPUTwith fieldlinks.TODO.mdlists what's left, including adding this table toisFileAttachedin the files service.What should reviewers focus on?
attachment_ids uuid[]:isFileAttachedneeds a fast "is this file attached anywhere" lookup, which thefile_idindex gives.include.FileRecipient, the existing file join table.Restricton the file side: the database refuses to delete an attached file even if code skips theisFileAttachedcheck.linksis required on the save input, not optional with "unchanged if omitted". That matches howtextandpointsalready work: each save sends the whole form.prisma migrate deploy.Checklist
🤖 Generated with Claude Code