Repository navigation
feat(api): track feedback requests - #1068
Open
dylanjeffers wants to merge 1 commit into
Open
dylanjeffers wants to merge 1 commit into
dylanjeffers wants to merge 1 commit into
Conversation
Adds tracks.feedback_requested_at (set by the indexer from track metadata), returns feedback_requested / feedback_requested_at on tracks, accepts feedback_requested on track create/update, and adds GET /v1/tracks/feedback listing tracks asking for feedback, newest request first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 of 5 tasks
This branch has not been deployed
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
Backend for "looking for feedback" on tracks (indexer side: OpenAudio/go-openaudio#625).
tracks.feedback_requested_at(nullable) and a partial index for live rows where it's set.CREATE INDEX CONCURRENTLY, no transaction. Almost every row is NULL, so the index is tiny.feedback_requested(bool) andfeedback_requested_at.GET /v1/tracks/feedback: tracks asking for feedback, newest request first, withlimit/offset/genre. Uses the same filters as/tracks/latest(no deleted, unlisted, unavailable or deactivated-owner tracks), and also skips tracks that are stream-gated, use access authorities, or have comments disabled, since nobody could hear them or leave feedback.feedback_requestedaccepted onPOST/PUT /tracksrequest bodies; swagger updated.sql/01_schema.sqlupdated to match.Deploy note: merging ships the column and endpoint. Nothing writes the column until a follow-up bumps go-openaudio to include #625. Until then the endpoint returns an empty list.
Test plan
v1_tracks_feedback_test.go: ordering by request time, unlisted / comments-disabled / deactivated-owner excluded, genre + paging, and a track without the flag returnsfeedback_requested: falsego test ./api/...against a DB built from this branch's schema. Only failure isTestFeedScheduledReleases, which fails the same way onorigin/main.🤖 Generated with Claude Code