Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test: add Playwright specs for keyboard navigation, sidebar, embedding, command palette, and redirec

Steven Enamakel725f1f1817b5
diff --git a/app/test/playwright/specs/app-shell-keyboard-navigation.spec.ts b/app/test/playwright/specs/app-shell-keyboard-navigation.spec.ts
index f70f5efefc..1b3ea98a57 100644
--- a/app/test/playwright/specs/app-shell-keyboard-navigation.spec.ts
+++ b/app/test/playwright/specs/app-shell-keyboard-navigation.spec.ts
@@ -59,7 +59,7 @@ test.describe('App shell — keyboard traversal', () => {
// element, so a focus-only check passes against exactly the regression the
// comment claimed to guard: a row that can be focused by script but can
// never be reached by Tab. Assert both.
- for (const id of ['chat', 'brain', 'flows', 'connections'] as const) {
+ for (const id of ['chat', 'flows', 'connections'] as const) {
await navRow(page, id).focus();
await expect.poll(() => focused(page)).toBe(`nav:tab-${id}`);
expect(
@@ -91,9 +91,9 @@ test.describe('App shell — keyboard traversal', () => {
// unmounts, and focus falls back to <body> — so the next Tab restarts from
// the top of the document and the user loses their place silently. Nothing
// in this repo checked it.
- await navRow(page, 'brain').focus();
+ await navRow(page, 'flows').focus();
await page.keyboard.press('Enter');
- await expect.poll(() => hash(page)).toMatch(/^#\/brain/);
+ await expect.poll(() => hash(page)).toMatch(/^#\/flows/);
await expect.poll(() => focused(page)).not.toBe('BODY');
});
diff --git a/app/test/playwright/specs/app-shell-sidebar.spec.ts b/app/test/playwright/specs/app-shell-sidebar.spec.ts
index bf6f865ce7..918ff7e7e0 100644
--- a/app/test/playwright/specs/app-shell-sidebar.spec.ts
+++ b/app/test/playwright/specs/app-shell-sidebar.spec.ts
@@ -54,7 +54,6 @@ test.describe('App shell — sidebar navigation', () => {
page,
}) => {
for (const [id, expectedHash] of [
- ['brain', '/brain'],
['flows', '/flows'],
['connections', '/connections'],
['chat', '/chat'],
diff --git a/app/test/playwright/specs/brain-embedding-truthfulness.spec.ts b/app/test/playwright/specs/brain-embedding-truthfulness.spec.ts
index f98c54434c..58857f68ba 100644
--- a/app/test/playwright/specs/brain-embedding-truthfulness.spec.ts
+++ b/app/test/playwright/specs/brain-embedding-truthfulness.spec.ts
@@ -314,6 +314,6 @@ test.describe('Brain — the UI tells the truth about embedding state', () => {
await expect
.poll(async () => page.evaluate(() => window.location.hash), { timeout: 20_000 })
- .toMatch(/^#\/brain\?tab=sync/);
+ .toMatch(/^#\/connections\?.*tab=brain.*brain=sync/);
});
});
diff --git a/app/test/playwright/specs/command-palette-keyboard.spec.ts b/app/test/playwright/specs/command-palette-keyboard.spec.ts
index badaac3082..1cbcd12666 100644
--- a/app/test/playwright/specs/command-palette-keyboard.spec.ts
+++ b/app/test/playwright/specs/command-palette-keyboard.spec.ts
@@ -53,7 +53,7 @@ const ITEM = '[cmdk-item]';
const DESTINATIONS: Record<string, RegExp> = {
'nav.home': /^#\/chat(?:[/?]|$)/, // /home -> /chat
'nav.chat': /^#\/chat(?:[/?]|$)/,
- 'nav.intelligence': /^#\/brain(?:[?]|$)/, // /settings/intelligence -> /brain
+ 'nav.intelligence': /^#\/connections\?.*tab=brain/, // /settings/intelligence -> /brain
'nav.skills': /^#\/connections(?:[?]|$)/,
'nav.activity': /^#\/settings\/notifications(?:[?]|$)/, // /activity -> here
'nav.settings': /^#\/settings\/account(?:[?]|$)/, // /settings index -> account
diff --git a/app/test/playwright/specs/route-redirect-history.spec.ts b/app/test/playwright/specs/route-redirect-history.spec.ts
index aba0359a77..224ad540a0 100644
--- a/app/test/playwright/specs/route-redirect-history.spec.ts
+++ b/app/test/playwright/specs/route-redirect-history.spec.ts
@@ -59,15 +59,15 @@ const EXPECTED_TOP_LEVEL_REDIRECTS = 9;
test.describe('Retired routes redirect without trapping the Back button', () => {
test.beforeEach(async ({ page }) => {
- await bootAuthenticatedPage(page, 'pw-redirect-history-user', '/brain');
+ await bootAuthenticatedPage(page, 'pw-redirect-history-user', '/chat');
});
for (const [retired, live] of REDIRECTS) {
test(`${retired} → ${live}, and Back leaves rather than re-entering`, async ({ page }) => {
// Establish a known previous page so "Back" has somewhere real to go.
- await page.goto('/#/brain');
+ await page.goto('/#/chat');
await waitForAppReady(page);
- await expect.poll(() => hash(page)).toMatch(/^#\/brain/);
+ await expect.poll(() => hash(page)).toMatch(/^#\/chat/);
await page.goto(`/#${retired}`);
await waitForAppReady(page);
@@ -83,7 +83,7 @@ test.describe('Retired routes redirect without trapping the Back button', () =>
.not.toMatch(new RegExp(`^#${retired.replace(/\//g, '\\/')}`));
// And we should be back where we came from.
- await expect.poll(() => hash(page), { timeout: 10_000 }).toMatch(/^#\/brain/);
+ await expect.poll(() => hash(page), { timeout: 10_000 }).toMatch(/^#\/chat/);
});
}
@@ -94,7 +94,7 @@ test.describe('Retired routes redirect without trapping the Back button', () =>
test.describe('The /channels redirect carries its tab selector through a real navigation', () => {
test.beforeEach(async ({ page }) => {
- await bootAuthenticatedPage(page, 'pw-redirect-tab-user', '/brain');
+ await bootAuthenticatedPage(page, 'pw-redirect-tab-user', '/chat');
});
test('/channels lands on the Connections messaging tab, not the default tab', async ({