feat: introduce Orven brand and task-focused workspace

This commit is contained in:
Agent Workbench Dev
2026-11-06 14:08:53 +08:00
parent 16fb10ca15
commit b4b139a1ba
74 changed files with 1266 additions and 103 deletions
+4 -3
View File
@@ -1,3 +1,4 @@
import { openWorkbenchTool } from './ui-navigation.mjs';
import assert from 'node:assert/strict';
import fs from 'node:fs';
import path from 'node:path';
@@ -54,7 +55,7 @@ try {
await page.getByRole('combobox', { name: '当前项目', exact: true }).selectOption(project.id);
if (native) {
stage = 'actual native directory picker'; const chosenRoot = path.join(root, 'native-picked-project'); fs.mkdirSync(chosenRoot); fs.writeFileSync(path.join(chosenRoot, 'README.md'), '# Actual native picker project\n');
await page.getByRole('button', { name: '桌面宿主', exact: true }).click();
await openWorkbenchTool(page, '桌面宿主');
const pending = page.getByRole('button', { name: '选择项目文件夹', exact: true }).click();
console.log(JSON.stringify({ nativePickerReady: true, expectedPath: chosenRoot, electronPid: pid, hostPid: original.pid, root }));
await until(async () => (await controller.api('/bootstrap')).projects.some(value => value.root.toLowerCase() === chosenRoot.toLowerCase()), 1200000); await pending;
@@ -107,7 +108,7 @@ try {
const file = await controller.api('/projects/' + project.id + '/file?path=README.md'), scope = { projectId: project.id, sessionId: session.id, taskId: done.execution.task.id };
const invalid = await page.evaluate(async input => { const rejected = []; for (const value of [{ ...input, path: '../outside' }, { ...input, taskId: '00000000-0000-0000-0000-000000000000' }, { ...input, sha256: '0'.repeat(64) }, { ...input, command: 'foreign' }]) { try { await window.desktopWorkbench.revealFile(value); rejected.push(false); } catch { rejected.push(true); } } return rejected; }, { ...scope, path: file.path, sha256: file.sha256 });
assert.deepEqual(invalid, [true, true, true, true]);
await page.getByRole('button', { name: '桌面宿主', exact: true }).click(); await page.getByRole('button', { name: '打开项目目录', exact: true }).click(); await page.getByRole('button', { name: '定位当前文件', exact: true }).click();
await openWorkbenchTool(page, '桌面宿主'); await page.getByRole('button', { name: '打开项目目录', exact: true }).click(); await page.getByRole('button', { name: '定位当前文件', exact: true }).click();
await until(() => application.evaluate(() => globalThis.desktopFixtureCalls.length === 2));
const fixtureCalls = await application.evaluate(() => globalThis.desktopFixtureCalls); assert.deepEqual(fixtureCalls, [{ folder: projectRoot }, { reveal: path.join(projectRoot, 'README.md') }]);
const screenshots = [await snapshot('desktop-host-1440', 1440), await snapshot('desktop-host-390', 390)];
@@ -115,7 +116,7 @@ try {
record(stage, { invalidRejected: invalid.length, fixtureCalls, screenshots, nativeOperations: 'Dialog/shell adapters are declared fixtures in this automated run; actual Windows picker separately verified.' });
stage = 'native stop cancelled, then original host explicitly stopped';
await page.getByRole('button', { name: '关闭检视区', exact: true }).click();
await page.getByRole('button', { name: '桌面宿主', exact: true }).click(); await page.getByRole('button', { name: '停止并退出', exact: true }).click();
await openWorkbenchTool(page, '桌面宿主'); await page.getByRole('button', { name: '停止并退出', exact: true }).click();
await until(() => page.getByRole('button', { name: '停止并退出', exact: true }).isEnabled());
assert.equal((await controller.connect()).identity.instanceId, original.instanceId);
await application.evaluate(({ dialog }) => { dialog.showMessageBox = async () => ({ response: 1 }); });