Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
test(ui): repair stale e2e fixtures and expectations across eight suites (#3009)
Call Whited1ad0c54f7c4
diff --git a/ui/e2e/citations/citations.spec.ts b/ui/e2e/citations/citations.spec.tsindex 82b98b26c..aeb8963d1 100644--- a/ui/e2e/citations/citations.spec.ts+++ b/ui/e2e/citations/citations.spec.ts@@ -31,9 +31,13 @@ for (const locale of ['en', 'zh'] as const) {await page.goto('/e2e/citations/fixture.html');});+ // A titled source is announced with the domain the link actually goes to;+ // an untitled one is already named by that domain.const badge = (page: import('@playwright/test').Page, source: typeof SOURCES[number]) =>page.getByRole('link', {- name: copy('chat.citation.badge', { index: source.index, source: source.title }, locale),+ name: source.title === source.label+ ? copy('chat.citation.badge', { index: source.index, source: source.title }, locale)+ : copy('chat.citation.badgeWithDomain', { index: source.index, source: source.title, domain: source.label }, locale),exact: true,}).first();diff --git a/ui/e2e/model-catalog/usageFixture.tsx b/ui/e2e/model-catalog/usageFixture.tsxindex b030c7e14..d6b5e41a5 100644--- a/ui/e2e/model-catalog/usageFixture.tsx+++ b/ui/e2e/model-catalog/usageFixture.tsx@@ -117,6 +117,8 @@ const makeReport = (windowKey: UsageWindowKey): UsageReport => {.map((model_id) => ({ model_id, label: null, ...counters(cost(1.5)) })),})) : []),],+ // No search service ran in this window; the report still says so explicitly.+ services: [],days: [],window_key: windowKey,granularity,diff --git a/ui/e2e/model-provider/fixture.tsx b/ui/e2e/model-provider/fixture.tsxindex 1cfc58376..435662c1b 100644--- a/ui/e2e/model-provider/fixture.tsx+++ b/ui/e2e/model-provider/fixture.tsx@@ -42,7 +42,10 @@ modelsApi.createApiKeySource = async (draft) => {modelsApi.probeSource = async (id, model) => {calls.push('test:' + id + '/' + model);saved = { ...saved, verification_pending: null };- return { source_id: id, model_id: model, protocol: saved.protocol, reachable: true, latency_ms: 123, error: null };+ // A probe tests a model; a search service Source has none to test.+ const protocol = saved.protocol;+ if (protocol === 'search') throw new Error('Search services are not model-probed');+ return { source_id: id, model_id: model, protocol, reachable: true, latency_ms: 123, error: null };};modelsApi.refreshSource = async () => { calls.push('refetch'); return { source: saved, discovered: saved.models.length }; };modelsApi.addCustomModel = async (_id, draft) => {diff --git a/ui/e2e/onboarding-fidelity/connections.spec.ts b/ui/e2e/onboarding-fidelity/connections.spec.tsindex ea5d51461..0fa3e7758 100644--- a/ui/e2e/onboarding-fidelity/connections.spec.ts+++ b/ui/e2e/onboarding-fidelity/connections.spec.ts@@ -5,6 +5,15 @@ import { openOnboarding, openSetup, serveProduct, settleEffects, size } from './async function authFixtures(page: Page) {const cancellations: string[] = [];await page.route('**/api/csrf-token', (route) => route.fulfill({ json: { csrf_token: 'fixture-token' } }));+ // The assistants step reads every Agent, disabled ones included, before it+ // offers any connection; an unanswered read leaves every method disabled.+ await page.route('**/api/agents?*', (route) => route.fulfill({ json: { ok: true, agents: [], default_agent_name: null } }));+ // These cases draw each assistant's own (Direct) connection dialogs. With Model+ // Hub on, a card offers them only once its connection names that supply mode.+ await page.route('**/api/backend/*/connection', (route) => route.fulfill({ json: {+ ok: true, backend: new URL(route.request().url()).pathname.split('/').at(-2), installed: true, enabled: true,+ auth: 'none', application: 'applied', ready: false, entry_eligible: false, supply_mode: 'direct',+ } }));await page.route('**/api/backend/*/auth', (route) => route.fulfill({ json: { ok: true, active_auth_mode: 'none', auth_mode: 'oauth', has_api_key: false, base_url: null } }));await page.route('**/api/backend/opencode/providers', (route) => route.fulfill({ json: { ok: true, providers: [{ id: 'openai', name: 'OpenAI', description: 'ChatGPT subscription or API Key', oauth_available: true, configured: false, local: false, models: [] },@@ -287,10 +296,13 @@ for (const viewport of [{ width: 1200, height: 800 }, { width: 390, height: 640/** Each assistant's dialog, the height its own frame is sized for, and the two methods* whose switch the contract names. OpenCode has no method row — it chooses a provider* first, and that choice is the larger change: it replaces row three AND the middle. */+// Claude Code manages its own authentication when it runs, so a failed read of its+// saved settings is a notice in the body rather than a blocking error with a retry+// (docs/plans/claude-auth-observation-ownership.md). The others block and retry.const ASSISTANTS = [- { slug: 'claude', label: 'Claude Code', height: 620, methods: ['API credentials', 'Claude account'] },- { slug: 'codex', label: 'Codex', height: 580, methods: ['OpenAI API Key', 'Sign in with ChatGPT'] },- { slug: 'opencode', label: 'OpenCode', height: 640, methods: [] },+ { slug: 'claude', label: 'Claude Code', height: 620, methods: ['API credentials', 'Claude account'], readFailure: 'notice' },+ { slug: 'codex', label: 'Codex', height: 580, methods: ['OpenAI API Key', 'Sign in with ChatGPT'], readFailure: 'alert' },+ { slug: 'opencode', label: 'OpenCode', height: 640, methods: [], readFailure: 'alert' },] as const;/** Non-ASCII, because a failure message is user-facing copy and the row it lands in is@@ -391,13 +403,14 @@ for (const viewport of [{ width: 320, height: 568, tight: false }, { width: 390,// not own, so the setup can be measured while a read is genuinely in flight.let releaseConn = () => {};const connGate = new Promise<void>((resolve) => { releaseConn = resolve; });+ let holdConn = false;await page.route('**/api/backend/*/connection', async (route) => {- await connGate;+ if (holdConn) await connGate;return route.fallback();});await page.setViewportSize(viewport);await openOnboarding(page);- await openSetup(page, 'en');+ await openSetup(page, 'en', { beforeAssistants: () => { holdConn = true; } });// An in-flight connection read must not re-lay the card out: it used to add a// status line under the methods, so the card grew while the read settled and// shrank when it landed, moving everything under the person's pointer. Pending@@ -436,7 +449,8 @@ for (const viewport of [{ width: 320, height: 568, tight: false }, { width: 390,// The failure, then the retry the product offers for it.reads.release();- await expect(dialog.getByRole('alert')).toContainText(READ_FAILURE);+ await expect(assistant.readFailure === 'alert' ? dialog.getByRole('alert') : dialog.locator('.connection-notice', { hasText: READ_FAILURE }))+ .toContainText(READ_FAILURE);expect(await stableBoxes(), `${assistant.slug} anchors on failure`).toEqual(anchors);await expectFitsItsRoom(page, assistant.height);await expectReachable(dialog, { scrolling: viewport.tight });@@ -444,8 +458,10 @@ for (const viewport of [{ width: 320, height: 568, tight: false }, { width: 390,await dialog.screenshot({ path: info.outputPath(`${assistant.slug}-read-failed-${size(viewport)}.png`) });reads.fail(false);- await dialog.getByRole('button', { name: 'Retry' }).click();- await expect(dialog.getByRole('alert')).toHaveCount(0);+ if (assistant.readFailure === 'alert') {+ await dialog.getByRole('button', { name: 'Retry' }).click();+ await expect(dialog.getByRole('alert')).toHaveCount(0);+ }expect(await stableBoxes(), `${assistant.slug} anchors after retry`).toEqual(anchors);await expectScrollOwner(page, viewport.tight, `${assistant.slug} after retry:`);await expectReachable(dialog, { scrolling: viewport.tight });@@ -906,7 +922,7 @@ test('the scroll changes hands at the floor, in both directions, whatever is onawait expectEditable(key, `密钥-${visible}`);// Nothing on screen may move the line, and the middle's two biggest changes are the- // other credential and a failed read with its alert and its Retry.+ // other credential and a failed read of the saved settings.await dialog.getByRole('radiogroup', { name: 'Credential type' }).getByRole('radio', { name: 'Auth Token', exact: true }).click();await expectScrollOwner(page, tight, `at ${visible} on Auth Token:`);await dialog.getByRole('radiogroup', { name: 'Credential type' }).getByRole('radio', { name: 'API Key', exact: true }).click();@@ -914,31 +930,32 @@ test('the scroll changes hands at the floor, in both directions, whatever is on// The second of those, reached the way a person reaches it. Nothing re-reads while// the dialog is up — switching method only clears the error — so the honest route to- // a failed read is to leave and come back to a refusal, and the alert and the Retry- // it offers are then really on screen rather than assumed. Counted as well as seen.+ // a failed read is to leave and come back to a refusal. Claude Code manages its own+ // authentication when it runs, so that refusal is a notice in the body, not a blocking+ // error: it is then really on screen rather than assumed. Counted as well as seen.+ const readNotice = dialog.locator('.connection-notice', { hasText: READ_FAILURE });await page.keyboard.press('Escape');await expect(dialog).toHaveCount(0);reads.fail(true);const failing = reads.asked();await page.getByLabel('Claude Code', { exact: true }).getByRole('button', { name: 'Add API Key' }).click();- await expect(dialog.getByRole('alert')).toContainText(READ_FAILURE);+ await expect(readNotice).toBeVisible();expect(reads.asked(), `at ${visible} the failed read was really asked for`).toBeGreaterThan(failing);- const retry = dialog.getByRole('button', { name: 'Retry' });- await expect(retry).toBeVisible();await expect.poll(() => viewportVar(page, '--app-vvh')).toBe(`${visible}px`);await expectFitsItsRoom(page, 620);await expectScrollOwner(page, tight, `at ${visible} with the read failed:`);await expectReachable(dialog, { scrolling: tight });- // And back out of it by the control the product offers for it, which is a second- // real read. Recovery is the half that a latch would pass the first time and fail- // here: the alert goes, the form is the form again, and the room still decides.+ // And back out of it the same way, which is a second real read. Recovery is the half+ // that a latch would pass the first time and fail here: the notice goes, the form is+ // the form again, and the room still decides.reads.fail(false);const retrying = reads.asked();- if (tight) await retry.scrollIntoViewIfNeeded();- await retry.click();- await expect(dialog.getByRole('alert')).toHaveCount(0);- expect(reads.asked(), `at ${visible} the retry was really asked for`).toBeGreaterThan(retrying);+ await page.keyboard.press('Escape');+ await expect(dialog).toHaveCount(0);+ await page.getByLabel('Claude Code', { exact: true }).getByRole('button', { name: 'Add API Key' }).click();+ await expect.poll(() => reads.asked(), { message: `at ${visible} the second read was really asked for` }).toBeGreaterThan(retrying);+ await expect(readNotice).toHaveCount(0);await expect(key).toBeVisible();await expectScrollOwner(page, tight, `at ${visible} after the read recovered:`);await key.focus();@@ -1070,56 +1087,6 @@ test('corrected locked Codex Light has one opacity layer and visible selected meawait page.keyboard.press('Escape'); expect(denied).toEqual([]);});-for (const width of [1200, 390]) {- test(`OpenCode inline model recovery ${width}`, async ({ page }, info) => {- const denied = await serveProduct(page); await authFixtures(page);- let model = 'openai/gpt-5.6-sol'; let writes = 0;- const agent = () => ({ id: 'fixture-agent', name: 'opencode', display_name: 'OpenCode', backend: 'opencode', enabled: true, model, reasoning_effort: null, source: 'builtin', archived: false });- await page.route('**/api/backend/*/connection', (route) => { const backend = new URL(route.request().url()).pathname.split('/').at(-2); return route.fulfill({ json: { ok: true, backend, ready: backend === 'opencode', entry_eligible: backend === 'opencode', installed: true, enabled: true, auth: 'api_key', application: 'applied' } }); });- await page.route('**/api/agents', (route) => route.fulfill({ json: { ok: true, default_agent_name: 'opencode', agents: [agent()] } }));- await page.route('**/api/agents/opencode', (route) => { if (route.request().method() === 'PATCH') { model = route.request().postDataJSON().model; writes++; } return route.fulfill({ json: { ok: true, agent: agent() } }); });- await page.route('**/api/backend/opencode/providers', (route) => route.fulfill({ json: { ok: true, default_provider: 'openai', providers: [{ id: 'anthropic', name: 'Anthropic', description: '', local: false, oauth_available: false, active_auth_type: 'api', configured: true, models: ['chosen-model'] }] } }));- await page.route('**/api/models/agents/opencode/models', (route) => route.fulfill({ json: { ok: true, agent: { backend: 'opencode', mode: 'direct' } } }));- await page.route('**/api/opencode/options', (route) => route.fulfill({ json: { ok: true, data: { models: { providers: [{ id: 'anthropic', models: { 'chosen-model': {} } }] } } } }));- await page.setViewportSize({ width, height: 800 });- await openOnboarding(page); await openSetup(page, 'en');- await page.getByRole('button', { name: 'Enter workspace' }).click();- const recovery = page.getByRole('region', { name: 'Choose a model for this connection' });- await expect(recovery).toBeVisible(); expect(writes).toBe(0);- const picker = recovery.getByRole('combobox'); await expect(picker).toBeEnabled(); await picker.click();- await page.getByRole('option', { name: 'anthropic/chosen-model' }).click();- const apply = recovery.getByRole('button', { name: 'Apply model and enter' });- await apply.scrollIntoViewIfNeeded(); await expect(apply).toBeInViewport();- expect(await recovery.evaluate((node) => node.scrollWidth - node.clientWidth)).toBeLessThanOrEqual(1);- await settleEffects(page); await recovery.screenshot({ path: info.outputPath(`model-recovery-${width}.png`) });- await recovery.getByRole('button', { name: 'Cancel' }).click(); expect(writes).toBe(0);- await expect(recovery).toHaveCount(0); expect(denied).toEqual([]);- });-}--test('saved Slack recovery narrow uses the existing form only after explicit repair', async ({ page }, info) => {- const denied = await serveProduct(page); await authFixtures(page);- let manifests = 0;- await page.route('**/api/config', (route) => route.fulfill({ json: { version: 'v2', setup_completed: false, runtime: {}, capabilities: { model_hub: { enabled: true } }, model_hub: { enabled: true }, platforms: { primary: 'slack', enabled: ['slack'] }, platform_catalog: [{ id: 'slack', config_key: 'slack', credential_fields: ['bot_token'] }], slack: { has_app_token: true, bot_token: '' }, agents: { claude: { enabled: true }, codex: { enabled: true }, opencode: { enabled: true } } } }));- await page.route('**/api/backend/claude/connection', (route) => route.fulfill({ json: { ok: true, backend: 'claude', ready: true, entry_eligible: true, enabled: true, installed: true, application: 'applied', auth: 'api_key' } }));- await page.route('**/api/slack/manifest', (route) => { manifests++; return route.fulfill({ json: { ok: true, manifest: '{}' } }); });- await page.setViewportSize({ width: 390, height: 640 });- await openOnboarding(page); await openSetup(page, 'en');- await page.getByRole('button', { name: 'Enter workspace' }).click();- const recovery = page.getByRole('region', { name: 'Repair saved messaging configuration' });- await expect(recovery).toBeVisible(); expect(manifests).toBe(0);- await recovery.getByRole('button', { name: 'Repair saved messaging configuration' }).click();- await expect.poll(() => manifests).toBe(1);- await recovery.getByRole('button', { name: /Get Bot Token/ }).click();- await recovery.getByPlaceholder('xoxb-... (paste here)').fill('xoxb-fixture-only');- const apply = recovery.getByRole('button', { name: /Apply/ });- await expect(apply).toBeEnabled(); await apply.scrollIntoViewIfNeeded(); await expect(apply).toBeInViewport();- expect(await recovery.evaluate((node) => node.scrollWidth - node.clientWidth)).toBeLessThanOrEqual(1);- await settleEffects(page); await recovery.screenshot({ path: info.outputPath('saved-slack-recovery-narrow.png') });- await recovery.getByRole('button', { name: 'Cancel' }).click();- expect(denied).toEqual([]);-});-for (const lang of ['en', 'zh']) {test(`disabled Settings credentials stay saved without connection ${lang}`, async ({ page }, info) => {const denied = await serveProduct(page);@@ -1141,7 +1108,7 @@ for (const lang of ['en', 'zh']) {}return route.fulfill({ json: { ok: true, active_auth_mode: 'api_key', auth_mode: 'api_key', has_api_key: true, api_key_masked: 'sk-••••test', base_url: 'https://fixture.invalid/v1', file_store_active: true } });});- await page.route('**/api/backend/codex/connection', (route) => route.fulfill({ json: { ok: true, backend: 'codex', installed: true, enabled, auth: 'api_key', application: 'applied', ready: enabled, entry_eligible: enabled } }));+ await page.route('**/api/backend/codex/connection', (route) => route.fulfill({ json: { ok: true, backend: 'codex', installed: true, enabled, auth: 'api_key', application: 'applied', ready: enabled, entry_eligible: enabled, supply_mode: 'direct' } }));await page.setViewportSize({ width: 390, height: 640 });await page.goto(`/e2e/onboarding-fidelity/fixture.html?surface=disabled-settings&lang=${lang}&theme=light`);const saved = lang === 'zh' ? '凭据已保存。此助手当前未启用。' : 'Credentials saved. This assistant is currently disabled.';diff --git a/ui/e2e/onboarding-fidelity/pm-main-flow.spec.ts b/ui/e2e/onboarding-fidelity/pm-main-flow.spec.tsindex 397421057..9c0a4efd2 100644--- a/ui/e2e/onboarding-fidelity/pm-main-flow.spec.ts+++ b/ui/e2e/onboarding-fidelity/pm-main-flow.spec.ts@@ -1,5 +1,5 @@import { expect, test } from '@playwright/test';-import { isRetiredMemoryPath, ORIGIN, serveProduct } from './support';+import { guardRetiredMemory, isRetiredMemoryPath, ORIGIN, serveProduct } from './support';import { readFileSync } from 'node:fs';const en=JSON.parse(readFileSync(new URL('../../src/i18n/en.json', import.meta.url),'utf8'));@@ -88,9 +88,18 @@ for (const [width,chosen] of [[1200,"claude"],[390,"claude"],[1200,"codex"]] as}test('retired Memory API guard rejects root and nested requests without overmatching', async ({page}) => {- const denied=await serveProduct(page);+ // The guard alone, in front of an API that answers everything: what it does not+ // refuse must come back answered. Under serveProduct the general refusal of+ // unanswered API reads would hide an overmatch behind its own abort.+ const denied:string[]=[];+ await page.route('**/*',route=>{+ const url=new URL(route.request().url());+ if(url.origin!==ORIGIN)return route.abort();+ if(url.pathname.startsWith('/api/'))return route.fulfill({json:{ok:true}});+ return route.request().method()==='GET'?route.fallback():route.abort();+ });+ await guardRetiredMemory(page,denied);await page.goto('/e2e/onboarding-fidelity/fixture.html');- await page.route(`${ORIGIN}/api/**`,route=>route.fallback());const results=await page.evaluate(async()=>{const url=(path:string)=>`${location.origin}${path}`;const requests=[@@ -110,7 +119,8 @@ test('retired Memory API guard rejects root and nested requests without overmatc});expect(results.slice(0,3).every(result=>'failed' in result)).toBe(true);expect(results[3]).toEqual({path:'/api/memory-bank/status',status:200});- expect(denied.filter(r=>isRetiredMemoryPath(new URL(r.slice(r.indexOf(' ') + 1)).pathname))).toEqual([+ // The three are sent together, so they reach the guard in any order.+ expect(denied.filter(r=>isRetiredMemoryPath(new URL(r.slice(r.indexOf(' ') + 1)).pathname)).sort()).toEqual(['GET http://127.0.0.1:5212/api/memory?probe=root','POST http://127.0.0.1:5212/api/memory/status?probe=nested','PUT http://127.0.0.1:5212/api/memory/items/1?probe=deep',diff --git a/ui/e2e/onboarding-fidelity/provider-support.ts b/ui/e2e/onboarding-fidelity/provider-support.tsindex 1f289e747..2d5da9f9b 100644--- a/ui/e2e/onboarding-fidelity/provider-support.ts+++ b/ui/e2e/onboarding-fidelity/provider-support.ts@@ -25,6 +25,7 @@ type FakeItem = {vendor?: string;display_name?: string;masked_credential?: string | null;+ config_blocker?: boolean;};type FakeSource = {@@ -265,10 +266,12 @@ export const vendorCount = (facts: ServerFacts): number =>/*** Importable rows this entry point could actually take — what the capsule counts.*- * Stated from the server's own rule rather than from the product's projection: the- * server migrates a backend whole and refuses a batch that omits one of its rows, so- * one row it will not import takes its whole backend out of the offer. Written out- * here because the point of every count below is to be derived twice.+ * Stated from the server's own rule (`apply_native_migration`) rather than from the+ * product's projection: the server migrates every importable row of a backend+ * together, and refuses the backend outright while a native config it cannot parse+ * (`config_blocker`) is present. A row it will not import otherwise stays native,+ * shadowed by the Hub launch, and takes nothing out of the offer. Written out here+ * because the point of every count below is to be derived twice.** Enough for the shapes this fixture serves: no row carries `required_backends`, and* every importable row in it is a key, so there is no closure to walk and nothing@@ -276,7 +279,7 @@ export const vendorCount = (facts: ServerFacts): number =>*/export const importableCount = (facts: ServerFacts): number => {const blocked = new Set(- facts.items.filter((item) => item.proposed_action !== 'import').map((item) => item.backend),+ facts.items.filter((item) => item.config_blocker === true).map((item) => item.backend),);return facts.items.filter((item) => item.proposed_action === 'import' && !blocked.has(item.backend))diff --git a/ui/e2e/onboarding-fidelity/providers.spec.ts b/ui/e2e/onboarding-fidelity/providers.spec.tsindex 17af1a270..76938ab23 100644--- a/ui/e2e/onboarding-fidelity/providers.spec.ts+++ b/ui/e2e/onboarding-fidelity/providers.spec.ts@@ -119,9 +119,10 @@ test.describe('providers screen', () => {// Every proposed row arrives consented to, as the shipped takeover opens it.await expect(primaryAction(page)).toContainText(String(importableCount(server.facts())));- // Withdrawing one card withdraws that provider's rows and nothing else.+ // Withdrawing one card withdraws that provider's rows and nothing else. Claude's+ // native subscription stays native beside its key, so it does not hold the key back.await page.locator('.setup-provider-card[data-provider="openai"]').click();- await expect(primaryAction(page)).toContainText('2');+ await expect(primaryAction(page)).toContainText(String(importableCount(server.facts()) - 1));await primaryAction(page).click();const takeover = page.getByRole('dialog');@@ -131,7 +132,7 @@ test.describe('providers screen', () => {// One atomic batch holding exactly the consented rows — the withdrawn provider's// key was never in it, and nothing was submitted a second time.expect(server.facts().applied).toHaveLength(1);- expect([...server.facts().applied[0]].sort()).toEqual(['opencode-qwen', 'opencode-zhipu']);+ expect([...server.facts().applied[0]].sort()).toEqual(['claude-key', 'opencode-qwen', 'opencode-zhipu']);await takeover.getByRole('button', { name: 'Done', exact: true }).click();await expect(page.getByRole('dialog')).toHaveCount(0);diff --git a/ui/e2e/onboarding-fidelity/support.ts b/ui/e2e/onboarding-fidelity/support.tsindex 7a88918f4..fcff67bd3 100644--- a/ui/e2e/onboarding-fidelity/support.ts+++ b/ui/e2e/onboarding-fidelity/support.ts@@ -122,13 +122,18 @@ export async function serveProduct(page: Page) {await page.route('**/api/opencode/permission-status', (route) =>route.fulfill({ json: { ok: true, permission_allowed: true } }),);+ await guardRetiredMemory(page, denied);+ return denied;+}++/** Refuses and records every request to the retired Memory API, and only those. */+export async function guardRetiredMemory(page: Page, denied: string[]) {await page.route('**/*', (route) => {const request = route.request();if (!isRetiredMemoryPath(new URL(request.url()).pathname)) return route.fallback();denied.push(`${request.method()} ${request.url()}`);return route.abort();});- return denied;}/**@@ -242,7 +247,14 @@ export async function setDocumentHidden(page: Page, hidden: boolean) {}, hidden);}-export async function openSetup(page: Page, lang: string) {+export async function openSetup(+ page: Page,+ lang: string,+ // Runs once the providers step is settled, just before the assistants step opens:+ // the providers step reads each assistant's connection too, so a case that holds+ // those reads for the assistants step must not hold the providers step's.+ options: { beforeAssistants?: () => void } = {},+) {// Assistant captures enter through the same prerequisite as the product. Keep this// source local to this helper so provider-empty cases still begin without one.await page.route('**/api/models/sources', (route) => route.fulfill({ json: { sources: [{@@ -263,6 +275,7 @@ export async function openSetup(page: Page, lang: string) {await primary.click();await page.getByRole('dialog').getByRole('button', { name: lang === 'zh' ? '暂不迁移' : 'Not now', exact: true }).click();}+ options.beforeAssistants?.();await page.getByRole('button', { name: onward }).click();await page.clock.runFor(950);await page.locator('[data-setup-screen="assistants"]').waitFor();diff --git a/ui/e2e/workbench-general/geometry.spec.ts b/ui/e2e/workbench-general/geometry.spec.tsindex 5758d90af..f98591a47 100644--- a/ui/e2e/workbench-general/geometry.spec.ts+++ b/ui/e2e/workbench-general/geometry.spec.ts@@ -96,6 +96,13 @@ async function serveModelHub(page: import('@playwright/test').Page) {return getOnly(route, { agents: [MODEL_HUB_AGENT] });}if (path === '/api/models/agents/codex/chains' && !query) return getOnly(route, { chains: [] });+ // The Tools tab, Sources activation and Source detail share this read.+ if (path === '/api/models/hosted-tools' && !query) return getOnly(route, { ok: true, hosted_tools: { tools: [] } });+ // The page scans for importable credentials on mount; a scan is a POST that+ // changes nothing, so it is answered rather than counted as a write.+ if (path === '/api/models/migration/scan' && !query && route.request().method() === 'POST') {+ return route.fulfill({ json: { ok: true, scan: { items: [] } } });+ }unexpectedModelReads.push(`${route.request().method()} ${path}${query}`);return route.abort();});@@ -261,6 +268,8 @@ test.describe('workbench home geometry', () => {'/api/session', '/api/config', '/api/csrf-token', '/api/projects','/api/workbench/projects-bootstrap', '/api/sessions', '/api/agents','/api/inbox', '/api/version', '/api/events',+ // The home's Computer Use status line reads this on every mount.+ '/api/desktop/computer-use/status',]);await page.route('**/api/**', (route) => {const request = route.request();diff --git a/ui/e2e/workbench-general/mobile-continuation.spec.ts b/ui/e2e/workbench-general/mobile-continuation.spec.tsindex 766a09540..fa4511ab4 100644--- a/ui/e2e/workbench-general/mobile-continuation.spec.ts+++ b/ui/e2e/workbench-general/mobile-continuation.spec.ts@@ -140,6 +140,8 @@ const withWorkspaceApi = async (page: Page) => {: route.fulfill({ status: 404, json: { error: `no project fixture for ${payload.folder_path}` } });});await page.route('**/api/workbench/projects-bootstrap**', (route) => route.fulfill({ json: PROJECTS }));+ // The folder browser resolves its start through /api/browse, then lists every+ // folder through the Files listing and offers the Home favorite.await page.route('**/api/browse', (route) => {const { path } = route.request().postDataJSON() as { path: string };const answer = BROWSE[path];@@ -147,6 +149,17 @@ const withWorkspaceApi = async (page: Page) => {answer ? { json: { ok: true, ...answer } } : { json: { ok: false, error: `no folder fixture for ${path}` } },);});+ await page.route('**/api/browse/favorites', (route) => route.fulfill({ json: { ok: true, favorites: [{ key: 'home', path: HOME_DIR }] } }));+ await page.route('**/api/files/list?*', (route) => {+ const path = new URL(route.request().url()).searchParams.get('path') ?? '';+ const answer = BROWSE[path];+ return route.fulfill(answer+ ? { json: {+ ok: true, path: answer.path, parent: answer.parent, truncated: false, limit: 2000,+ entries: answer.dirs.map((dir) => ({ name: dir.name, kind: 'dir', size: null, mtime: null, ext: '' })),+ } }+ : { status: 404, json: { ok: false, error: { code: 'not_found', message: `no folder fixture for ${path}` } } });+ });return creates;};diff --git a/ui/e2e/workbench-general/standalone-settings.spec.ts b/ui/e2e/workbench-general/standalone-settings.spec.tsindex a7e76022f..475715cb8 100644--- a/ui/e2e/workbench-general/standalone-settings.spec.ts+++ b/ui/e2e/workbench-general/standalone-settings.spec.ts@@ -315,7 +315,10 @@ test('C-SETTINGS-06: retained image viewer releases keys while Settings is foreg// Click the image body away from its hover download affordance so this is the// same pointer path a user takes on the media itself.await inlineImage.click({ position: { x: 8, y: 8 } });- const viewer = page.locator('[role="dialog"][aria-modal="true"]');+ // The viewer is a modal Radix Dialog. Found by what it shows rather than by role+ // and name: it stays mounted while Settings hides it, and a role query skips+ // hidden nodes, which would lose the very image this case follows.+ const viewer = page.locator('[role="dialog"]:has(img[src^="/api/media/"])');await expect(viewer).toBeVisible();const viewerImage = viewer.locator('img');const originalSrc = await viewerImage.getAttribute('src');@@ -360,7 +363,7 @@ test('C-SETTINGS-06: retained image viewer releases keys while Settings is foregawait expect(viewerImage).toHaveAttribute('src', originalSrc!);await expect(viewerImage).toHaveJSProperty('naturalWidth', 64);await expect.poll(async () => settledScale(await originalTransform.getAttribute('style'))).toBeCloseTo(originalScale);- expect(await page.evaluate((node) => node === document.querySelector('[role="dialog"][aria-modal="true"] img'), originalImageHandle)).toBe(true);+ expect(await viewerImage.evaluate((node, original) => node === original, originalImageHandle)).toBe(true);await page.evaluate(() => {(window as Window & { __viewerLowerEscape?: number }).__viewerLowerEscape = 0;