Skip to content

feat: add per-alias autotag toggle + general api/app support for per-alias autotag#6694

Open
notsafeforgit wants to merge 9 commits intostashapp:developfrom
notsafeforgit:feat/autotag-aliases
Open

feat: add per-alias autotag toggle + general api/app support for per-alias autotag#6694
notsafeforgit wants to merge 9 commits intostashapp:developfrom
notsafeforgit:feat/autotag-aliases

Conversation

@notsafeforgit
Copy link
Copy Markdown
Contributor

@notsafeforgit notsafeforgit commented Mar 18, 2026

Add DB support and graphQL API support to track alias matching for a performer being on or off on a per-alias basis. By default, new aliases (especially from scrapers) are set to be ignored for auto-tagging. The UI toggle has been updated to reflect an 'Auto tag' boolean checkbox that allows users to opt-in specific aliases.

Attached is a screenshot of the new alias list UI with autotag toggles:

New performer edit page with alias toggles

@notsafeforgit notsafeforgit force-pushed the feat/autotag-aliases branch 19 times, most recently from 83c44e3 to 30d77f1 Compare March 18, 2026 07:45
func toPerformerAliases(aliases []string) []models.PerformerAlias {
var res []models.PerformerAlias
for _, a := range aliases {
res = append(res, models.PerformerAlias{Alias: a, IgnoreAutoTag: true})
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All current performers don't support autotagging aliases, so backups should be imported with autotag ignored for aliases set to true.

@notsafeforgit notsafeforgit force-pushed the feat/autotag-aliases branch 7 times, most recently from eab0eb8 to 76da2d8 Compare March 18, 2026 08:56
@notsafeforgit
Copy link
Copy Markdown
Contributor Author

notsafeforgit commented Mar 24, 2026

Just wanted to comment that I'm now running a custom fork of stash with this change and have extensively tested this PR and it appears to work great. I have autotag enabled for many aliases for many performers and have seen no issues.

@Gykes Gykes added the deferred Good feature that can be looked at for a later release. label Mar 27, 2026
Add DB support and graphQL API support to track alias matching being on or off per alias.
By default, new aliases (especially from scrapers) are set to be ignored for auto-tagging.
The UI toggle has been updated to reflect an 'Auto tag' boolean checkbox that allows users to opt-in specific aliases.
This fixes a bug where clicking Save in the performer edit panel did nothing. The yup schema requires the 'aliases' field to be present for casting, but it was being destructured out before being passed to `schema.cast()`, causing a validation crash inside Formik's onSubmit handler that silently aborted the save action.
…p panic

Modified NormalizeAliases to return an initialized empty slice instead of nil when aliases are empty. This ensures the aliases relationship is marked as 'loaded', preventing a panic in ValidateCreate. Added a corresponding unit test to verify creation with empty or filtered aliases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deferred Good feature that can be looked at for a later release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants