J’ai utilisé des scènes avec l’action « Demander à l’IA », et je me suis rendu compte plus tard que certaines avaient abouti à la création d’une scène. Mais comme je ne sais pas comment elles ont été nommées et que j’ai plusieurs centaines de scènes, difficile de les retrouver pour ‹ faire le ménage ›.
Il faudrait pouvoir filtrer les scènes créée par l’IA. Soit avec un bouton dédié, soit en faisant en sorte qu’une étiquette « créé par l’IA » soit apposée systématiquement sur ce genre de scène.
Idéalement, il faudrait que ce filtrage fonctionne même sur les scènes créées ces derniers temps, et pas seulement sur les prochaines…
Pour les nouvelles, c’est facile. Pour les anciennes, je pense qu’il n’y a aucun moyen techniquement possible.
Salut tout le monde !
Ce sujet est désormais en cours de développement .
Une PR a été ouverte pour taguer automatiquement les scènes créées par l’IA et corriger le filtre par tags :
master ← cicoub13:claude/filter-ai-generated-scenes-pcgaoc
ouvert 12:56PM - 07 Sep 26 UTC
### Description
Scenes created by the AI through the `scene.create` tool — re… achable from the "Ask AI" scene action, the AI chat and external MCP clients — were indistinguishable from hand-made ones. With hundreds of scenes there is no way to find them back to clean them up, since you don't know how the AI named them.
Every scene created that way now automatically carries the `AI` tag. The existing scene card badge and the "Filter by tags" dropdown already handle tags, so **no front-end change is needed**: the `AI` entry shows up in the filter as soon as the first AI-created scene exists.
Tags supplied by the model are kept, deduplicated case-insensitively (`t_tag_scene` has a composite primary key `(scene_id, name)`, so a duplicate name would fail the insert), and the AI tag is always stored with its canonical casing since the filter matches on an exact name.
**The tag filter had to be fixed first.** `scene.get` matched tag names with a substring `LIKE '%tag%'`, then grouped the matched rows by the tag name actually found and intersected the groups. With a short tag like `AI`, `%AI%` also matches `Maison`, `Salaire`, … and those unrelated groups were then intersected together, so the filter returned nothing. The front only ever sends exact tag names picked from the dropdown (`SceneTagFilter.jsx`), so the lookup now matches on the exact name. Requested tags that no scene carries also get their own empty group, which keeps the AND semantics when several tags are selected — previously such a tag was silently ignored and widened the result set.
Known limitation: scenes created by the AI *before* this change are not tagged retroactively.
## Forum
Forum: https://community.gladysassistant.com/t/pouvoir-filtrer-les-scenes-qui-ont-ete-generees-par-lia/10817
### Checklist
- [x] Tests pass: `cd server && npm run coverage` (Codecov requires 100% coverage on changed lines) and Cypress (`npm run cypress:run`) if the UI changed
- [x] Linter and prettier pass on both front and server (`npm run eslint`, `npm run prettier`)
- [x] No undocumented breaking change
Coverage on the changed files is 100% statements/branches/functions/lines for `lib/scene/scene.get.js` and `utils/constants.js`; the only uncovered lines reported in `services/mcp/lib/buildSchemas.js` are pre-existing ones in the `device.turn-on-off` tool, outside this diff. Cypress was not re-run because no front-end file changed.
7 tests were added: the AI tag being applied with and without model-supplied tags, deduplication and canonical casing, exact-vs-substring tag matching, and filtering on a tag no scene carries.
## Summary by CodeRabbit
* **New Features**
* Scenes created through the AI scene creation tool are automatically tagged “AI.”
* Existing tags are preserved, while duplicate AI tags are avoided.
* **Bug Fixes**
* Scene searches now match tag names exactly rather than returning partial matches.
* Searches requiring multiple tags now correctly return no results when any requested tag is missing.
N’hésitez pas à suivre la PR, à tester (optionnel, surtout pour les petites demandes) et à faire vos retours ici si besoin.