stash icon indicating copy to clipboard operation
stash copied to clipboard

feat: add rating and sort by rating feature to tags

Open slick-daddy opened this issue 5 months ago • 1 comments

Description

Added full rating support for tags, bringing them in line with other entities like scenes, performers, and studios. Related #6564, closes the longstanding #1400

Changes

Database Added a rating100 column to the tags table via a new migration, storing ratings on a 0–100 scale consistent with the rest of the application.

Backend

  • Updated the Tag and TagPartial model structs to include the Rating100 field
  • Added rating100 to the SQL filter handler in tag_filter.go, enabling tags to be queried by rating
  • Added rating100 to the GraphQL TagFilterType schema
  • Regenerated GraphQL types via go generate

Frontend

  • Added FindTagDocument to tagMutationImpactedQueries to ensure the tag detail page refetches after a rating change

Related Issue

Closes #1400

Testing

  • Add any rating to any tag. It can be done after clicking Edit button on specific tag page as well.
  • It gets rating.
  • Rated tags can be sorted and filtered.
  • Rating column can be seen if switched to list view for tags.

Checklist

  • [x] I have read and understood the Contributing document.
  • [x] I have read and understood the AI Usage Policy document.
  • [ ] I have made corresponding changes to the documentation (if applicable).

AI Usage Disclosure

  • [x] I have used AI tools to assist with this pull request, and I have disclosed the tools and how I used them below. SWE 1.6 pro used for draft. Tests are written by AI.

Additional Context

TagPartial Struct TagPartial is used by UpdatePartial to perform partial updates — only fields explicitly set are written to the database. The Rating100 field was missing from this struct, which would have prevented rating-only updates from persisting correctly without touching other tag fields.

slick-daddy avatar Jun 11 '26 03:06 slick-daddy

Needs import/export support.

WithoutPants avatar Jun 11 '26 10:06 WithoutPants