fix: make Ella execute panel configuration actions #32

Merged
isyuricunha merged 1 commit from fix/panel-ai-actions into main 2026-08-26 02:40:20 +00:00
isyuricunha commented 2026-08-26 02:10:56 +00:00 (Migrated from github.com)

Summary

Fixes the Panel AI configuration workflow so Ella can offer and execute real allowlisted configuration actions instead of getting stuck in the "open the page / prepare it" loop.

What changed

  • allow prefill_form actions to target any allowlisted panel page, including while chatting from the full Ella page;
  • explicitly instruct the model to emit a real configuration action when the administrator asks to enable, disable, set, change, prepare, or adjust an allowlisted setting;
  • add the concrete AI moderation example (automod: enable AI moderation + permissivo) to reduce page/field hallucination;
  • local prefill now navigates to the target page automatically and waits for the route/components to render;
  • prefill retries briefly while conditionally rendered controls become available;
  • server-side apply no longer requires the browser to already be on the target page;
  • confirmation still uses the server-calculated diff and remains an explicit administrator action before persistence;
  • after a server apply, local form state is synchronized only when that form is actually open;
  • regression coverage for applying AutoMod AI moderation from /assistant.

Expected behavior

From the Ella page, a request such as "ative a moderação por IA e deixe no permissivo" can now produce the real AutoMod action. The administrator can either:

  1. Preparar alteração — Ella navigates to AutoMod and fills the form for review; or
  2. Aplicar no servidor — the panel shows the server-recalculated diff and persists it after Confirmar e salvar, without requiring manual navigation.

No action is treated as persisted until the explicit server confirmation succeeds.

## Summary Fixes the Panel AI configuration workflow so Ella can offer and execute real allowlisted configuration actions instead of getting stuck in the "open the page / prepare it" loop. ### What changed - allow `prefill_form` actions to target any allowlisted panel page, including while chatting from the full Ella page; - explicitly instruct the model to emit a real configuration action when the administrator asks to enable, disable, set, change, prepare, or adjust an allowlisted setting; - add the concrete AI moderation example (`automod`: enable AI moderation + `permissivo`) to reduce page/field hallucination; - local prefill now navigates to the target page automatically and waits for the route/components to render; - prefill retries briefly while conditionally rendered controls become available; - server-side apply no longer requires the browser to already be on the target page; - confirmation still uses the server-calculated diff and remains an explicit administrator action before persistence; - after a server apply, local form state is synchronized only when that form is actually open; - regression coverage for applying AutoMod AI moderation from `/assistant`. ## Expected behavior From the Ella page, a request such as **"ative a moderação por IA e deixe no permissivo"** can now produce the real AutoMod action. The administrator can either: 1. **Preparar alteração** — Ella navigates to AutoMod and fills the form for review; or 2. **Aplicar no servidor** — the panel shows the server-recalculated diff and persists it after **Confirmar e salvar**, without requiring manual navigation. No action is treated as persisted until the explicit server confirmation succeeds.
Sign in to join this conversation.
No description provided.