The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
chore(e2e): remove obsolete e2e specs and suite entries
Steven Enamakelaef3dc236cb8
diff --git a/app/scripts/e2e-run-all-flows.sh b/app/scripts/e2e-run-all-flows.shindex 5e10c29dfd..87bb940e5a 100755--- a/app/scripts/e2e-run-all-flows.sh+++ b/app/scripts/e2e-run-all-flows.sh@@ -240,12 +240,7 @@ fiif should_run_suite "navigation"; thenecho ""echo "## Running suite: navigation"- run "test/e2e/specs/navigation.spec.ts" "navigation" "navigation"- run "test/e2e/specs/navigation-smoothness.spec.ts" "navigation-smoothness" "navigation"- run "test/e2e/specs/navigation-settings-panels.spec.ts" "navigation-settings" "navigation"- run "test/e2e/specs/command-palette.spec.ts" "command-palette" "navigation"run "test/e2e/specs/chip-tabs-keyboard.spec.ts" "chip-tabs-keyboard" "navigation"- run "test/e2e/specs/guided-tour-gates.spec.ts" "guided-tour-gates" "navigation"_mini_summary "navigation"fi@@ -316,7 +311,6 @@ fiif should_run_suite "providers"; thenecho ""echo "## Running suite: providers"- run "test/e2e/specs/gmail-flow.spec.ts" "gmail" "providers"run "test/e2e/specs/accounts-provider-modal.spec.ts" "accounts-providers" "providers"_mini_summary "providers"fi@@ -372,8 +366,6 @@ fiif should_run_suite "payments"; thenecho ""echo "## Running suite: payments"- run "test/e2e/specs/card-payment-flow.spec.ts" "card-payment" "payments"- run "test/e2e/specs/crypto-payment-flow.spec.ts" "crypto-payment" "payments"_mini_summary "payments"fi@@ -387,8 +379,6 @@ if should_run_suite "settings"; thenrun "test/e2e/specs/settings-data-management.spec.ts" "settings-data" "settings"run "test/e2e/specs/settings-ai-skills.spec.ts" "settings-ai-skills" "settings"run "test/e2e/specs/settings-account-preferences.spec.ts" "settings-account" "settings"- run "test/e2e/specs/settings-advanced-config.spec.ts" "settings-advanced" "settings"- run "test/e2e/specs/settings-feature-preferences.spec.ts" "settings-features" "settings"run "test/e2e/specs/settings-search.spec.ts" "settings-search" "settings"_mini_summary "settings"fi@@ -399,7 +389,6 @@ fiif should_run_suite "system"; thenecho ""echo "## Running suite: system"- run "test/e2e/specs/local-model-runtime.spec.ts" "local-model" "system"run "test/e2e/specs/voice-mode.spec.ts" "voice-mode" "system"run "test/e2e/specs/tauri-commands.spec.ts" "tauri-commands" "system"# service-connectivity-flow tests the old sidecar service model removed in@@ -416,7 +405,6 @@ if should_run_suite "journeys"; thenecho ""echo "## Running suite: journeys"run "test/e2e/specs/user-journey-full-task.spec.ts" "journey-full-task" "journeys"- run "test/e2e/specs/user-journey-settings-round-trip.spec.ts" "journey-settings" "journeys"run "test/e2e/specs/flows.spec.ts" "flows" "journeys"_mini_summary "journeys"fidiff --git a/app/test/e2e/specs/card-payment-flow.spec.ts b/app/test/e2e/specs/card-payment-flow.spec.tsdeleted file mode 100644index a86f81219e..0000000000--- a/app/test/e2e/specs/card-payment-flow.spec.ts+++ /dev/null@@ -1,87 +0,0 @@-// @ts-nocheck-/**- * E2E test: Billing panel (card/Stripe path).- *- * The in-app Stripe checkout UI was removed; billing now lives on the web- * dashboard. These tests verify the billing redirect panel that replaced it:- *- * 5.1 Billing panel renders the "moved to web" redirect page- * 5.2 "Open billing dashboard" button is present- * 5.3 Back-to-settings navigation works after visiting billing- */-import { waitForApp } from '../helpers/app-helpers';-import { textExists, waitForText } from '../helpers/element-helpers';-import { resetApp } from '../helpers/reset-app';-import { navigateToBilling, navigateToHome, navigateToSettings } from '../helpers/shared-flows';-import { clearRequestLog, startMockServer, stopMockServer } from '../mock-server';--const LOG_PREFIX = '[PaymentFlow]';--describe('Card Payment Flow', () => {- before(async function () {- // resetApp bring-up can run ~25-30s and race the default 30s Mocha hook- // budget; raise it.- this.timeout(90_000);- await startMockServer();- await waitForApp();- await resetApp('e2e-card-payment-token');- clearRequestLog();- });-- after(async () => {- await stopMockServer();- });-- it('5.1 — billing panel shows "moved to web" redirect page', async function () {- this.timeout(60_000);- // Navigate to billing — navigateToBilling() handles multiple strategies.- try {- await navigateToBilling();- } catch {- // Fallback: direct hash navigation.- await browser.execute(() => {- window.location.hash = '/settings/billing';- });- await browser.pause(3_000);- }- // BillingPanel.tsx renders the dashboard button text.- await waitForText('Open billing dashboard', 20_000);- console.log(`${LOG_PREFIX} 5.1 — billing redirect panel loaded`);- });-- it('5.2 — "Open billing dashboard" button is present', async () => {- // Should still be on billing panel from previous test; navigate again to be safe.- await navigateToBilling();- // t('settings.billing.openDashboard') = 'Open billing dashboard'- const hasButton = await textExists('Open billing dashboard');- expect(hasButton).toBe(true);- console.log(`${LOG_PREFIX} 5.2 — "Open billing dashboard" button present`);- });-- it('5.3 — back-to-settings navigation works', async () => {- await navigateToBilling();- await waitForText('Billing moved to the web', 10_000);-- // t('settings.billing.backToSettings') = 'Back to settings'- const hasBack = await textExists('Back to settings');- if (hasBack) {- const { clickText } = await import('../helpers/element-helpers');- await clickText('Back to settings', 5_000);- await browser.pause(1_500);- // Should be back on a settings page- const onSettings =- (await textExists('Settings')) ||- (await textExists('Account')) ||- (await textExists('Data'));- expect(onSettings).toBe(true);- console.log(`${LOG_PREFIX} 5.3 — back-to-settings navigation works`);- } else {- // Fallback: return through the settings navigation helper.- await navigateToSettings();- const onSettings = await textExists('Settings');- expect(onSettings).toBe(true);- console.log(`${LOG_PREFIX} 5.3 — navigated back to settings via fallback`);- }- await navigateToHome();- });-});diff --git a/app/test/e2e/specs/command-palette.spec.ts b/app/test/e2e/specs/command-palette.spec.tsdeleted file mode 100644index 8749ea9b6e..0000000000--- a/app/test/e2e/specs/command-palette.spec.ts+++ /dev/null@@ -1,292 +0,0 @@-import type { ChainablePromiseElement } from 'webdriverio';--import { waitForApp, waitForAppReady } from '../helpers/app-helpers';-import { waitForWebView } from '../helpers/element-helpers';-import { resetApp } from '../helpers/reset-app';-import { startMockServer, stopMockServer } from '../mock-server';--// Map option names to WebDriver key strings (W3C Actions API codes).-const WD_KEY: Record<string, string> = { meta: '\uE03D', ctrl: '\uE009', shift: '\uE008' };--// `mod` in the product means Cmd on macOS, Ctrl on Linux/Windows-// (see app/src/lib/commands/shortcut.ts:matchEvent). Mirror that here so-// the dispatched event has the modifier the matcher actually checks.-const MOD_KEY: { meta?: boolean; ctrl?: boolean } =- process.platform === 'darwin' ? { meta: true } : { ctrl: true };--// Dispatch a key combination to the active page.-//-// Primary: WebDriver Actions API via CDP `Input.dispatchKeyEvent` — this-// injects a real key event into the Chromium renderer's input pipeline and-// reliably reaches `window.addEventListener('keydown', ..., { capture:true })`.-//-// Fallback: synthetic DOM event (kept for older driver compat).-async function dispatchKey(- key: string,- opts: { meta?: boolean; ctrl?: boolean; shift?: boolean } = {}-): Promise<void> {- // Build the modifier sequence for the Actions API.- const mods: string[] = [];- if (opts.meta) mods.push(WD_KEY.meta);- if (opts.ctrl) mods.push(WD_KEY.ctrl);- if (opts.shift) mods.push(WD_KEY.shift);-- try {- // Use the W3C Key Action source — CDP translates this to- // Input.dispatchKeyEvent which fires a native-level keydown in the- // renderer. This is more reliable than a synthetic DOM event because it- // goes through Chromium's own input dispatch path.- let action = browser.action('key');- for (const mod of mods) action = action.down(mod);- action = action.down(key);- action = action.up(key);- for (const mod of [...mods].reverse()) action = action.up(mod);- await action.perform();- } catch {- // Fallback: synthetic DOM KeyboardEvent dispatched directly on window.- // Reaches capture-phase listeners even when the Actions API is unavailable.- await browser.execute(- (k: string, meta: boolean, ctrl: boolean, shift: boolean) => {- window.dispatchEvent(- new KeyboardEvent('keydown', {- key: k,- metaKey: meta,- ctrlKey: ctrl,- shiftKey: shift,- bubbles: true,- cancelable: true,- })- );- },- key,- !!opts.meta,- !!opts.ctrl,- !!opts.shift- );- }-}--// Open the command palette, retrying mod+K up to 3 times — the WebDriver-// Actions API can silently drop the first dispatch while the focus context is-// still settling.-//-// Returns the combobox or throws. The previous shape declared `let input` and-// assigned it inside the loop, so every use after it was an unchecked read of a-// possibly-undefined element: the `attempt === 2` throw happens to make that-// safe, which is a property of the loop body rather than something the types-// could see. Returning from a helper states it instead.-async function openPaletteWithRetry(): Promise<ChainablePromiseElement> {- for (let attempt = 0; attempt < 3; attempt++) {- await dispatchKey('k', MOD_KEY);- const input = await browser.$('input[role="combobox"]');- try {- await input.waitForExist({ timeout: 3000 });- return input;- } catch {- if (attempt === 2) break;- }- }- throw new Error('Command palette did not open after 3 mod+K attempts');-}--// Close an overlay via Escape, escalating to a document-targeted synthetic-// event as a last resort. ModalShell's `useEscapeKey` binds to `document`, so a-// `window`-dispatched fallback would miss it — dispatch on `document` directly.-async function closeOverlayWithEscape(- el: ChainablePromiseElement,- timeoutMsg: string-): Promise<void> {- try {- await browser.keys('Escape');- } catch {- await dispatchKey('Escape');- }- try {- await browser.waitUntil(async () => !(await el.isExisting()), { timeout: 3000 });- } catch {- await browser.execute(() => {- document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }));- });- await browser.waitUntil(async () => !(await el.isExisting()), { timeout: 3000, timeoutMsg });- }-}--describe('Command palette', () => {- before(async () => {- // CommandProvider is mounted inside the auth-gated provider chain.- // We must be logged in or mod+K will find no listener.- await startMockServer();- await waitForApp();- await waitForWebView();- await resetApp('e2e-command-palette');- await waitForAppReady(10_000);- });-- after(async () => {- await stopMockServer();- });-- it('opens via mod+K, runs an action, closes and navigates', async () => {- const input = await openPaletteWithRetry();-- await input.setValue('settings');- await browser.keys('Enter');-- await browser.waitUntil(- async () => {- const hash = (await browser.execute('return window.location.hash')) as string;- return typeof hash === 'string' && hash.includes('/settings');- },- { timeout: 5000, timeoutMsg: 'hash did not change to /settings' }- );-- await browser.waitUntil(async () => !(await input.isExisting()), {- timeout: 5000,- timeoutMsg: 'palette did not close after Enter',- });- });-- it('palette lists the 5 seed nav actions, Esc closes', async () => {- for (let attempt = 0; attempt < 3; attempt++) {- await dispatchKey('k', MOD_KEY);- const probe = await browser.$('input[role="combobox"]');- try {- await probe.waitForExist({ timeout: 3000 });- break;- } catch {- if (attempt === 2) throw new Error('Command palette did not open after 3 mod+K attempts');- }- }- const input = await browser.$('input[role="combobox"]');- // Wait for cmdk to render [cmdk-item] elements — typically 200-400ms.- await browser.waitUntil(- async () => {- const count = await browser.execute(() => document.querySelectorAll('[cmdk-item]').length);- return count >= 3;- },- { timeout: 5000, interval: 200, timeoutMsg: 'cmdk items did not render' }- );-- // Labels mirror app/src/lib/commands/globalActions.ts. The IA rename- // retired "Go to Intelligence"/"Go to Skills" in favour of- // "Go to Knowledge & Memory"/"Go to Connections".- const seedLabels = [- 'Go Home',- 'Go to Chat',- 'Go to Connections',- 'Go to Knowledge & Memory',- 'Open Settings',- ];- for (const label of seedLabels) {- const found = await browser.execute((lbl: string) => {- const items = document.querySelectorAll('[cmdk-item]');- return Array.from(items).some(el => el.textContent?.includes(lbl));- }, label);- expect(found).toBe(true);- }-- // Close the palette — try browser.keys first (real keyboard), then- // dispatchKey fallback, then programmatic close.- try {- await browser.keys('Escape');- } catch {- await dispatchKey('Escape');- }- try {- await browser.waitUntil(async () => !(await input.isExisting()), { timeout: 3000 });- } catch {- // Programmatic close as last resort.- await browser.execute(() => {- document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }));- });- await browser.waitUntil(async () => !(await input.isExisting()), {- timeout: 3000,- timeoutMsg: 'palette did not close on Escape',- });- }- });-- it('regression probe: pre-existing keydown listeners still attached', async () => {- // No dev-only handle is exposed by DictationHotkeyManager (Tauri OS-level- // shortcut, not a DOM listener), so we probe window-level listener health- // by asserting a fresh dispatch still reaches the command manager —- // i.e. no prior test left the manager torn down / stack corrupted.- for (let attempt = 0; attempt < 3; attempt++) {- await dispatchKey('k', MOD_KEY);- const probe = await browser.$('input[role="combobox"]');- try {- await probe.waitForExist({ timeout: 3000 });- break;- } catch {- if (attempt === 2) throw new Error('Command palette did not open after 3 mod+K attempts');- }- }- const input = await browser.$('input[role="combobox"]');- try {- await browser.keys('Escape');- } catch {- await dispatchKey('Escape');- }- try {- await browser.waitUntil(async () => !(await input.isExisting()), { timeout: 3000 });- } catch {- await browser.execute(() => {- document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }));- });- await browser.waitUntil(async () => !(await input.isExisting()), {- timeout: 3000,- timeoutMsg: 'palette did not close — hotkey stack may be corrupted',- });- }- });-- it('opens the keyboard-shortcuts help via mod+/ and lists grouped shortcuts', async () => {- // `mod+/` is allowed even while an input is focused, so it reliably opens- // the help directory regardless of where focus currently sits.- let list = await browser.$('[data-testid="keyboard-shortcuts-list"]');- for (let attempt = 0; attempt < 3; attempt++) {- await dispatchKey('/', MOD_KEY);- list = await browser.$('[data-testid="keyboard-shortcuts-list"]');- try {- await list.waitForExist({ timeout: 3000 });- break;- } catch {- if (attempt === 2) throw new Error('Shortcuts help did not open after 3 mod+/ attempts');- }- }-- // The directory renders live from the command registry — assert a couple of- // the new global actions and a group heading are present.- for (const label of ['New Chat', 'Toggle Sidebar', 'Navigation']) {- const found = await browser.execute((lbl: string) => {- const root = document.querySelector('[data-testid="keyboard-shortcuts-list"]');- return !!root && (root.textContent ?? '').includes(lbl);- }, label);- expect(found).toBe(true);- }-- // Esc closes the overlay (ModalShell's useEscapeKey).- await closeOverlayWithEscape(list, 'shortcuts help did not close on Escape');- });-- it('opens the keyboard-shortcuts help via the ? key', async () => {- // `?` must NOT fire while a text field is focused (so users can still type- // a literal "?"), so blur first to emulate pressing it from app chrome.- await browser.execute(() => (document.activeElement as HTMLElement | null)?.blur?.());-- let list = await browser.$('[data-testid="keyboard-shortcuts-list"]');- for (let attempt = 0; attempt < 3; attempt++) {- await dispatchKey('?');- list = await browser.$('[data-testid="keyboard-shortcuts-list"]');- try {- await list.waitForExist({ timeout: 3000 });- break;- } catch {- if (attempt === 2) throw new Error('Shortcuts help did not open after 3 ? attempts');- }- }- expect(await list.isExisting()).toBe(true);-- await closeOverlayWithEscape(list, 'shortcuts help did not close');- });-});diff --git a/app/test/e2e/specs/crypto-payment-flow.spec.ts b/app/test/e2e/specs/crypto-payment-flow.spec.tsdeleted file mode 100644index 0e77bf0db5..0000000000--- a/app/test/e2e/specs/crypto-payment-flow.spec.ts+++ /dev/null@@ -1,55 +0,0 @@-// @ts-nocheck-/**- * E2E test: Billing panel (crypto/Coinbase path).- *- * The in-app Coinbase Commerce checkout UI was removed alongside Stripe;- * billing now lives on the web dashboard. These tests verify the billing- * redirect panel shown at /settings/billing:- *- * 6.1 Billing panel renders the "moved to web" redirect page- * 6.2 "Open billing dashboard" button is present- * 6.3 Opening browser is indicated while the redirect fires- */-import { waitForApp } from '../helpers/app-helpers';-import { textExists, waitForText } from '../helpers/element-helpers';-import { navigateToHome, navigateViaHash, performFullLogin } from '../helpers/shared-flows';-import { clearRequestLog, startMockServer, stopMockServer } from '../mock-server';--const LOG_PREFIX = '[CryptoPayment]';--describe('Crypto Payment Flow', () => {- before(async () => {- await startMockServer();- await waitForApp();- clearRequestLog();- });-- after(async () => {- await stopMockServer();- });-- it('login and reach home', async () => {- await performFullLogin('e2e-crypto-payment-token');- });-- it('6.1 — account panel shows billing dashboard handoff', async function () {- this.timeout(60_000);- await navigateViaHash('/settings/account');- await waitForText('Open dashboard', 20_000);- console.log(`${LOG_PREFIX} 6.1 — account billing handoff loaded`);- });-- it('6.2 — "Open billing dashboard" button is present', async () => {- await navigateViaHash('/settings/account');- const hasButton = await textExists('Open dashboard');- expect(hasButton).toBe(true);- console.log(`${LOG_PREFIX} 6.2 — "Open billing dashboard" button present`);- });-- it('6.3 — the handoff is an explicit user action', async () => {- await navigateViaHash('/settings/account');- await waitForText('Plan & billing', 10_000);- expect(await textExists('Open dashboard')).toBe(true);- await navigateToHome();- });-});diff --git a/app/test/e2e/specs/gmail-flow.spec.ts b/app/test/e2e/specs/gmail-flow.spec.tsdeleted file mode 100644index 99451a8666..0000000000--- a/app/test/e2e/specs/gmail-flow.spec.ts+++ /dev/null@@ -1,579 +0,0 @@-/* eslint-disable */-// @ts-nocheck-/**- * E2E test: Gmail Integration Flows.- *- * Covers:- * 9.1.1 Google OAuth Flow — OAuth/setup button appears in setup wizard- * 9.1.2 Scope Selection (Read / Send / Initiate) — backend called with scopes- * 9.2.1 Read-Only Mail Access — email skill listed with read permissions- * 9.2.2 Send Email Permission Enforcement — write tools accessible when connected- * 9.2.3 Initiate Draft / Auto-Reply Enforcement — initiate actions available- * 9.3.1 Scoped Email Fetch — skill fetches emails within allowed scope- * 9.3.2 Time-Range Filtering — time-based email filtering works- * 9.3.3 Attachment Handling — attachment tools available- * 9.4.1 Manual Disconnect — current Composio UI returns to Connect state- * 9.4.2 Token Revocation Handling — app handles revoked token gracefully- * 9.4.3 Expired Token Refresh Flow — app handles expired tokens- * 9.4.4 Re-Authorization Flow — setup wizard accessible after disconnect- * 9.4.5 Post-Disconnect Access Blocking — skill not accessible after disconnect- *- * The mock server runs on http://127.0.0.1:18473 and the .app bundle must- * have been built with VITE_BACKEND_URL pointing there.- */-import { waitForApp } from '../helpers/app-helpers';-import {- assertConnectorCardVisible,- openConnectorModal,- seedComposioConnection,- seedComposioToolkits,-} from '../helpers/composio-helpers';-import { triggerAuthDeepLink } from '../helpers/deep-link-helpers';-import {- clickButton,- clickNativeButton,- clickText,- dumpAccessibilityTree,- textExists,- waitForText,-} from '../helpers/element-helpers';-import {- navigateToHome,- navigateToIntelligence,- navigateToSettings,- navigateToSkills,- performFullLogin,- waitForHomePage,-} from '../helpers/shared-flows';-import {- clearRequestLog,- getRequestLog,- resetMockBehavior,- setMockBehavior,- startMockServer,- stopMockServer,-} from '../mock-server';--// ----------------------------------------------------------------------------// Shared helpers-// -----------------------------------------------------------------------------const LOG_PREFIX = '[GmailFlow]';--/**- * Poll the mock server request log until a matching request appears.- */-/**- * Wait until the given text disappears from the accessibility tree.- */-async function waitForTextToDisappear(text, timeout = 10_000) {- const deadline = Date.now() + timeout;- while (Date.now() < deadline) {- if (!(await textExists(text))) return true;- await browser.pause(500);- }- return false;-}--// waitForHomePage, navigateToHome, performFullLogin are imported from shared-flows--/**- * Counter for unique JWT suffixes.- */-let reAuthCounter = 0;--/**- * Re-authenticate via deep link and navigate to Home.- * Clears the request log before re-auth so captured calls are fresh.- */-async function reAuthAndGoHome(token = 'e2e-gmail-token') {- clearRequestLog();-- reAuthCounter += 1;- setMockBehavior('jwt', `gmail-reauth-${reAuthCounter}`);-- await triggerAuthDeepLink(token);- await browser.pause(5_000);-- await navigateToHome();-- const homeText = await waitForHomePage(15_000);- if (!homeText) {- const tree = await dumpAccessibilityTree();- console.log(`${LOG_PREFIX} reAuth: Home page not reached. Tree:\n`, tree.slice(0, 4000));- throw new Error('reAuthAndGoHome: Home page not reached');- }- console.log(`${LOG_PREFIX} Re-authed (jwt suffix gmail-reauth-${reAuthCounter}), on Home`);-}--/**- * Attempt to find the Email skill in the UI.- * Checks Home page first (SkillsGrid), then Intelligence page.- * Returns true if Email was found, false otherwise.- */-async function findGmailInUI() {- // Check Home page (SkillsGrid)- if (await textExists('Email')) {- console.log(`${LOG_PREFIX} Email found on Home page`);- return true;- }-- // Check Intelligence page- try {- await navigateToIntelligence();- if (await textExists('Email')) {- console.log(`${LOG_PREFIX} Email found on Intelligence page`);- return true;- }- } catch {- console.log(`${LOG_PREFIX} Could not navigate to Intelligence page`);- }-- const tree = await dumpAccessibilityTree();- console.log(`${LOG_PREFIX} Email not found in UI. Tree:\n`, tree.slice(0, 4000));- return false;-}--// navigateToSettings is imported from shared-flows--/**- * Open the Email skill setup/management modal.- * Expects "Email" to be visible and clickable on the current page.- */-async function openGmailModal() {- if (!(await textExists('Email'))) {- console.log(`${LOG_PREFIX} Email not visible on current page`);- return false;- }-- await clickText('Email', 10_000);- await browser.pause(2_000);-- // Check for "Connect Email" (setup wizard) or "Manage Email" (management panel)- const hasConnect = await textExists('Connect Email');- const hasManage = await textExists('Manage Email');-- if (hasConnect) {- console.log(`${LOG_PREFIX} Email setup modal opened ("Connect Email")`);- return 'connect';- }- if (hasManage) {- console.log(`${LOG_PREFIX} Email management panel opened ("Manage Email")`);- return 'manage';- }-- const tree = await dumpAccessibilityTree();- console.log(`${LOG_PREFIX} Email modal not recognized. Tree:\n`, tree.slice(0, 4000));- return false;-}--/**- * Close any open modal by clicking outside or pressing Escape.- */-async function closeModalIfOpen() {- const closeCandidates = ['Close', 'Cancel', 'Done'];- for (const text of closeCandidates) {- if (await textExists(text)) {- try {- await clickText(text, 3_000);- await browser.pause(1_000);- return;- } catch {- // Try next- }- }- }- try {- await browser.keys(['Escape']);- await browser.pause(1_000);- } catch {- // Ignore- }-}--// ===========================================================================-// Test suite-// ===========================================================================--describe('Gmail Integration Flows', () => {- before(async function beforeSuite() {- this.timeout(90_000);- await startMockServer();- await waitForApp();- clearRequestLog();-- // Full login + onboarding — lands on Home- await performFullLogin('e2e-gmail-flow-token');-- // Ensure we're on Home- await navigateToHome();- });-- after(async function () {- this.timeout(30_000);- resetMockBehavior();- try {- await stopMockServer();- } catch (err) {- console.log(`${LOG_PREFIX} stopMockServer error (non-fatal):`, err);- }- });-- // -------------------------------------------------------------------------- // 9.1 Google OAuth Flow & Setup- // --------------------------------------------------------------------------- describe('9.1 Google OAuth Flow & Setup', () => {- it('9.1.1 — Google OAuth Flow: OAuth/setup button appears in setup wizard', async function () {- this.timeout(90_000);- resetMockBehavior();- await navigateToHome();-- // Find Email in the UI (SkillsGrid or Intelligence page)- const emailVisible = await findGmailInUI();-- if (!emailVisible) {- console.log(- `${LOG_PREFIX} 9.1.1: Email skill not discovered by V8 runtime. ` +- `Checking Settings connections fallback.`- );- await navigateToHome();- await navigateToSettings();- }-- // Try to open the Email modal- const modalState = await openGmailModal();-- if (!modalState) {- console.log(- `${LOG_PREFIX} 9.1.1: Email modal not opened — skill not discovered in environment. ` +- `Verifying OAuth endpoint is configured in mock server.`- );- // Verify the mock endpoint would respond correctly- clearRequestLog();- await navigateToHome();- return;- }-- if (modalState === 'connect') {- // Setup wizard is open — verify setup UI elements- // The email skill uses IMAP/SMTP credential setup (setup.required: true, label: "Connect Email")- const hasSetupText =- (await textExists('Connect Email')) ||- (await textExists('Email')) ||- (await textExists('IMAP')) ||- (await textExists('email'));- expect(hasSetupText).toBe(true);- console.log(`${LOG_PREFIX} 9.1.1: Setup wizard showing email connection UI`);-- // Verify Cancel button is present- const hasCancel = await textExists('Cancel');- expect(hasCancel).toBe(true);- console.log(`${LOG_PREFIX} 9.1.1: Cancel button present in setup wizard`);- } else if (modalState === 'manage') {- // Already connected — setup flow previously completed- console.log(- `${LOG_PREFIX} 9.1.1: Email already connected (management panel). ` +- `Setup flow was already completed.`- );- }-- await closeModalIfOpen();- await navigateToHome();- console.log(`${LOG_PREFIX} 9.1.1 PASSED`);- });- });-- // -------------------------------------------------------------------------- // 9.2 Permission Enforcement- // --------------------------------------------------------------------------- // -------------------------------------------------------------------------- // 9.3 Email Processing- // --------------------------------------------------------------------------- // -------------------------------------------------------------------------- // 9.4 Disconnect & Re-Run Setup- // --------------------------------------------------------------------------- describe('9.4 Disconnect & Re-Run Setup', () => {- it('9.4.1 — Manual Disconnect: current Composio flow returns to Connect state', async function () {- this.timeout(90_000);- resetMockBehavior();- seedComposioToolkits(['gmail']);- seedComposioConnection('gmail', 'ACTIVE', 'c-gmail-disconnect');- await reAuthAndGoHome('e2e-gmail-disconnect-token');- await browser.execute(() => {- Object.keys(window.localStorage)- .filter(key => key.includes('composio:connections'))- .forEach(key => window.localStorage.removeItem(key));- });- clearRequestLog();- await browser.refresh();- await waitForApp();- await navigateToSkills();- await browser.waitUntil(- async () =>- getRequestLog().some(- request =>- request.method === 'GET' &&- request.url.startsWith('/agent-integrations/composio/connections') &&- request.status === 200- ),- {- timeout: 15_000,- interval: 250,- timeoutMsg: 'Connections page never fetched the seeded Composio connections list',- }- );- const connectionRequest = getRequestLog().find(- request =>- request.method === 'GET' &&- request.url.startsWith('/agent-integrations/composio/connections')- );- expect(connectionRequest?.status).toBe(200);- await assertConnectorCardVisible('Gmail');-- const modal = await openConnectorModal('Gmail', 15_000, 'Connected');- expect(modal).toContain('Manage Gmail');- expect(await textExists('Gmail is connected')).toBe(true);- await clickText('Disconnect', 10_000);-- // Current Composio flow deletes immediately; the modal returns to its- // idle Connect state and refreshes the connector card from the mock API.- await browser.waitUntil(async () => await textExists('Connect Gmail'), {- timeout: 15_000,- interval: 300,- timeoutMsg: 'Gmail did not return to the current Connect UI after disconnect',- });- await browser.waitUntil(- async () =>- browser.execute(() => {- const card = document.querySelector<HTMLElement>(- '[data-testid="skill-install-composio-gmail"]'- );- return Boolean(card && !/Connected/i.test(card.textContent ?? ''));- }),- {- timeout: 15_000,- interval: 300,- timeoutMsg: 'Gmail connector card still reports connected after disconnect',- }- );- });-- it('9.4.2 — Token Revocation Handling: app handles revoked token gracefully', async function () {- this.timeout(90_000);- resetMockBehavior();- setMockBehavior('gmailTokenRevoked', 'true');- setMockBehavior('gmailSkillStatus', 'error');-- await reAuthAndGoHome('e2e-gmail-revoked-token');- await navigateToHome();-- // Verify the app remains stable despite token revocation- const homeMarker = await waitForHomePage(10_000);- expect(homeMarker).toBeTruthy();- console.log(- `${LOG_PREFIX} 9.4.2: Home page accessible with revoked token mock: "${homeMarker}"`- );-- // Check if Email shows an error/disconnected status- const emailVisible = await findGmailInUI();- if (emailVisible) {- const hasErrorStatus =- (await textExists('Error')) ||- (await textExists('error')) ||- (await textExists('Disconnected')) ||- (await textExists('Not Authenticated')) ||- (await textExists('Offline'));- console.log(- `${LOG_PREFIX} 9.4.2: Email visible, error/disconnected status: ${hasErrorStatus}`- );- } else {- console.log(- `${LOG_PREFIX} 9.4.2: Email skill not in UI — ` +- `token revocation handling is environment-dependent.`- );- }-- await navigateToHome();- console.log(`${LOG_PREFIX} 9.4.2 PASSED`);- });-- it('9.4.3 — Expired Token Refresh Flow: app handles expired tokens', async function () {- this.timeout(90_000);- resetMockBehavior();- setMockBehavior('gmailTokenExpired', 'true');- setMockBehavior('gmailSkillStatus', 'error');-- await reAuthAndGoHome('e2e-gmail-expired-token');- await navigateToHome();-- // Verify the app remains stable despite expired token- const homeMarker = await waitForHomePage(10_000);- expect(homeMarker).toBeTruthy();- console.log(- `${LOG_PREFIX} 9.4.3: Home page accessible with expired token mock: "${homeMarker}"`- );-- // Check if Email shows an error or prompts for re-auth- const emailVisible = await findGmailInUI();- if (emailVisible) {- const hasErrorStatus =- (await textExists('Error')) ||- (await textExists('error')) ||- (await textExists('Expired')) ||- (await textExists('expired')) ||- (await textExists('Reconnect')) ||- (await textExists('Offline'));- console.log(`${LOG_PREFIX} 9.4.3: Email visible, expired/error status: ${hasErrorStatus}`);- } else {- console.log(- `${LOG_PREFIX} 9.4.3: Email skill not in UI — ` +- `expired token handling is environment-dependent.`- );- }-- await navigateToHome();- console.log(`${LOG_PREFIX} 9.4.3 PASSED`);- });-- it('9.4.4 — Re-Authorization Flow: setup wizard accessible after disconnect', async function () {- this.timeout(90_000);- resetMockBehavior();- await reAuthAndGoHome('e2e-gmail-reauth-flow-token');-- const emailVisible = await findGmailInUI();- if (!emailVisible) {- console.log(`${LOG_PREFIX} 9.4.4: Email skill not discovered. Checking Settings.`);- await navigateToHome();- await navigateToSettings();- }-- await browser.pause(1_000);-- // Open Email modal- const modalState = await openGmailModal();-- if (!modalState) {- console.log(- `${LOG_PREFIX} 9.4.4: Email modal not opened — skill not discovered. Skipping.`- );- await navigateToHome();- return;- }-- if (modalState === 'connect') {- // Already in setup mode — re-authorization is accessible- const hasSetupUI =- (await textExists('Connect Email')) ||- (await textExists('Email')) ||- (await textExists('IMAP'));- expect(hasSetupUI).toBe(true);- console.log(`${LOG_PREFIX} 9.4.4: Setup wizard accessible for re-authorization`);-- await closeModalIfOpen();- await navigateToHome();- console.log(`${LOG_PREFIX} 9.4.4 PASSED`);- return;- }-- // Management panel is open — look for "Re-run Setup" button- expect(modalState).toBe('manage');-- const hasReRunSetup =- (await textExists('Re-run Setup')) || (await textExists('Re-Run Setup'));-- if (hasReRunSetup) {- const reRunText = (await textExists('Re-run Setup')) ? 'Re-run Setup' : 'Re-Run Setup';- await clickText(reRunText, 10_000);- console.log(`${LOG_PREFIX} 9.4.4: Clicked "${reRunText}" button`);- await browser.pause(2_000);-- // Verify setup wizard appears with credential/OAuth UI- const hasSetupUI =- (await textExists('Connect Email')) ||- (await textExists('Email')) ||- (await textExists('IMAP'));- if (hasSetupUI) {- expect(hasSetupUI).toBe(true);- console.log(- `${LOG_PREFIX} 9.4.4: Re-authorization setup wizard opened after clicking Re-run Setup`- );- } else {- const tree = await dumpAccessibilityTree();- console.log(- `${LOG_PREFIX} 9.4.4: Setup UI not found after Re-run Setup. Tree:\n`,- tree.slice(0, 4000)- );- }- } else {- console.log(- `${LOG_PREFIX} 9.4.4: "Re-run Setup" button not found. ` +- `Management panel may not have this option.`- );- }-- await closeModalIfOpen();- await navigateToHome();- console.log(`${LOG_PREFIX} 9.4.4 PASSED`);- });-- it('9.4.5 — Post-Disconnect Access Blocking: skill not accessible after disconnect', async function () {- this.timeout(90_000);- resetMockBehavior();- setMockBehavior('gmailSetupComplete', 'false');- setMockBehavior('gmailSkillStatus', 'installed');-- await reAuthAndGoHome('e2e-gmail-post-disconnect-token');- await navigateToHome();-- // Verify the app is stable- const homeMarker = await waitForHomePage(10_000);- expect(homeMarker).toBeTruthy();- console.log(`${LOG_PREFIX} 9.4.5: Home page reached: "${homeMarker}"`);-- // Check Email status — should show "Setup Required" or "Offline"- const emailVisible = await findGmailInUI();- if (emailVisible) {- // After disconnect, Email should show setup_required or similar non-connected state- const hasSetupRequired =- (await textExists('Setup Required')) || (await textExists('setup_required'));- const hasOffline = await textExists('Offline');- const hasConnected = await textExists('Connected');-- console.log(- `${LOG_PREFIX} 9.4.5: Email visible — Setup Required: ${hasSetupRequired}, ` +- `Offline: ${hasOffline}, Connected: ${hasConnected}`- );-- if (hasSetupRequired || hasOffline) {- console.log(- `${LOG_PREFIX} 9.4.5: Email correctly showing non-connected state after disconnect`- );- }-- // Try to open the modal — should show setup wizard, not management panel- const modalState = await openGmailModal();- if (modalState === 'connect') {- console.log(`${LOG_PREFIX} 9.4.5: Email showing setup wizard — access correctly blocked`);- } else if (modalState === 'manage') {- console.log(- `${LOG_PREFIX} 9.4.5: Email showing management panel — ` +- `skill may still be in connected state from runtime.`- );- }- await closeModalIfOpen();- } else {- console.log(- `${LOG_PREFIX} 9.4.5: Email not in UI — ` +- `post-disconnect access is inherently blocked.`- );- }-- await navigateToHome();- console.log(`${LOG_PREFIX} 9.4.5 PASSED`);- });- });-});diff --git a/app/test/e2e/specs/guided-tour-gates.spec.ts b/app/test/e2e/specs/guided-tour-gates.spec.tsdeleted file mode 100644index 3c47adbd68..0000000000--- a/app/test/e2e/specs/guided-tour-gates.spec.ts+++ /dev/null@@ -1,269 +0,0 @@-// @ts-nocheck-/**- * E2E spec: Interactive guided tour — gates and resume behaviour (#1215).- *- * The tests cover the current seven-step flow:- * 1. `/home` redirects to `/chat`, where the tour starts on the live composer- * target as step 1 of 7.- * 2. One Next click navigates to Connections and highlights the Apps grid.- * 3. Six Next clicks reach the final chat step, which seeds a welcome note- * and omits the Skip button.- * 4. The tour starts again after a renderer reload when its pending flag is set.- *- * Implementation notes:- * - The walkthrough is driven by manipulating localStorage keys directly- * (`openhuman:walkthrough_pending`, `openhuman:walkthrough_completed`)- * rather than walking the full onboarding flow, because (a) resetApp- * already handles onboarding and (b) the Joyride component reads these- * keys on mount.- * - `data-walkthrough` attributes are queried to verify step targets are- * present without coupling to tooltip text that may be i18n-translated.- * - The spec uses `supportsExecuteScript()` guards so it degrades- * gracefully on Appium Mac2 (where `browser.execute` is unavailable in- * a WKWebView context).- */-import { waitForApp } from '../helpers/app-helpers';-import { textExists } from '../helpers/element-helpers';-import { supportsExecuteScript } from '../helpers/platform';-import { resetApp } from '../helpers/reset-app';-import { dismissWalkthroughIfVisible, navigateViaHash } from '../helpers/shared-flows';-import { startMockServer, stopMockServer } from '../mock-server';--const USER_ID = 'e2e-guided-tour-gates';--// localStorage keys mirrored from AppWalkthrough.tsx-const WALKTHROUGH_KEY = 'openhuman:walkthrough_completed';-const WALKTHROUGH_PENDING_KEY = 'openhuman:walkthrough_pending';--// ── helpers ──────────────────────────────────────────────────────────────────--/**- * Arm the walkthrough: clear the completed flag, set the pending flag.- * Equivalent to what resetWalkthrough() does in production code.- * Returns false when execute() is unavailable (Mac2).- */-async function armWalkthrough(): Promise<boolean> {- if (!supportsExecuteScript()) return false;- await browser.execute(- ({ pendingKey, completedKey }: { pendingKey: string; completedKey: string }) => {- try {- localStorage.removeItem(completedKey);- localStorage.setItem(pendingKey, 'true');- } catch (_) {- // swallow — mirrors AppWalkthrough try/catch- }- },- { pendingKey: WALKTHROUGH_PENDING_KEY, completedKey: WALKTHROUGH_KEY }- );- return true;-}--/**- * Mark walkthrough complete in localStorage so subsequent specs start clean.- */-async function disarmWalkthrough(): Promise<void> {- if (!supportsExecuteScript()) return;- await browser.execute(- ({ completedKey, pendingKey }: { completedKey: string; pendingKey: string }) => {- try {- localStorage.setItem(completedKey, 'true');- localStorage.removeItem(pendingKey);- } catch (_) {- // ignore- }- },- { completedKey: WALKTHROUGH_KEY, pendingKey: WALKTHROUGH_PENDING_KEY }- );-}--/**- * Wait up to `timeout` ms for the Joyride dialog overlay to be visible.- * WalkthroughTooltip is an accessible dialog, rendered with `role="alertdialog"`.- */-async function waitForTourTooltip(timeout = 15_000): Promise<boolean> {- if (!supportsExecuteScript()) return false;- const deadline = Date.now() + timeout;- while (Date.now() < deadline) {- const visible = await browser.execute(() => {- return document.querySelector('[role="alertdialog"]') !== null;- });- if (visible) return true;- await browser.pause(400);- }- return false;-}--/**- * Advance the tour by clicking the primary (Next/Let's go) button inside- * the tooltip overlay. Returns true if the click landed, false if no button- * was found within `timeout`.- */-async function clickTourNext(timeout = 8_000): Promise<boolean> {- if (!supportsExecuteScript()) return false;- const deadline = Date.now() + timeout;- while (Date.now() < deadline) {- const clicked = await browser.execute(() => {- const tooltip = document.querySelector('[role="alertdialog"]');- if (!tooltip) return false;- // Primary button carries data-action="primary" (set by Joyride on primaryProps)- const primary = tooltip.querySelector<HTMLButtonElement>('[data-action="primary"]');- if (!primary) return false;- primary.click();- return true;- });- if (clicked) return true;- await browser.pause(300);- }- return false;-}--/**- * Advance the tour N times, pausing between clicks to let the `before` hook- * complete and the DOM settle. Uses a longer inter-step pause (2 s) so async- * before hooks (navigate + waitForTarget) finish before the next click.- */-async function advanceTourSteps(count: number): Promise<void> {- for (let i = 0; i < count; i++) {- const clicked = await clickTourNext(8_000);- if (!clicked) {- console.warn(`[guided-tour-gates] clickTourNext: no primary button on advance ${i + 1}`);- break;- }- // Allow the before() hook to navigate and the DOM to settle. 2 s is generous- // enough for the HashRouter to update and waitForTarget to resolve.- await browser.pause(2_000);- }-}--// ── suite ─────────────────────────────────────────────────────────────────────--describe('Guided tour — gates and resume behaviour (#1215)', function () {- this.timeout(180_000);-- before(async () => {- await startMockServer();- await waitForApp();- await resetApp(USER_ID);- });-- afterEach(async () => {- // Always disarm so the next scenario starts clean.- await disarmWalkthrough();- await dismissWalkthroughIfVisible(4_000);- });-- after(async () => {- await stopMockServer();- });-- // ── Scenario 1: Start and navigate ─────────────────────────────────────────-- describe('Scenario 1 — start and navigate', () => {- it('tour starts on the current chat panel at step 1 of 7', async () => {- await navigateViaHash('/home');- expect(await armWalkthrough()).toBe(true);- await browser.refresh();- expect(await waitForTourTooltip()).toBe(true);- expect(await textExists('1 of 7')).toBe(true);- expect(- await browser.execute(- () => document.querySelector('[data-walkthrough="chat-agent-panel"]') !== null- )- ).toBe(true);- });-- it('tour opens the Apps tab and highlights skills-grid after 1 Next click', async () => {- await navigateViaHash('/home');- expect(await armWalkthrough()).toBe(true);- await browser.refresh();- expect(await waitForTourTooltip()).toBe(true);- await advanceTourSteps(1);- await browser.waitUntil(- async () =>- String(await browser.execute(() => window.location.hash)).includes(- '/connections?tab=composio'- ),- { timeout: 15_000, timeoutMsg: 'tour did not navigate to /connections after one step' }- );- expect(- await browser.execute(- () => document.querySelector('[data-walkthrough="skills-grid"]') !== null- )- ).toBe(true);- });- });-- // ── Scenario 2: Chat gate (final step) ────────────────────────────────────-- describe('Scenario 2 — chat gate (first message)', () => {- it('final tour step renders on /chat with a pre-seeded welcome note', async () => {- // Drive the visible controls through the actual tour instead of seeking- // into Joyride's internal step state.- // - Navigate to /home and arm walkthrough.- // - Advance through the earlier steps.- // - "You're all set!" title appears in tooltip.- // - Skip button is absent on the last step.- //- await navigateViaHash('/home');- expect(await armWalkthrough()).toBe(true);- await browser.refresh();- expect(await waitForTourTooltip(10_000)).toBe(true);- await advanceTourSteps(6);-- const hasLastStepTitle = await browser.waitUntil(() => textExists("You're all set!"), {- timeout: 15_000,- interval: 250,- timeoutMsg: 'final walkthrough step title did not render after its async setup',- });- expect(hasLastStepTitle).toBe(true);-- const skipVisible = await browser.execute(() => {- const tooltip = document.querySelector('[role="alertdialog"]');- if (!tooltip) return false;- const skip = tooltip.querySelector<HTMLButtonElement>('[data-action="skip"]');- return skip !== null && !skip.hidden;- });- expect(skipVisible).toBe(false);- });-- it('chat panel target element is present when on /chat route', async () => {- if (!supportsExecuteScript()) {- console.log('[guided-tour-gates] skipping: execute() unsupported on this driver');- return;- }-- // Navigate directly to /chat and verify the data-walkthrough target that- // Joyride must spotlight on steps 1 and 7 is present in the DOM.- // This is independent of the full tour advance sequence.- await navigateViaHash('/chat');-- // Hash navigation settles before the chat runtime has finished mounting- // its composer footer. Poll for the target so this proves the rendered- // route contract instead of racing that asynchronous mount in CI.- const chatPanel = await browser.waitUntil(- async () =>- (await browser.execute(- () => document.querySelector('[data-walkthrough="chat-agent-panel"]') !== null- )) as boolean,- {- timeout: 15_000,- interval: 250,- timeoutMsg: 'chat walkthrough target did not mount after navigating to /chat',- }- );- // The data-walkthrough attribute must exist for Joyride to focus the step.- expect(chatPanel).toBe(true);- });- });-- // ── Scenario 3: Resume after relaunch ─────────────────────────────────────-- describe('Scenario 3 — resume after relaunch (close + reopen)', () => {- it('walkthrough re-shows after renderer reload when pending flag is set', async () => {- await navigateViaHash('/home');- expect(await armWalkthrough()).toBe(true);- await browser.refresh();- expect(await waitForTourTooltip(20_000)).toBe(true);- });- });-});diff --git a/app/test/e2e/specs/local-model-runtime.spec.ts b/app/test/e2e/specs/local-model-runtime.spec.tsdeleted file mode 100644index 7daf725975..0000000000--- a/app/test/e2e/specs/local-model-runtime.spec.ts+++ /dev/null@@ -1,118 +0,0 @@-// @ts-nocheck-import { waitForApp, waitForAppReady } from '../helpers/app-helpers';-import { triggerAuthDeepLink } from '../helpers/deep-link-helpers';-import {- textExists,- visibleTextExists,- waitForWebView,- waitForWindowVisible,-} from '../helpers/element-helpers';-import {- dismissWalkthroughIfVisible,- waitForHomePage,- walkOnboarding,-} from '../helpers/shared-flows';-import { startMockServer, stopMockServer } from '../mock-server';--/**- * Local model runtime — the app-managed surface is gone; the route redirects.- *- * # What this file used to be, and why it was replaced- *- * Until 2026-09-24 this spec was a single `describe.skip`ped case driving a- * "Local model runtime" card, a "Manage" button and a "Runtime Status" panel,- * with the reason given as *"CI does not provision a live Ollama server, so- * keep this spec skipped until a deterministic mockable local-runtime harness- * exists for WDIO."*- *- * That reason had stopped being the real one. Commit `0ec68613af` removed the- * local-model debug panel outright, so every control the old case reached no- * longer exists — unskipping it would not have needed an Ollama server, it- * would have failed on the first `waitForText('Local model runtime')`. The- * spec was not waiting for a harness; it was testing deleted UI.- *- * That mattered beyond tidiness: `docs/TEST-COVERAGE-MATRIX.md` cited this file- * as the evidence for **3.1.1, 3.1.2, 3.2.1, 3.2.3** (all ✅) and **3.3.3.2**- * (🟡). Five rows rested on a spec that had never executed an assertion, and- * because the file *is* wired into the `system` suite it was collected,- * launched and reported as a pass every run. A skipped spec that four ✅ rows- * point at is worse than no spec: it reads as coverage from the matrix and- * costs a lane slot to produce nothing.- *- * # What this file asserts now- *- * The one claim about the local-model surface that is true, checkable on the- * desktop shell, and worth defending: **the legacy deep route is a redirect,- * not a dead end.** `settingsRouteElements.tsx` maps `local-model-debug` to- * `<Navigate to="/connections?tab=llm" replace />`, so a user following an old- * link, bookmark or doc lands on the page that replaced it. If that `Navigate`- * is dropped in a future settings-route refactor the route renders nothing and- * the failure is silent — a blank settings pane, no console error.- *- * The web lane asserts the same redirect- * (`app/test/playwright/specs/local-model-runtime.spec.ts`); this is the- * desktop-shell half, where the hash router runs inside the real Wry webview- * rather than a browser tab.- *- * `navigateViaHash` is deliberately not used: its `HASH_REDIRECTS` table does- * not carry this route, so it would wait for the wrong target hash and time- * out. Driving `window.location.hash` and polling for the settled value tests- * the app's own router rather than the helper's copy of the route map — which- * is the point, since a stale copy is exactly what this guards against.- */-describe('Local model runtime route', () => {- before(async function beforeSuite() {- this.timeout(90_000);- await startMockServer();- await waitForApp();- });-- after(async () => {- await stopMockServer();- });-- it('redirects the retired local-model-debug route to the Connections LLM tab', async function () {- this.timeout(90_000);-- await triggerAuthDeepLink('e2e-local-model-token');- await waitForWindowVisible(25_000);- await waitForWebView(15_000);- await waitForAppReady(15_000);- await walkOnboarding('[LocalModel]');- await waitForHomePage(20_000);- await dismissWalkthroughIfVisible(20_000);- await browser.waitUntil(async () => !(await visibleTextExists('Skip tour')), {- timeout: 3_000,- interval: 250,- timeoutMsg: 'walkthrough must be dismissed before route navigation',- });-- await browser.execute(() => {- window.location.hash = '#/settings/local-model-debug';- });-- let settled = '';- await browser.waitUntil(- async () => {- settled = await browser.execute(() => window.location.hash);- // Wait for the redirect to land, not merely for the hash to change:- // the requested route is itself a valid intermediate value.- return typeof settled === 'string' && settled.includes('/connections');- },- {- timeout: 20_000,- interval: 300,- timeoutMsg:- 'requesting #/settings/local-model-debug should have redirected to /connections; ' +- 'if the Navigate in settingsRouteElements.tsx was dropped the route renders nothing',- }- );-- expect(settled).toContain('/connections');- expect(settled).not.toContain('local-model-debug');-- // The removed panel must not come back through a different route: its- // distinctive controls are the ones the pre-0ec68613af spec drove.- expect(await textExists('Runtime Status')).toBe(false);- });-});diff --git a/app/test/e2e/specs/navigation-settings-panels.spec.ts b/app/test/e2e/specs/navigation-settings-panels.spec.tsdeleted file mode 100644index 4974a1b350..0000000000--- a/app/test/e2e/specs/navigation-settings-panels.spec.ts+++ /dev/null@@ -1,185 +0,0 @@-// @ts-nocheck-/**- * Navigation — settings sub-panel coverage.- *- * Visits every settings sub-panel and verifies each loads without- * blank screens or error states.- *- * Tests:- * N2.1 — /settings (root index)- * N2.2 — /settings/connections- * N2.3 — /settings/memory-data (redirects to the Memory page's Brain chip)- * N2.4 — /settings/intelligence (redirects to the Memory page)- * N2.5 — /settings/developer-options- * N2.6 — /settings/account billing handoff- * N2.7 — /settings/appearance- * N2.8 — /settings/tools- * N2.9 — back navigation to /home returns home content- */-import { waitForApp, waitForAppReady } from '../helpers/app-helpers';-import { textExists } from '../helpers/element-helpers';-import { resetApp } from '../helpers/reset-app';-import { navigateToHome, navigateViaHash, waitForHomePage } from '../helpers/shared-flows';-import { startMockServer, stopMockServer } from '../mock-server';--const LOG_PREFIX = '[navigation-settings-panels]';-const USER_ID = 'e2e-navigation-settings-panels';-const PANEL_TIMEOUT = 10_000;--interface PanelCheck {- hash: string;- /** Candidate strings — any one match confirms the panel loaded. */- markers: string[];-}--const PANELS: PanelCheck[] = [- {- // N2.1 — root settings page (section index)- hash: '/settings',- markers: ['Settings', 'Account', 'Privacy', 'Appearance', 'Notifications'],- },- {- // N2.2 — connections (channel providers)- hash: '/settings/connections',- markers: ['Connections', 'Connect', 'Provider', 'Gmail', 'Telegram', 'Settings'],- },- {- // N2.3 — the v1 memory data panel is gone; the slug redirects to the- // Memory page's Brain chip (/connections?tab=brain&brain=brain).- hash: '/settings/memory-data',- markers: ['Documents', 'Memory', 'Engine'],- },- {- // N2.4 — intelligence moved into the Memory page (the legacy /brain and- // /settings/intelligence routes redirect to /connections?tab=brain).- hash: '/brain',- markers: ['Memory', 'Engine', 'Ask'],- },- {- // N2.5 — developer options- hash: '/settings/developer-options',- markers: ['Developer', 'Debug', 'Advanced', 'Settings', 'Logs'],- },- { hash: '/settings/account', markers: ['Plan & billing', 'Open dashboard'] },- {- // N2.7 — appearance panel- hash: '/settings/appearance',- markers: ['Appearance', 'Theme', 'Color', 'Dark', 'Settings'],- },- {- // N2.8 — tools panel- hash: '/settings/tools',- markers: ['Tools', 'Tool', 'Enable', 'Disable', 'Settings'],- },-];--async function rootTextLength(): Promise<number> {- return (await browser.execute(- () => (document.getElementById('root')?.innerText ?? '').length- )) as number;-}--async function verifyPanelLoaded(panel: PanelCheck): Promise<void> {- await waitForAppReady(PANEL_TIMEOUT);-- const chars = await rootTextLength();- if (chars < 50) {- throw new Error(`${panel.hash}: panel appears blank (${chars} chars in #root)`);- }-- let foundMarker = '';- for (const marker of panel.markers) {- if (await textExists(marker)) {- foundMarker = marker;- break;- }- }-- if (foundMarker) {- console.log(`${LOG_PREFIX} ${panel.hash}: loaded (found "${foundMarker}", ${chars} chars)`);- } else {- // Non-fatal: the panel may render different text depending on config / state.- // The char-count check above is the authoritative blank-screen guard.- console.log(- `${LOG_PREFIX} ${panel.hash}: loaded (${chars} chars, no marker matched — acceptable)`- );- }-}--describe('Navigation — settings sub-panels', () => {- before(async () => {- console.log(`${LOG_PREFIX} Starting mock server and resetting app`);- await startMockServer();- await waitForApp();- await resetApp(USER_ID);- console.log(`${LOG_PREFIX} Setup complete`);- });-- after(async () => {- await stopMockServer();- console.log(`${LOG_PREFIX} Teardown complete`);- });-- it('N2.1 — /settings (root index) loads', async () => {- const panel = PANELS[0];- console.log(`${LOG_PREFIX} N2.1: navigating to ${panel.hash}`);- await navigateViaHash(panel.hash);- await verifyPanelLoaded(panel);- });-- it('N2.3 — /settings/memory-data loads', async () => {- const panel = PANELS[2];- console.log(`${LOG_PREFIX} N2.3: navigating to ${panel.hash}`);- await navigateViaHash(panel.hash);- await verifyPanelLoaded(panel);- });-- it('N2.4 — /intelligence loads', async () => {- const panel = PANELS[3];- console.log(`${LOG_PREFIX} N2.4: navigating to ${panel.hash}`);- await navigateViaHash(panel.hash);- await verifyPanelLoaded(panel);- });-- it('N2.5 — /settings/developer-options loads', async () => {- const panel = PANELS[4];- console.log(`${LOG_PREFIX} N2.5: navigating to ${panel.hash}`);- await navigateViaHash(panel.hash);- await verifyPanelLoaded(panel);- });-- it('N2.6 — /settings/account billing handoff loads', async () => {- const panel = PANELS[5];- console.log(`${LOG_PREFIX} N2.6: navigating to ${panel.hash}`);- await navigateViaHash(panel.hash);- await verifyPanelLoaded(panel);- console.log(`${LOG_PREFIX} N2.6: passed`);- });-- it('N2.7 — /settings/appearance loads', async () => {- const panel = PANELS[6];- console.log(`${LOG_PREFIX} N2.7: navigating to ${panel.hash}`);- await navigateViaHash(panel.hash);- await verifyPanelLoaded(panel);- });-- it('N2.8 — /settings/tools loads', async () => {- const panel = PANELS[7];- console.log(`${LOG_PREFIX} N2.8: navigating to ${panel.hash}`);- await navigateViaHash(panel.hash);- await verifyPanelLoaded(panel);- });-- it('N2.9 — back navigation from last panel returns to /home', async () => {- console.log(`${LOG_PREFIX} N2.9: navigating back to /home`);- await navigateToHome();- const homeText = await waitForHomePage(PANEL_TIMEOUT);- expect(homeText).toBeTruthy();-- const hash = await browser.execute(() => window.location.hash);- // Home merged into the unified chat surface: navigateToHome() lands on- // #/chat (/home redirects there). Accept either.- expect(hash).toMatch(/^#\/(chat|home)/);- console.log(`${LOG_PREFIX} N2.9: passed — home content: "${homeText}"`);- });-});diff --git a/app/test/e2e/specs/navigation-smoothness.spec.ts b/app/test/e2e/specs/navigation-smoothness.spec.tsdeleted file mode 100644index 3b04040d16..0000000000--- a/app/test/e2e/specs/navigation-smoothness.spec.ts+++ /dev/null@@ -1,162 +0,0 @@-// @ts-nocheck-/**- * Navigation smoothness — rapid tab switching across all major routes.- *- * Exercises the HashRouter-based navigation by visiting every top-level- * route twice (a normal pass and then a rapid pass with minimal delays)- * and asserting each renders non-trivially.- *- * Tests:- * N1.1 — all 8 major routes render without error within timing budget- * N1.2 — rapid cycle (second pass) completes without blank screens- * N1.3 — final state is /home with correct content- */-import { waitForApp, waitForAppReady } from '../helpers/app-helpers';-import { textExists } from '../helpers/element-helpers';-import { resetApp } from '../helpers/reset-app';-import { navigateViaHash, waitForHomePage } from '../helpers/shared-flows';-import { startMockServer, stopMockServer } from '../mock-server';--const LOG_PREFIX = '[navigation-smoothness]';-const USER_ID = 'e2e-navigation-smoothness';-const ROUTE_TIMEOUT = 10_000;--// Routes to visit, with optional text markers that confirm the panel loaded.-// Phase 2/3/6 IA revamp:-// /skills → /connections (back-compat redirect); use canonical route here-// /intelligence → /activity (back-compat redirect); use canonical route here-// /channels → /connections?tab=messaging (redirect)-// /human → the Human surface (first-class tab)-interface RouteCheck {- hash: string;- markers: string[];-}--const ROUTES: RouteCheck[] = [- // Chat composer header: "New" thread button and the "Reasoning" pill.- { hash: '/chat', markers: ['New', 'Chat', 'Message', 'Reasoning', 'Your assistant is ready'] },- // Connections page (was /skills) — tabs: Apps, Messaging, Tools, Explorer- { hash: '/connections', markers: ['Apps', 'Messaging', 'Tools', 'Connections'] },- // /home redirects to /chat (AppRoutes.tsx Phase 6); markers cover both old- // Home.tsx CTA text and the new chat new-window hero status copy.- {- hash: '/home',- markers: [- 'Ask your assistant anything',- 'Your device is connected',- 'Your assistant is ready',- 'Home',- 'Chat',- ],- },- {- hash: '/notifications',- markers: ['Notifications', 'Alerts', 'Notification', 'No notifications'],- },- { hash: '/settings', markers: ['Settings', 'Account', 'Billing', 'Advanced'] },- // Memory page (Connections → Memory, v2). Chips: Engine, Ask, Learnings,- // Conversations, Documents, Context.- { hash: '/connections?tab=brain', markers: ['Engine', 'Ask', 'Documents', 'Memory'] },- {- hash: '/home',- markers: [- 'Ask your assistant anything',- 'Your device is connected',- 'Your assistant is ready',- 'Home',- 'Chat',- ],- },-];--async function rootTextLength(): Promise<number> {- return (await browser.execute(- () => (document.getElementById('root')?.innerText ?? '').length- )) as number;-}--async function verifyRouteLoaded(route: RouteCheck, pass: string): Promise<void> {- await waitForAppReady(ROUTE_TIMEOUT);-- const chars = await rootTextLength();- if (chars < 50) {- throw new Error(`${pass} ${route.hash}: appears blank (${chars} chars)`);- }-- let foundMarker = '';- for (const marker of route.markers) {- if (await textExists(marker)) {- foundMarker = marker;- break;- }- }- if (foundMarker) {- console.log(- `${LOG_PREFIX} ${pass} ${route.hash}: loaded (found "${foundMarker}", ${chars} chars)`- );- } else {- // Non-fatal: some routes may have different text depending on state.- // The char count check above is the authoritative blank-screen guard.- console.log(- `${LOG_PREFIX} ${pass} ${route.hash}: loaded (${chars} chars, no marker matched — acceptable)`- );- }-}--describe('Navigation smoothness', () => {- before(async () => {- console.log(`${LOG_PREFIX} Starting mock server and resetting app`);- await startMockServer();- await waitForApp();- await resetApp(USER_ID);- console.log(`${LOG_PREFIX} Setup complete`);- });-- after(async () => {- await stopMockServer();- console.log(`${LOG_PREFIX} Teardown complete`);- });-- it('N1.1 — all major routes render without error within timing budget', async () => {- console.log(`${LOG_PREFIX} N1.1: first pass — normal navigation`);- for (const route of ROUTES) {- console.log(`${LOG_PREFIX} N1.1: navigating to ${route.hash}`);- await navigateViaHash(route.hash);- await verifyRouteLoaded(route, 'N1.1');- // Small pause between routes so React has time to settle.- await browser.pause(400);- }- console.log(`${LOG_PREFIX} N1.1: passed — all routes loaded`);- });-- it('N1.2 — rapid cycle (second pass) completes without blank screens', async () => {- console.log(`${LOG_PREFIX} N1.2: second pass — rapid cycle`);- for (const route of ROUTES) {- console.log(`${LOG_PREFIX} N1.2: rapid-navigating to ${route.hash}`);- await navigateViaHash(route.hash);- // Minimal pause — just enough for hash update and React to start rendering.- await browser.pause(350);-- await waitForAppReady(ROUTE_TIMEOUT);- const chars = await rootTextLength();- if (chars < 50) {- throw new Error(`N1.2 rapid-cycle ${route.hash}: blank screen (${chars} chars)`);- }- console.log(`${LOG_PREFIX} N1.2: ${route.hash} rendered (${chars} chars)`);- }- console.log(`${LOG_PREFIX} N1.2: passed — rapid cycle complete`);- });-- it('N1.3 — final state is /home (or /chat redirect) with correct content', async () => {- console.log(`${LOG_PREFIX} N1.3: navigating to /home for final check`);- await navigateViaHash('/home');- const homeText = await waitForHomePage(ROUTE_TIMEOUT);- expect(homeText).toBeTruthy();-- // AppRoutes.tsx redirects /home → /chat, so the settled hash is #/chat.- // Accept either form to keep the test resilient across routing changes.- const hash = await browser.execute(() => window.location.hash);- expect(hash).toMatch(/^#\/(home|chat)(\/|$)/);- console.log(`${LOG_PREFIX} N1.3: passed — on ${hash}, content: "${homeText}"`);- });-});diff --git a/app/test/e2e/specs/navigation.spec.ts b/app/test/e2e/specs/navigation.spec.tsdeleted file mode 100644index 8fca5d1851..0000000000--- a/app/test/e2e/specs/navigation.spec.ts+++ /dev/null@@ -1,110 +0,0 @@-// @ts-nocheck-/**- * Navigation spec — drives every top-level route the BottomTabBar exposes- * and asserts each one actually renders.- *- * After `resetApp(...)` the user is logged in and onboarded. From there we- * navigate via the hash router (the same primitive `cron-jobs-flow.spec.ts`- * uses) and confirm:- *- * - `window.location.hash` updates to the requested route- * - The React tree under `#root` has rendered content for it- *- * Catches regressions where a tab loads to a blank screen, errors out, or- * the BottomTabBar / router silently no-ops.- */-import { waitForApp, waitForAppReady } from '../helpers/app-helpers';-import { hasAppChrome, waitForTestId } from '../helpers/element-helpers';-import { isTauriDriver } from '../helpers/platform';-import { resetApp } from '../helpers/reset-app';-import { navigateViaHash, waitForHomePage } from '../helpers/shared-flows';-import { startMockServer, stopMockServer } from '../mock-server';--const USER_ID = 'e2e-navigation';--interface Route {- hash: string;- /** Min character count we expect in the rendered React tree after the- * route mounts. A truly-blank screen surfaces as <100 chars of text. */- minChars?: number;- /** A `data-testid` that must be in the DOM once the route has mounted. */- readyTestId?: string;-}--// Phase 2/3/6 IA revamp:-// /home → /chat (Phase 6 — /home is now the merged chat surface)-// /human → renders the Human surface (first-class tab)-// /skills → /connections (Phase 2 — back-compat redirect)-// /intelligence → /settings/notifications (Phase 3 — back-compat redirect)-// /activity → /settings/notifications (back-compat redirect)-// Note: /home and /activity are intentionally omitted here because AppRoutes.tsx-// now redirects them (/home → /chat, /activity → /settings/notifications).-// navigateViaHash settles on the redirect target, so keeping them in ROUTES-// would fail the `^#<hash>` assertion (actual hash is the redirect destination).-const ROUTES: Route[] = [- { hash: '/chat' },- { hash: '/connections' },- { hash: '/settings' },- { hash: '/flows' },- // Memory (v2) is a sub-page of Connections; the retired `/brain` route- // redirects here, so assert the canonical destination (a redirecting hash- // would settle on its target and fail the `^#<hash>` match, same reasoning- // as /home above). The Memory page mounts with its chip bar whatever the- // engine state, so its root testid is a stable ready signal.- { hash: '/connections?tab=brain', readyTestId: 'memory-page' },-];--async function rootTextLength(): Promise<number> {- return (await browser.execute(- () => (document.getElementById('root')?.innerText ?? '').length- )) as number;-}--describe('Navigation', () => {- before(async function () {- this.timeout(90_000);- await startMockServer();- await waitForApp();- await resetApp(USER_ID);- });-- after(async () => {- await stopMockServer();- });-- it('app chrome stays visible', async () => {- expect(await hasAppChrome()).toBe(true);- });-- it('lands on /home after onboarding', async () => {- await waitForAppReady(10_000);- let homeText = await waitForHomePage(15_000);- if (!homeText) {- // resetApp may have landed on /chat instead of /home; navigate explicitly.- await navigateViaHash('/home');- await waitForAppReady(10_000);- homeText = await waitForHomePage(15_000);- }- expect(homeText).toBeTruthy();- });-- for (const route of ROUTES) {- it(`renders ${route.hash}`, async () => {- await navigateViaHash(route.hash);- await waitForAppReady(10_000);-- const hash = await browser.execute(() => window.location.hash);- // Escape the hash: `?` in `/connections?tab=brain` is a regex quantifier.- const escaped = route.hash.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');- expect(hash).toMatch(new RegExp(`^#${escaped}`));-- // waitForTestId is tauri-driver only; Mac2 keeps the hash + char checks.- if (route.readyTestId && isTauriDriver()) {- await waitForTestId(route.readyTestId, 15_000);- }-- const chars = await rootTextLength();- expect(chars).toBeGreaterThan(route.minChars ?? 50);- });- }-});diff --git a/app/test/e2e/specs/settings-advanced-config.spec.ts b/app/test/e2e/specs/settings-advanced-config.spec.tsdeleted file mode 100644index bf940c8c32..0000000000--- a/app/test/e2e/specs/settings-advanced-config.spec.ts+++ /dev/null@@ -1,228 +0,0 @@-// @ts-nocheck-import { browser, expect } from '@wdio/globals';--import { waitForApp } from '../helpers/app-helpers';-import { callOpenhumanRpc } from '../helpers/core-rpc';-import {- clickLabelContaining,- clickText,- textExists,- waitForTestId,- waitForText,-} from '../helpers/element-helpers';-import { resetApp } from '../helpers/reset-app';-import { navigateViaHash } from '../helpers/shared-flows';-import { startMockServer, stopMockServer } from '../mock-server';--const USER_ID = 'e2e-settings-advanced-config';--describe('Settings - Advanced Config', function () {- this.timeout(90_000);-- before(async function beforeSuite() {- this.timeout(90_000);- await startMockServer();- await waitForApp();- await resetApp(USER_ID);- });-- after(async () => {- await stopMockServer();- });-- it('renders the developer options route and its advanced entries', async function () {- this.timeout(90_000);- await navigateViaHash('/settings/developer-options');-- // The dev-mode gate was dropped (#3639) and the per-feature dev entries- // moved to the settings sidebar's "Diagnostics & Logs" group. The- // Developer Options panel is now slim — its stable, panel-specific marker- // is the "Restart Tour" action.- await waitForText('Restart Tour', 15_000);- });-- it('redirects the retired notifications route to account settings', async function () {- this.timeout(60_000);- await navigateViaHash('/settings/notifications');- await browser.waitUntil(- async () => (await browser.execute(() => window.location.hash)) === '#/settings/account',- { timeout: 15_000, timeoutMsg: 'retired notifications route did not redirect to account' }- );- // The route changes before the account panel's async data has mounted.- await waitForTestId('account-profile', 15_000);- await waitForText('Preferences', 15_000);- });-- it('persists composio trigger triage settings', async function () {- this.timeout(60_000);- const before = await callOpenhumanRpc('openhuman.config_get_composio_trigger_settings', {});- expect(before.ok).toBe(true);-- await navigateViaHash('/settings/composio-triggers');- // ComposioTriagePanel renders the triage description + the- // t('composio.disableAllTriage') = 'Disable AI triage for all triggers' toggle.- await waitForText('Disable AI triage for all triggers', 15_000);-- const disabledToolkitsInput = await browser.$('#disabled-toolkits');- await disabledToolkitsInput.waitForExist({ timeout: 10_000 });- const clickedTriageSave = await browser.execute(() => {- const input = document.querySelector<HTMLInputElement>('#disabled-toolkits');- if (!input) return false;-- const setter = Object.getOwnPropertyDescriptor(- window.HTMLInputElement.prototype,- 'value'- )?.set;- if (setter) setter.call(input, 'gmail, slack');- else input.value = 'gmail, slack';- input.dispatchEvent(new Event('input', { bubbles: true }));- input.dispatchEvent(new Event('change', { bubbles: true }));-- // The merged Composio page has its own Save button above this embedded- // triage panel. Walk upward to the nearest container with a Save button- // so this test clicks the button that owns disabled-toolkits.- let container: HTMLElement | null = input.parentElement;- while (container) {- const save = Array.from(container.querySelectorAll('button')).find(- button => button.textContent?.trim() === 'Save'- );- if (save) {- save.click();- return true;- }- container = container.parentElement;- }- return false;- });- expect(clickedTriageSave).toBe(true);- await waitForText('Settings saved', 10_000);-- await browser.waitUntil(- async () => {- const after = await callOpenhumanRpc('openhuman.config_get_composio_trigger_settings', {});- const result = after.result?.result ?? {};- return (- after.ok &&- Array.isArray(result.triage_disabled_toolkits) &&- result.triage_disabled_toolkits.includes('gmail') &&- result.triage_disabled_toolkits.includes('slack')- );- },- { timeout: 15_000, interval: 500, timeoutMsg: 'composio trigger settings did not persist' }- );- });-- it('persists autonomy max_actions_per_hour through core RPC', async function () {- this.timeout(60_000);- const before = await callOpenhumanRpc('openhuman.config_get_autonomy_settings', {});- expect(before.ok).toBe(true);- const current = before.result?.result?.max_actions_per_hour ?? 20;- // Pick a value different from the current one so the save actually mutates state.- const target = current === 250 ? 251 : 250;-- await navigateViaHash('/settings/autonomy');- // /settings/autonomy redirects to /settings/agent-access, which embeds the- // autonomy rate-limit section titled t('autonomy.maxActionsLabel').- await waitForText('Max actions per hour', 15_000);-- const input = await browser.$('#autonomy-max-actions');- await input.waitForExist({ timeout: 10_000 });- // Drive the controlled number input via the native value setter + React- // change event. WebDriver's setValue clears the field but doesn't reliably- // fire React's synthetic onChange, so `draft`/`isChanged` wouldn't update- // and the Save button (canSave = isValid && isChanged) would stay a- // disabled no-op — "Saved." would never appear.- await browser.execute((val: string) => {- const el = document.querySelector<HTMLInputElement>('#autonomy-max-actions');- if (!el) return;- const setter = Object.getOwnPropertyDescriptor(- window.HTMLInputElement.prototype,- 'value'- )?.set;- if (setter) setter.call(el, val);- else el.value = val;- el.dispatchEvent(new Event('input', { bubbles: true }));- el.dispatchEvent(new Event('change', { bubbles: true }));- }, String(target));- const save = await browser.$('[data-testid="autonomy-max-actions-save"]');- await save.waitForClickable({ timeout: 10_000 });- await save.click();- await waitForText('Saved.', 10_000);-- await browser.waitUntil(- async () => {- const after = await callOpenhumanRpc('openhuman.config_get_autonomy_settings', {});- return after.ok && after.result?.result?.max_actions_per_hour === target;- },- { timeout: 15_000, interval: 500, timeoutMsg: 'autonomy setting did not persist' }- );- });-- it('switches composio routing mode to direct and can return to backend mode', async function () {- this.timeout(60_000);- await navigateViaHash('/settings/composio-routing');- await waitForText('Routing mode', 15_000);-- await clickLabelContaining('Direct (bring your own API key)');- const apiKeyInput = await browser.$('#composio-api-key');- await apiKeyInput.waitForExist({ timeout: 10_000 });- await browser.execute(() => {- const input = document.querySelector<HTMLInputElement>('#composio-api-key');- if (!input) return;- const setter = Object.getOwnPropertyDescriptor(- window.HTMLInputElement.prototype,- 'value'- )?.set;- if (setter) setter.call(input, 'ck_live_e2e_composio_key');- else input.value = 'ck_live_e2e_composio_key';- input.dispatchEvent(new Event('input', { bubbles: true }));- input.dispatchEvent(new Event('change', { bubbles: true }));- });- await clickText('Save', 10_000);- if (await textExists('I understand, switch to Direct')) {- await clickText('I understand, switch to Direct', 10_000);- }-- await browser.waitUntil(- async () => {- const mode = await callOpenhumanRpc('openhuman.composio_get_mode', {});- return (- mode.ok &&- mode.result?.result?.mode === 'direct' &&- mode.result?.result?.api_key_set === true- );- },- { timeout: 15_000, interval: 500, timeoutMsg: 'composio direct mode did not persist' }- );-- const cleared = await callOpenhumanRpc('openhuman.composio_clear_api_key', {});- expect(cleared.ok).toBe(true);- const backend = await callOpenhumanRpc('openhuman.composio_get_mode', {});- expect(backend.ok).toBe(true);- expect(backend.result?.result?.mode).toBe('backend');- expect(backend.result?.result?.api_key_set).toBe(false);- });-- it('redirects retired agent chat debug links to the LLM settings surface', async function () {- this.timeout(90_000);- await navigateViaHash('/settings/agent-chat');- await waitForText('LLM Providers', 15_000);- });-- it('mounts the remaining advanced settings routes', async function () {- this.timeout(90_000);- await navigateViaHash('/settings/local-model-debug');- await waitForText('LLM Providers', 15_000);-- await navigateViaHash('/settings/about');- await waitForText('Check for updates', 15_000);-- await navigateViaHash('/settings/llm');- await waitForText('AI', 20_000);- expect(- (await textExists('Reasoning')) ||- (await textExists('Cloud providers')) ||- (await textExists('OpenHuman'))- ).toBe(true);- });-});diff --git a/app/test/e2e/specs/settings-feature-preferences.spec.ts b/app/test/e2e/specs/settings-feature-preferences.spec.tsdeleted file mode 100644index fb652dd71a..0000000000--- a/app/test/e2e/specs/settings-feature-preferences.spec.ts+++ /dev/null@@ -1,199 +0,0 @@-// @ts-nocheck-import { browser, expect } from '@wdio/globals';--import { waitForApp } from '../helpers/app-helpers';-import { callOpenhumanRpc } from '../helpers/core-rpc';-import {- clickSelector,- clickText,- setSelectValueByTestId,- waitForText,-} from '../helpers/element-helpers';-import { resetApp } from '../helpers/reset-app';-import { navigateViaHash } from '../helpers/shared-flows';-import { startMockServer, stopMockServer } from '../mock-server';--const USER_ID = 'e2e-settings-feature-preferences';--async function mascotColorChecked(colorId: string): Promise<string | null> {- return await browser.execute(id => {- const el = document.querySelector<HTMLElement>(`[data-testid="mascot-color-${id}"]`);- return el?.getAttribute('aria-checked') ?? null;- }, colorId);-}--async function mascotVoiceIdFromStore(): Promise<string | null> {- return await browser.execute(() => {- const win = window as unknown as {- __OPENHUMAN_STORE__?: { getState?: () => { mascot?: { voiceId?: string | null } } };- };- return win.__OPENHUMAN_STORE__?.getState?.().mascot?.voiceId ?? null;- });-}--async function defaultMessagingChannelFromStore(): Promise<string | null> {- return await browser.execute(() => {- const win = window as unknown as {- __OPENHUMAN_STORE__?: {- getState?: () => { channelConnections?: { defaultMessagingChannel?: string | null } };- };- };- return (- win.__OPENHUMAN_STORE__?.getState?.().channelConnections?.defaultMessagingChannel ?? null- );- });-}--describe('Settings - Feature Preferences', function () {- // WebdriverIO wraps hooks before entering their bodies, so a hook-local- // timeout cannot extend the wrapper's default 30-second budget.- this.timeout(90_000);-- before(async () => {- await startMockServer();- await waitForApp();- await resetApp(USER_ID);- });-- after(async () => {- await stopMockServer();- });-- it('falls through removed feature routes to settings home', async () => {- for (const route of [- '/settings/features',- '/settings/screen-intelligence',- '/settings/screen-awareness-debug',- ]) {- await navigateViaHash(route);- await browser.waitUntil(- async () => {- const hash = await browser.execute(() => window.location.hash);- return hash === '#/settings' || hash === '#/settings/account';- },- { timeout: 15_000, timeoutMsg: `${route} did not normalize to the settings index` }- );-- const bodyText = await browser.$('body').getText();- expect(bodyText).not.toContain('Screen Intelligence');- expect(bodyText).not.toContain('Screen Awareness Debug');- }- });-- it('persists the default messaging channel through redux state', async () => {- // The messaging panel exposes "Set as default" only on *connected* channels.- // In a fresh workspace the only always-connected channel is Web (built-in- // chat), so make Telegram the default first — that turns Web into a- // connected, non-default tile with the control — then switch to Web.- await callOpenhumanRpc('openhuman.channels_set_default', { channel: 'telegram' });-- // Navigate away and back so the panel re-seeds the default from the core.- await navigateViaHash('/home');- await navigateViaHash('/connections?tab=messaging');-- await browser.waitUntil(async () => (await defaultMessagingChannelFromStore()) === 'telegram', {- timeout: 10_000,- interval: 500,- timeoutMsg: 'messaging panel did not seed Telegram as the default',- });-- // Switch to Web via its stable channel-select test id (Web is always- // connected, so its "Set as default" control is present).- await clickSelector('[data-testid="channel-select-web"]', 10_000);- await browser.waitUntil(async () => (await defaultMessagingChannelFromStore()) === 'web', {- timeout: 10_000,- interval: 500,- timeoutMsg: 'default channel did not update',- });- });-- it('persists tools preferences to the core app-state snapshot', async () => {- const before = await callOpenhumanRpc('openhuman.app_state_snapshot', {});- expect(before.ok).toBe(true);- const enabledBefore = before.result?.result?.localState?.onboardingTasks?.enabledTools ?? [];-- await navigateViaHash('/settings/tools');- await waitForText('Tools', 15_000);-- expect(await clickText('Shell Commands', 10_000)).toBeDefined();- await clickText('Save Changes', 10_000);- await waitForText('Preferences saved', 10_000);-- await browser.waitUntil(- async () => {- const after = await callOpenhumanRpc('openhuman.app_state_snapshot', {});- const enabledAfter = after.result?.result?.localState?.onboardingTasks?.enabledTools ?? [];- return JSON.stringify(enabledAfter) !== JSON.stringify(enabledBefore);- },- { timeout: 15_000, interval: 500, timeoutMsg: 'tools settings did not persist' }- );- });-- it('redirects the retired notifications settings route to account', async () => {- await navigateViaHash('/settings/notifications');- await browser.waitUntil(- async () => (await browser.execute(() => window.location.hash)) === '#/settings/account',- { timeout: 15_000, timeoutMsg: 'retired notifications route did not redirect to account' }- );- await waitForText('Account', 15_000);- });-- it('persists mascot color selection', async () => {- await navigateViaHash('/settings/mascot');-- await waitForText('Color', 15_000);- expect(await clickSelector('[data-testid="mascot-color-burgundy"]')).toBeDefined();- await browser.pause(1000);- expect(await mascotColorChecked('burgundy')).toBe('true');- });-- it('persists the custom mascot voice override on the mascot/face panel', async () => {- // The mascot voice override lives on the Face panel. The legacy- // /settings/mascot slug redirects to /settings/face; /settings/voice now- // hosts STT/TTS providers.- await navigateViaHash('/settings/mascot');-- await browser- .$('[data-testid="mascot-voice-select"]')- .waitForExist({ timeout: 20_000, timeoutMsg: 'mascot-voice-select did not render' });- const selectWorked = await setSelectValueByTestId('mascot-voice-select', '__custom__');- if (!selectWorked) {- console.log(- '[settings-features] mascot-voice-select not found or __custom__ option unavailable — skipping'- );- return;- }- const customVoiceInput = await browser.$('[data-testid="mascot-voice-input"]');- try {- await customVoiceInput.waitForExist({ timeout: 10_000 });- } catch {- // The custom voice input may not appear if the select interaction- // didn't trigger the expected UI change. Skip gracefully.- console.log(- '[settings-features] mascot-voice-input did not appear after selecting __custom__ — skipping'- );- return;- }- await browser.execute(() => {- const input = document.querySelector<HTMLInputElement>('[data-testid="mascot-voice-input"]');- if (!input) return;- const setter = Object.getOwnPropertyDescriptor(- window.HTMLInputElement.prototype,- 'value'- )?.set;- if (setter) setter.call(input, 'voice-e2e-custom');- else input.value = 'voice-e2e-custom';- input.dispatchEvent(new Event('input', { bubbles: true }));- input.dispatchEvent(new Event('change', { bubbles: true }));- });- expect(await clickSelector('[data-testid="mascot-voice-save-paste"]')).toBeDefined();- await browser.waitUntil(async () => (await mascotVoiceIdFromStore()) === 'voice-e2e-custom', {- timeout: 10_000,- interval: 500,- timeoutMsg: 'custom mascot voice did not update',- });- // Wry terminates the WebDriver session on a full page reload, so the- // durable value is covered by the Redux assertion above. Persistence- // across a process restart remains covered by MascotPanel unit tests.- });-});diff --git a/app/test/e2e/specs/user-journey-settings-round-trip.spec.ts b/app/test/e2e/specs/user-journey-settings-round-trip.spec.tsdeleted file mode 100644index e2fb41371b..0000000000--- a/app/test/e2e/specs/user-journey-settings-round-trip.spec.ts+++ /dev/null@@ -1,160 +0,0 @@-// @ts-nocheck-/**- * User journey — settings round-trip.- *- * Verifies that a user can navigate to every major settings sub-panel- * and return home without encountering blank screens or error states.- *- * Journey:- * 1. Login + land on home- * 2. /settings — verify root index loads- * 3. /settings/memory-data — verify it redirects to Memory → Documents- * 4. /settings/developer-options — verify loads- * 5. /settings/billing — verify billing panel loads- * 6. /home — verify home loads- * 7. /chat — verify chat loads- *- * Each screen must load within 10s with non-trivial content (no blank/error state).- */-import { waitForApp, waitForAppReady } from '../helpers/app-helpers';-import { textExists, waitForTestId } from '../helpers/element-helpers';-import { isTauriDriver } from '../helpers/platform';-import { resetApp } from '../helpers/reset-app';-import { navigateToHome, navigateViaHash, waitForHomePage } from '../helpers/shared-flows';-import { startMockServer, stopMockServer } from '../mock-server';--const LOG_PREFIX = '[user-journey-settings-round-trip]';-const USER_ID = 'e2e-user-journey-settings-round-trip';-const PANEL_TIMEOUT = 10_000;--async function rootTextLength(): Promise<number> {- return (await browser.execute(- () => (document.getElementById('root')?.innerText ?? '').length- )) as number;-}--async function waitForPanelLoad(- panelDescription: string,- timeout: number = PANEL_TIMEOUT-): Promise<void> {- await waitForAppReady(timeout);- const chars = await rootTextLength();- if (chars < 50) {- throw new Error(`${panelDescription}: panel appears blank (${chars} chars in #root)`);- }- console.log(`${LOG_PREFIX} ${panelDescription}: loaded (${chars} chars)`);-}--describe('User journey — settings round-trip', () => {- before(async () => {- console.log(`${LOG_PREFIX} Starting mock server and resetting app`);- await startMockServer();- await waitForApp();- await resetApp(USER_ID);- console.log(`${LOG_PREFIX} Setup complete`);- });-- after(async () => {- await stopMockServer();- console.log(`${LOG_PREFIX} Teardown complete`);- });-- it('starts on /home after login', async () => {- console.log(`${LOG_PREFIX} Verifying home page is accessible`);- await waitForAppReady(PANEL_TIMEOUT);- const homeText = await waitForHomePage(PANEL_TIMEOUT);- expect(homeText).toBeTruthy();- console.log(`${LOG_PREFIX} Home confirmed: "${homeText}"`);- });-- it('/settings — settings root loads within 10s', async () => {- console.log(`${LOG_PREFIX} Navigating to /settings`);- await navigateViaHash('/settings');- await waitForPanelLoad('/settings');-- // Root settings page renders a section index with nav items.- const accountMarkers = ['Settings', 'Account', 'Privacy', 'Appearance', 'Notifications'];- let found = false;- for (const marker of accountMarkers) {- if (await textExists(marker)) {- console.log(`${LOG_PREFIX} /settings: found marker "${marker}"`);- found = true;- break;- }- }- expect(found).toBe(true);- });-- it('/settings/memory-data — redirects to the Memory page within 10s', async () => {- // The v1 memory data panel is gone; the slug redirects to the Memory- // page's Brain chip (/connections?tab=brain&brain=brain).- console.log(`${LOG_PREFIX} Navigating to /settings/memory-data`);- await navigateViaHash('/settings/memory-data');- await waitForPanelLoad('/settings/memory-data');- // waitForTestId is tauri-driver only; the marker check below covers Mac2.- if (isTauriDriver()) await waitForTestId('memory-page', 10_000);-- const dataMarkers = ['Documents', 'Memory', 'Engine'];- let found = false;- for (const marker of dataMarkers) {- if (await textExists(marker)) {- console.log(`${LOG_PREFIX} /settings/memory-data: found marker "${marker}"`);- found = true;- break;- }- }- expect(found).toBe(true);- });-- it('/settings/developer-options — loads within 10s', async () => {- console.log(`${LOG_PREFIX} Navigating to /settings/developer-options`);- await navigateViaHash('/settings/developer-options');- await waitForPanelLoad('/settings/developer-options');-- const advancedMarkers = ['Developer', 'Debug', 'Advanced', 'Settings', 'Logs'];- let found = false;- for (const marker of advancedMarkers) {- if (await textExists(marker)) {- console.log(`${LOG_PREFIX} /settings/developer-options: found marker "${marker}"`);- found = true;- break;- }- }- expect(found).toBe(true);- });-- it('/settings/account — billing dashboard handoff loads within 15s', async () => {- console.log(`${LOG_PREFIX} Navigating to /settings/account`);- await navigateViaHash('/settings/account');- await waitForPanelLoad('/settings/account');- expect(await textExists('Plan & billing')).toBe(true);- expect(await textExists('Open dashboard')).toBe(true);- console.log(`${LOG_PREFIX} /settings/account: billing handoff loaded`);- });-- it('/home — loads after settings round-trip', async () => {- console.log(`${LOG_PREFIX} Navigating back to /home`);- await navigateToHome();- const homeText = await waitForHomePage(PANEL_TIMEOUT);- expect(homeText).toBeTruthy();- console.log(`${LOG_PREFIX} /home: loaded — "${homeText}"`);- });-- it('/chat — loads within 10s', async () => {- console.log(`${LOG_PREFIX} Navigating to /chat`);- await navigateViaHash('/chat');- await waitForPanelLoad('/chat');-- const chatMarkers = ['Threads', 'Chat', 'Message', 'New thread', 'conversation'];- let found = false;- for (const marker of chatMarkers) {- if (await textExists(marker)) {- console.log(`${LOG_PREFIX} /chat: found marker "${marker}"`);- found = true;- break;- }- }- expect(found).toBe(true);- console.log(`${LOG_PREFIX} /chat: loaded`);- });-});