feat(suggestions): user-managed blocklist for noisy auto-tags
Adds a tag_suggestion_blocklist table + service-layer filter so the
user can permanently suppress specific canonical tag names from the
suggestion stream (WD14 anatomy/composition tags like '1girl',
'breasts', 'nipples' that aren't useful for the discoverability use
case this app targets).
Data model
- migration k26042201: tag_suggestion_blocklist(name TEXT PK, created_at)
- model TagSuggestionBlocklistEntry
Service
- tag_suggestions._blocklisted_names() snapshots the current set
- get_suggestions filters merged results before grouping, so both
WD14- and embedding-sourced suggestions respect the blocklist
- get_bulk_suggestions inherits the filter via its per-image call
to get_suggestions
API
- GET /api/suggestions/blocklist -> {ok, names}
- POST /api/suggestions/blocklist -> add one
- POST /api/suggestions/blocklist/delete -> remove one
- POST /api/suggestions/blocklist/bulk -> replace the whole list
(backs the settings textarea save button)
UI
- modal suggestion chip gets a third action button (⊘) alongside
accept (✓) / reject (✕). Clicking it adds the name to the
blocklist, logs a rejection for ML feedback on this image, and
sweeps every chip on the page carrying that same name.
- Settings -> Maintenance -> Suggestion blocklist section with a
monospaced textarea (one name per line) + Save. Loads current
entries on mount.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1011,6 +1011,33 @@ header {
|
||||
background: rgba(231, 139, 139, 0.12);
|
||||
border-color: rgba(231, 139, 139, 0.6);
|
||||
}
|
||||
.suggestion-chip .sugg-btn.sugg-block {
|
||||
color: #ffb400;
|
||||
border-color: rgba(255, 180, 0, 0.35);
|
||||
}
|
||||
.suggestion-chip .sugg-btn.sugg-block:hover {
|
||||
background: rgba(255, 180, 0, 0.12);
|
||||
border-color: rgba(255, 180, 0, 0.6);
|
||||
}
|
||||
|
||||
/* Settings: blocklist textarea */
|
||||
.settings-textarea {
|
||||
width: 100%;
|
||||
padding: 0.5rem 0.75rem;
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
border-radius: 6px;
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
color: var(--text);
|
||||
font-family: var(--mono, monospace);
|
||||
font-size: 0.9rem;
|
||||
resize: vertical;
|
||||
min-height: 8rem;
|
||||
}
|
||||
.settings-textarea:focus {
|
||||
outline: none;
|
||||
border-color: var(--btn-primary);
|
||||
background: rgba(255, 255, 255, 0.12);
|
||||
}
|
||||
.suggestion-chip.leaving {
|
||||
opacity: 0;
|
||||
transform: translateX(6px);
|
||||
|
||||
Reference in New Issue
Block a user