discourse/plugins/discourse-ai/spec/lib/modules/ai_helper
Régis Hanol 64603110ae
FIX: Respect category tag restrictions when suggesting tags (#40545)
Previously, the AI helper's tag suggester could recommend tags the
selected category doesn't allow — it filtered candidates only by tag
visibility and was never told the composer's category, so a user could
pick a suggestion they then couldn't submit (while adding the same tag
manually was correctly blocked).

This change routes the suggested tags through the same
`DiscourseTagging.filter_allowed_tags` rules the tag chooser and
topic-save validation use, scoped to the selected category and
already-selected tags, so only submittable tags are suggested.

Meta:
https://meta.discourse.org/t/ai-helper-can-suggest-tags-not-allowed-in-category/404423
2026-06-04 09:11:56 +02:00
..
assistant_spec.rb FIX: Persona-level allowed_group_ids is not enforced when executing modes (#39839) 2026-05-11 08:31:19 +10:00
chat_thread_titler_spec.rb DEV: AI persona to agent migration (#38319) 2026-03-10 15:59:45 +11:00
date_formatter_spec.rb
entry_point_spec.rb UX: Use English as language label where appropriate (#36762) 2025-12-18 13:10:23 -05:00
semantic_categorizer_spec.rb FIX: Respect category tag restrictions when suggesting tags (#40545) 2026-06-04 09:11:56 +02:00