feat(suggestions): group wip/banner/editor under a separate 'system' category
CI / lint (push) Successful in 2s
CI / frontend-build (push) Successful in 22s
CI / backend-lint-and-test (push) Successful in 30s
CI / integration (push) Successful in 3m36s

System tags are kind=general, so their suggestions previously landed in the
General group. Give them their own 'system' suggestion category so the operator
reviews them apart from content tags: _current_heads maps is_system heads to
category 'system' (still trained as general heads, still gated by the 0.65
floor). Frontend: CATEGORY_ORDER/LABELS gain 'system'; SuggestionsPanel renders
a 'System' group first (small, collapsible, open — false positives easy to spot
and reject); the typed-dropdown shows the shield icon for system entries. Safe:
system-tag suggestions always carry a canonical_tag_id, so the create-by-kind
path (which would send 'system' as a TagKind) is never hit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CDgx8bQS5YrGRK76v8HUnM
This commit is contained in:
2026-07-03 22:00:49 -04:00
parent f33808b977
commit 437bf4d37a
5 changed files with 27 additions and 7 deletions
+4 -1
View File
@@ -326,7 +326,10 @@ async def _current_heads(session: AsyncSession, embedding_version: str):
{
"tag_id": r.tag_id,
"name": r.name,
"category": _CATEGORY.get(r.kind, "general"),
# System tags (wip/banner/editor) are kind=general but group under
# their OWN "system" suggestion category so the operator reviews
# them apart from content tags (they still train as general heads).
"category": "system" if r.is_system else _CATEGORY.get(r.kind, "general"),
"auto_apply_threshold": r.auto_apply_threshold,
"is_system": bool(r.is_system),
}