diff --git a/apps/website/content/docs/chat/api/api-docs.json b/apps/website/content/docs/chat/api/api-docs.json index 1b0201a4..afa5cc20 100644 --- a/apps/website/content/docs/chat/api/api-docs.json +++ b/apps/website/content/docs/chat/api/api-docs.json @@ -3414,14 +3414,14 @@ { "name": "ChatSidenavScrimComponent", "kind": "class", - "description": "Backdrop scrim for chat-sidenav's drawer mode, rendered as a sibling of\n so its z-index sits cleanly between the page content\nand the drawer host (escapes the drawer host's stacking context).\n\nUsage:\n \n ", + "description": "Backdrop scrim for chat-sidenav's drawer mode, rendered as a sibling of\n so its z-index sits cleanly between the page content\nand the drawer host (escapes the drawer host's stacking context).\n\nUsage:\n \n ", "params": [], "examples": [], "properties": [ { - "name": "close", + "name": "closed", "type": "OutputEmitterRef", - "description": "Fires when the user clicks the backdrop.", + "description": "Fires when the user clicks the backdrop. Past-tense to avoid collision with native DOM close event.", "optional": false }, { @@ -7160,4 +7160,4 @@ }, "examples": [] } -] \ No newline at end of file +] diff --git a/cockpit/chat/subagents/angular/e2e/subagents.spec.ts b/cockpit/chat/subagents/angular/e2e/subagents.spec.ts deleted file mode 100644 index 5599ffd9..00000000 --- a/cockpit/chat/subagents/angular/e2e/subagents.spec.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { expect, test } from '@playwright/test'; - -test.describe('Chat Subagents Example', () => { - test.beforeEach(async ({ page }) => { - await page.goto('http://localhost:4505'); - await page.waitForSelector('app-subagents', { state: 'attached' }); - }); - - test('renders the chat interface with subagents sidebar', async ({ page }) => { - await expect(page.locator('chat')).toBeVisible(); - await expect(page.locator('aside')).toBeVisible(); - await expect(page.locator('aside h3')).toHaveText('Active Subagents'); - }); - - test('displays the agent pipeline', async ({ page }) => { - await expect(page.locator('aside')).toContainText('Orchestrator'); - await expect(page.locator('aside')).toContainText('Research Agent'); - await expect(page.locator('aside')).toContainText('Analysis Agent'); - await expect(page.locator('aside')).toContainText('Summary Agent'); - }); -}); diff --git a/examples/chat/angular/src/app/shell/demo-shell.component.html b/examples/chat/angular/src/app/shell/demo-shell.component.html index e8402678..0cd681f6 100644 --- a/examples/chat/angular/src/app/shell/demo-shell.component.html +++ b/examples/chat/angular/src/app/shell/demo-shell.component.html @@ -60,7 +60,7 @@ { expect(btn.getAttribute('aria-label')).toBe('Close conversations'); }); - it('emits (close) on click', () => { + it('emits (closed) on click', () => { fx.componentRef.setInput('open', true); fx.detectChanges(); let closed = false; - fx.componentInstance.close.subscribe(() => { closed = true; }); + fx.componentInstance.closed.subscribe(() => { closed = true; }); const btn = fx.nativeElement.querySelector('button.chat-sidenav-scrim__button') as HTMLButtonElement; btn.click(); expect(closed).toBe(true); diff --git a/libs/chat/src/lib/primitives/chat-sidenav-scrim/chat-sidenav-scrim.component.ts b/libs/chat/src/lib/primitives/chat-sidenav-scrim/chat-sidenav-scrim.component.ts index 41d107f0..d8e823cc 100644 --- a/libs/chat/src/lib/primitives/chat-sidenav-scrim/chat-sidenav-scrim.component.ts +++ b/libs/chat/src/lib/primitives/chat-sidenav-scrim/chat-sidenav-scrim.component.ts @@ -8,7 +8,7 @@ import { ChangeDetectionStrategy, Component, input, output } from '@angular/core * and the drawer host (escapes the drawer host's stacking context). * * Usage: - * + * * */ @Component({ @@ -43,6 +43,8 @@ import { ChangeDetectionStrategy, Component, input, output } from '@angular/core export class ChatSidenavScrimComponent { /** When true, render the backdrop button covering the viewport. */ readonly open = input(false); - /** Fires when the user clicks the backdrop. */ - readonly close = output(); + /** Fires when the user clicks the backdrop. Past-tense to avoid + * collision with the native DOM `close` event (per + * `@angular-eslint/no-output-native`). */ + readonly closed = output(); }