Align Agent Editor toast action styling

Use the shared toast action row and primary button classes for the Test in new chat action. Remove the plugin-specific link styling and cover the shared markup in the focused WebUI regression test.

Alessandro committed Aug 12, 2026 at 13:12 UTC 3ce418a9d5d49ffa7f5bc1222330201a387a6d76
3 files changed +4 -2
plugins/_agent_editor/webui/agent-editor-store.js
+1 -1
@@ -1255,7 +1255,7 @@ const model = {
1255 await this.openFreshChat(profileId, creating);
1256 } else {
1257 globalThis.justToast?.(
1258 - `Agent saved. <button class="toast-link" type="button" onclick="window.testAgentProfile('${profileId}')">Test in new chat</button>`,
1258 + `Agent saved.<div class="toast-action-row"><button class="button confirm" type="button" onclick="window.testAgentProfile('${profileId}')">Test in new chat</button></div>`,
1259 "success", 8000, "agent-editor-saved",
1260 );
1261 }
plugins/_agent_editor/webui/main.html
-1
@@ -569,7 +569,6 @@
569 .agent-manager-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem; }
570 .agent-profile-availability input { width:0; height:0; margin:0; border:0; }
571 .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
572 - .toast-link { border:0; background:transparent; color:var(--agent-editor-action); text-decoration:underline; cursor:pointer; }
572 .agent-editor :focus-visible { outline:2px solid var(--agent-editor-action); outline-offset:2px; }
573 .modal-inner.agent-editor-easy { width:min(720px,calc(100vw - 2rem)); max-width:720px; }
574 .modal-inner.agent-editor-advanced { width:92vw; max-width:none; height:min(calc(100vh - 4rem),80rem); max-height:calc(100vh - 4rem); }
tests/test_agent_editor_webui.py
+3
@@ -296,6 +296,9 @@ def test_agent_editor_store_has_no_conversational_or_model_builder_path() -> Non
296 assert "save_agent_data" not in source
297 assert not re.search(r"utility.?model|call.?model|generate", source, re.IGNORECASE)
298 assert "Advanced <span" not in modal
299 + assert 'class="toast-action-row"' in source
300 + assert 'class="button confirm"' in source
301 + assert "toast-link" not in source and ".toast-link" not in modal
302
303
304 @pytest.mark.skipif(not shutil.which("node"), reason="node is required")