Skip to content

feat(api): track feedback requests - #1068

Open
dylanjeffers wants to merge 1 commit into
mainfrom
feat/track-feedback-requests
Open

dylanjeffers wants to merge 1 commit into
mainfrom
feat/track-feedback-requests

Conversation

@dylanjeffers

Copy link
Copy Markdown
Contributor

Summary

Backend for "looking for feedback" on tracks (indexer side: OpenAudio/go-openaudio#625).

  • Migration 0243 adds 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.
  • Track responses gain feedback_requested (bool) and feedback_requested_at.
  • GET /v1/tracks/feedback: tracks asking for feedback, newest request first, with limit/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_requested accepted on POST/PUT /tracks request bodies; swagger updated.
  • sql/01_schema.sql updated 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

  • New tests in v1_tracks_feedback_test.go: ordering by request time, unlisted / comments-disabled / deactivated-owner excluded, genre + paging, and a track without the flag returns feedback_requested: false
  • go test ./api/... against a DB built from this branch's schema. Only failure is TestFeedScheduledReleases, which fails the same way on origin/main.

🤖 Generated with Claude Code

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>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant