Skip to content

feat: add promoted tag badges, filter, and HereSphere thumbnails - #2241

Open
hjs0007 wants to merge 1 commit into
xbapps:masterfrom
hjs0007:feature/promoted-tags
Open

feat: add promoted tag badges, filter, and HereSphere thumbnails#2241
hjs0007 wants to merge 1 commit into
xbapps:masterfrom
hjs0007:feature/promoted-tags

Conversation

@hjs0007

@hjs0007 hjs0007 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Promoted tags let users mark tags that stand out across the library.

Three subfeatures:

1. Promoted tags

  • New is_promoted boolean column on tags (migrations
    0088-tag-is-promoted and 0089-add-scene-tags-tag-id-index), included
    in tag backups

  • New API: GET /api/tag/list (with per-tag scene counts) and
    POST /api/tag/promote/{id}

  • New "Tags" management section under Options > Scene data (searchable,
    paginated) to toggle promotion per tag

  • Scene cards render an is-primary badge with a label icon per promoted
    tag, capped per card size with a +N overflow badge (tooltip lists the
    hidden tag names)

2. Has Promoted Tag filter

  • New "Has Promoted Tag" attribute in the scene Attributes dropdown,
    server-fed from /api/scene/filters so no frontend change was needed;
    mapped to an exists() subquery, so the ! and & prefixes keep
    working

3. HereSphere thumbnails

  • HeatmapThumbnailProxy renamed to HereSphereThumbnailProxy; a single
    /imghs/ URL serves heatmaps and promoted-tag badges on the 700x420
    thumbnail (/imghm/ kept for back-compat)

  • New pure pkg/imgbadge package draws up to 3 mauve pill badges plus a
    +N overflow badge, dropping or truncating names to fit the canvas

  • The cache key includes the promoted tag names and script-file identity,
    so unpromoting tags or replacing funscripts invalidates stale composites

  • Proxy cache dir renamed to herespherethumbnailproxy

Notes

  • Purely additive; no changes to existing scene list queries, scraping
    flows, or backup format beyond the new field

  • Tested: 8 unit tests for pkg/imgbadge, gofmt-clean

Promoted tags let users mark tags that stand out across the library.

- Promoted tags: is_promoted column and scene_tags index (migrations
  0088/0089), a TagResource API (/api/tag/list, /api/tag/promote/{id}),
  an Options > Scene data > Tags management section, and is-primary
  badges with a label icon on scene cards (capped per card size, +N
  overflow badge with a tooltip).
- Has Promoted Tag filter: new scene Attributes entry mapped to an
  exists() subquery, so the ! and & prefixes keep working.
- HereSphere thumbnails: the heatmap proxy is renamed to
  HereSphereThumbnailProxy and serves heatmaps plus up to 3 mauve
  pill badges (+N overflow) on the 700x420 thumbnail from a single
  /imghs/ URL (/imghm/ kept for back-compat). A pure pkg/imgbadge
  package draws them; the cache key includes tag names and script-file
  identity so unpromoting or replacing funscripts invalidates stale
  composites. The proxy cache dir is renamed to herespherethumbnailproxy.
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