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): allow task details resizing beyond the default width
IgnoreMeBut40e912ecfa59
diff --git a/src/renderer/modules/conversation-info.js b/src/renderer/modules/conversation-info.jsindex 3a7d471d..6ae5597b 100644--- a/src/renderer/modules/conversation-info.js+++ b/src/renderer/modules/conversation-info.js@@ -17,7 +17,7 @@ const ConversationInfo = (() => {let _cid = null;let _open = false;let _activeTab = 'files';- let _panelWidth = 400;+ let _panelWidth = null;let _resizing = false;let _seq = 0;let _fileSeq = 0;@@ -1293,15 +1293,16 @@ const ConversationInfo = (() => {const available = container.getBoundingClientRect().width;if (available <= 0) return;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`;+ const maximum = Math.max(minimum, available - Math.min(420, available * 0.5));+ const width = Math.round(Math.max(minimum, Math.min(_panelWidth ?? window.innerWidth * 0.3, maximum)));+ if (_panelWidth !== null) _panelWidth = width;+ panel.style.width = `${width}px`;+ panel.style.flexBasis = `${width}px`;const handle = document.getElementById('conversation-info-resize');if (handle) {handle.setAttribute('aria-valuemin', String(Math.round(minimum)));handle.setAttribute('aria-valuemax', String(Math.round(maximum)));- handle.setAttribute('aria-valuenow', String(_panelWidth));+ handle.setAttribute('aria-valuenow', String(width));}}@@ -1323,6 +1324,7 @@ const ConversationInfo = (() => {handle.addEventListener('pointerdown', (event) => {if (event.button !== 0) return;event.preventDefault();+ _panelWidth = panel.getBoundingClientRect().width;_resizing = true;handle.setPointerCapture(event.pointerId);document.body.classList.add('is-conversation-info-resizing');@@ -1341,7 +1343,7 @@ const ConversationInfo = (() => {if (event.isComposing || event.keyCode === 229) return;if (!['ArrowLeft', 'ArrowRight'].includes(event.key)) return;event.preventDefault();- _panelWidth += event.key === 'ArrowLeft' ? 24 : -24;+ _panelWidth = panel.getBoundingClientRect().width + (event.key === 'ArrowLeft' ? 24 : -24);_applyPanelWidth();try { localStorage.setItem('orkas.conversationInfo.width', String(_panelWidth)); } catch (_) {}});diff --git a/src/renderer/style.css b/src/renderer/style.cssindex 41682404..7a86b02e 100644--- a/src/renderer/style.css+++ b/src/renderer/style.css@@ -5109,10 +5109,10 @@ body.is-sidebar-resizing iframe { pointer-events: none; }modules/conversation-info.js for this design pass. ── */.conversation-info-panel {position: relative;- flex: 0 0 400px;- width: 400px;- min-width: 400px;- max-width: max(400px, 30vw);+ flex: 0 0 max(400px, 30vw);+ width: max(400px, 30vw);+ min-width: min(400px, 100%);+ max-width: 100%;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 cac3e071..29fb29a0 100644--- a/test/e2e/web_assist_e2e_panel.spec.ts+++ b/test/e2e/web_assist_e2e_panel.spec.ts@@ -728,6 +728,13 @@ test('task-details browser supports tabs, address navigation, resizing, and viewawait (window as any).loadConversations();(window as any).setView('conversation', taskId);}, cid);+ await page.evaluate(() => (window as any).ConversationInfo.openAndSetTab('files'));+ await page.setViewportSize({ width: 1800, height: 900 });+ await expect.poll(async () => (await page.locator('#conversation-info-panel').boundingBox())!.width).toBe(540);+ await page.setViewportSize({ width: 1500, height: 900 });+ await expect.poll(async () => (await page.locator('#conversation-info-panel').boundingBox())!.width).toBe(450);+ await page.setViewportSize({ width: 1280, height: 800 });+ await expect.poll(async () => (await page.locator('#conversation-info-panel').boundingBox())!.width).toBe(400);const opened = await orkas.electronApp!.evaluate(async ({ BrowserWindow }, input) => {const owner = BrowserWindow.getAllWindows()[0];const web = (process as any).mainModule.require(input.modulePath);@@ -852,7 +859,7 @@ test('task-details browser supports tabs, address navigation, resizing, and viewexpect((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');+ expect(Number(await handle.getAttribute('aria-valuemax'))).toBeGreaterThan(400);await expect.poll(async () => (await details.boundingBox())!.width).toBe(400);const nativeWidth = (await native())!.bounds.width;const grip = (await handle.boundingBox())!;@@ -869,7 +876,7 @@ test('task-details browser supports tabs, address navigation, resizing, and viewexpect((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).toBe(nativeWidth);+ await expect.poll(async () => (await native())?.bounds.width).toBeGreaterThan(nativeWidth);expect((await native())?.visible).toBe(true);await page.mouse.move(grip.x + 85, grip.y + 100);await page.mouse.up();@@ -1005,27 +1012,28 @@ test('task-details browser supports tabs, address navigation, resizing, and view// 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');+ expect(Number(await handle.getAttribute('aria-valuemax'))).toBeGreaterThan(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(0, wideGrip.y + 100);+ await expect.poll(async () => (await details.boundingBox())!.width).toBeGreaterThan(540);+ await expect.poll(async () => (await page.locator('#panel-conversation .chat-main-pane').boundingBox())!.width).toBeCloseTo(420, 0);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 expect.poll(async () => (await details.boundingBox())!.width).toBe(640);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 expect.poll(async () => (await details.boundingBox())!.width).toBe(640);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 expect.poll(async () => (await details.boundingBox())!.width).toBeLessThan(640);+ expect((await details.boundingBox())!.width).toBeGreaterThan(400);+ await expect.poll(async () => (await page.locator('#panel-conversation .chat-main-pane').boundingBox())!.width).toBeCloseTo(420, 0);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') });diff --git a/test/renderer/conversation-info-resize.test.ts b/test/renderer/conversation-info-resize.test.tsnew file mode 100644index 00000000..da1b2302--- /dev/null+++ b/test/renderer/conversation-info-resize.test.ts@@ -0,0 +1,96 @@+import { describe, expect, it, vi } from 'vitest';+import { readFileSync } from 'node:fs';+import { join } from 'node:path';+import { runInNewContext } from 'node:vm';++const source = readFileSync(join(__dirname, '../../src/renderer/modules/conversation-info.js'), 'utf8');+const storageKey = 'orkas.conversationInfo.width';++function createHarness(viewport = 1800, saved?: string) {+ const listeners = new Map<string, (event: any) => void>();+ const attributes = new Map<string, string>();+ const storage = new Map(saved === undefined ? [] : [[storageKey, saved]]);+ const container = { getBoundingClientRect: () => ({ width: window.innerWidth - 280, right: window.innerWidth }) };+ const panel = {+ hidden: true,+ parentElement: container,+ style: {} as Record<string, string>,+ getBoundingClientRect: () => ({ width: Number.parseFloat(panel.style.width) }),+ };+ const handle = {+ dataset: {} as Record<string, string>,+ setAttribute: (key: string, value: string) => attributes.set(key, value),+ setPointerCapture: vi.fn(),+ addEventListener: (type: string, listener: (event: any) => void) => listeners.set(type, listener),+ };+ const windowListeners = new Map<string, () => void>();+ const window = {+ innerWidth: viewport,+ addEventListener: (type: string, listener: () => void) => windowListeners.set(type, listener),+ };+ runInNewContext(source, {+ window,+ document: {+ readyState: 'complete',+ body: { classList: { add() {}, remove() {} } },+ getElementById: (id: string) => id === 'conversation-info-panel' ? panel : id === 'conversation-info-resize' ? handle : null,+ querySelectorAll: () => [],+ },+ localStorage: { getItem: (key: string) => storage.get(key) ?? null, setItem: (key: string, value: string) => storage.set(key, value) },+ });+ const dispatch = (type: string, event = {}) => listeners.get(type)!({ preventDefault() {}, ...event });+ return { panel, attributes, storage, dispatch, resize: (width: number) => {+ window.innerWidth = width;+ windowListeners.get('resize')!();+ } };+}++describe('conversation info resizing', () => {+ it('defaults to 30% of the app width with a 400px minimum before the user resizes', () => {+ const harness = createHarness();+ expect(harness.panel.style.width).toBe('540px');+ harness.resize(1500);+ expect(harness.panel.style.width).toBe('450px');+ harness.resize(1280);+ expect(harness.panel.style.width).toBe('400px');+ expect(harness.storage.has(storageKey)).toBe(false);+ });++ it('allows dragging beyond the default and restores the saved width on reload', () => {+ const harness = createHarness();+ harness.dispatch('pointerdown', { button: 0, pointerId: 1 });+ harness.dispatch('pointermove', { clientX: 1000 });+ expect(harness.panel.style.width).toBe('800px');+ expect(harness.panel.style.flexBasis).toBe('800px');+ expect(harness.attributes.get('aria-valuenow')).toBe('800');+ harness.dispatch('pointerup');+ expect(harness.storage.get(storageKey)).toBe('800');+ expect(createHarness(1800, harness.storage.get(storageKey)).panel.style.width).toBe('800px');+ });++ it('keeps the panel minimum and leaves space for the conversation at the drag limit', () => {+ const harness = createHarness();+ harness.dispatch('pointerdown', { button: 0, pointerId: 1 });+ harness.dispatch('pointermove', { clientX: 1790 });+ expect(harness.panel.style.width).toBe('400px');+ harness.dispatch('pointermove', { clientX: -100 });+ expect(harness.panel.style.width).toBe('1100px');+ expect(harness.attributes.get('aria-valuemax')).toBe('1100');+ harness.dispatch('pointercancel');+ harness.dispatch('pointermove', { clientX: 1000 });+ expect(harness.panel.style.width).toBe('1100px');+ harness.resize(1280);+ expect(harness.panel.style.width).toBe('580px');+ });++ it('resizes from the displayed default using the keyboard and ignores IME input', () => {+ const harness = createHarness();+ harness.dispatch('keydown', { key: 'ArrowLeft', isComposing: true });+ expect(harness.storage.has(storageKey)).toBe(false);+ harness.dispatch('keydown', { key: 'ArrowLeft' });+ expect(harness.panel.style.width).toBe('564px');+ expect(harness.storage.get(storageKey)).toBe('564');+ harness.dispatch('keydown', { key: 'ArrowRight' });+ expect(harness.panel.style.width).toBe('540px');+ });+});