Orkas is an open-source (MIT), local-first AI team for your desktop: a Commander turns your goal into to-dos and coordinates 16 built-in specialist agents plus Claude Code, Codex, OpenCode, OpenClaw and Hermes, with projects, scheduled automations and connectors. Free app for macOS & Windows; built-in models or your own keys.
JavaScript agent-collaborationagent-harnessagent-orchestrationagent-teamagent-workflowai-assistantai-automationai-employeeai-productivityai-teamai-workflowautonomous-agentsclaude-code-guiclaude-coworkdesktop-agentlocal-firstmulti-agentmulti-agent-systemself-evolving-agentstask-automation
fix(ui): constrain task details to the app viewport
IgnoreMeBut910f73e135e3
diff --git a/src/renderer/modules/conversation-info.js b/src/renderer/modules/conversation-info.jsindex fec11f8b..3a7d471d 100644--- a/src/renderer/modules/conversation-info.js+++ b/src/renderer/modules/conversation-info.js@@ -723,6 +723,7 @@ const ConversationInfo = (() => {const panel = document.getElementById('conversation-info-panel');const toggle = document.getElementById('conversation-info-toggle');if (panel) panel.hidden = !_open;+ if (_open) _applyPanelWidth();if (toggle) {toggle.classList.toggle('is-active', _open);toggle.setAttribute('aria-expanded', _open ? 'true' : 'false');@@ -1291,8 +1292,8 @@ const ConversationInfo = (() => {if (!panel || !container) return;const available = container.getBoundingClientRect().width;if (available <= 0) return;- const minimum = Math.min(320, available);- const maximum = Math.max(minimum, available - Math.min(420, available * 0.5));+ const minimum = Math.min(400, available);+ const maximum = Math.max(minimum, Math.floor(window.innerWidth * 0.3));_panelWidth = Math.round(Math.max(minimum, Math.min(_panelWidth, maximum)));panel.style.width = `${_panelWidth}px`;panel.style.flexBasis = `${_panelWidth}px`;diff --git a/src/renderer/style.css b/src/renderer/style.cssindex 0be94d08..41682404 100644--- a/src/renderer/style.css+++ b/src/renderer/style.css@@ -5111,8 +5111,8 @@ body.is-sidebar-resizing iframe { pointer-events: none; }position: relative;flex: 0 0 400px;width: 400px;- min-width: 320px;- max-width: none;+ min-width: 400px;+ max-width: max(400px, 30vw);display: flex;flex-direction: column;min-height: 0;diff --git a/test/e2e/web_assist_e2e_panel.spec.ts b/test/e2e/web_assist_e2e_panel.spec.tsindex 88398590..cac3e071 100644--- a/test/e2e/web_assist_e2e_panel.spec.ts+++ b/test/e2e/web_assist_e2e_panel.spec.ts@@ -851,6 +851,10 @@ test('task-details browser supports tabs, address navigation, resizing, and viewexpect(chat!.width).toBeGreaterThan(250);expect((await native())!.bounds.x).toBeGreaterThanOrEqual(Math.floor(box.x));const handle = page.locator('#conversation-info-resize');+ await expect(handle).toHaveAttribute('aria-valuemin', '400');+ await expect(handle).toHaveAttribute('aria-valuemax', '400');+ await expect.poll(async () => (await details.boundingBox())!.width).toBe(400);+ const nativeWidth = (await native())!.bounds.width;const grip = (await handle.boundingBox())!;const pageBeforeResize = (await native())!.id;const resizeDocument = () => orkas.electronApp!.evaluate(({ webContents }, id) => (@@ -861,15 +865,15 @@ test('task-details browser supports tabs, address navigation, resizing, and viewawait page.mouse.down();await page.mouse.move(grip.x + 85, grip.y + 100);// Assert while the pointer is still held, not only after release.- await expect.poll(async () => (await native())?.bounds.width).toBeLessThan(box.width - 40);+ await expect.poll(async () => (await native())?.bounds.width).toBe(nativeWidth);expect((await native())?.visible).toBe(true);expect((await native())?.id).toBe(pageBeforeResize);await page.mouse.move(grip.x - 40, grip.y + 100);- await expect.poll(async () => (await native())?.bounds.width).toBeGreaterThan(box.width);+ await expect.poll(async () => (await native())?.bounds.width).toBe(nativeWidth);expect((await native())?.visible).toBe(true);await page.mouse.move(grip.x + 85, grip.y + 100);await page.mouse.up();- await expect.poll(async () => (await browser.boundingBox())!.width).toBeLessThan(box.width - 40);+ await expect.poll(async () => (await details.boundingBox())!.width).toBe(400);const resizedWidth = (await browser.boundingBox())!.width;await expect.poll(async () => (await native())?.visible).toBe(true);// An unrelated overlay outside the browser must not blank its viewport.@@ -997,6 +1001,33 @@ test('task-details browser supports tabs, address navigation, resizing, and viewawait expect.poll(async () => (await native())?.visible).toBe(true);const state = await orkas.invoke<{ state: { conversation_id: string; assistant_controlled: boolean } }>('webAssist.state', {});expect(state.state).toMatchObject({ conversation_id: cid, assistant_controlled: true });+ // The host display can be narrower than the emulated viewport. Exercise+ // wide layout on Files so the native browser is never placed off screen.+ await page.evaluate(() => (window as any).ConversationInfo.openAndSetTab('files'));+ await page.setViewportSize({ width: 1800, height: 900 });+ await expect(handle).toHaveAttribute('aria-valuemax', '540');+ await handle.press('ArrowLeft');+ await expect.poll(async () => (await details.boundingBox())!.width).toBe(424);+ const wideGrip = (await handle.boundingBox())!;+ await page.mouse.move(wideGrip.x + wideGrip.width / 2, wideGrip.y + 100);+ await page.mouse.down();+ await page.mouse.move(wideGrip.x - 800, wideGrip.y + 100);+ await expect.poll(async () => (await details.boundingBox())!.width).toBe(540);+ await page.mouse.move(wideGrip.x + 300, wideGrip.y + 100);+ await expect.poll(async () => (await details.boundingBox())!.width).toBe(400);+ await page.mouse.up();+ await handle.press('ArrowRight');+ await expect.poll(async () => (await details.boundingBox())!.width).toBe(400);+ for (let step = 0; step < 10; step++) await handle.press('ArrowLeft');+ await expect.poll(async () => (await details.boundingBox())!.width).toBe(540);+ await page.setViewportSize({ width: 1500, height: 900 });+ await expect.poll(async () => (await details.boundingBox())!.width).toBe(450);+ await expect(handle).toHaveAttribute('aria-valuemax', '450');+ await page.setViewportSize({ width: 1280, height: 800 });+ await expect.poll(async () => (await details.boundingBox())!.width).toBe(400);+ await expect(handle).toHaveAttribute('aria-valuemax', '400');+ await page.evaluate(() => (window as any).ConversationInfo.openAndSetTab('browser'));+ await expect.poll(async () => (await native())?.visible).toBe(true);await page.screenshot({ path: testInfo.outputPath('conversation-browser-panel.png') });await orkas.invoke('webAssist.close', {});} finally {