From 26c1aef49c9493bd5da2678394f5d53612d2b2f7 Mon Sep 17 00:00:00 2001 From: Kevin Buffardi Date: Thu, 5 Nov 2026 22:20:51 -0800 Subject: [PATCH 1/2] chore: bump version to 0.6.0 --- manifest.json | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/manifest.json b/manifest.json index 6f47e2a..5ec632e 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "name": "browser.cpp", "short_name": "browser.cpp", "description": "In-browser C++20 IDE powered by Monaco Editor and WASM Clang", - "version": "0.5.3", + "version": "0.6.0", "minimum_chrome_version": "105", "icons": { "16": "icons/icon16.png", diff --git a/package-lock.json b/package-lock.json index 541be3e..852e8cd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "browser.cpp", - "version": "0.5.3", + "version": "0.6.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "browser.cpp", - "version": "0.5.3", + "version": "0.6.0", "dependencies": { "@xterm/addon-fit": "^0.11.0", "@xterm/addon-web-links": "^0.12.0", diff --git a/package.json b/package.json index fcc1289..d94063c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "browser.cpp", - "version": "0.5.3", + "version": "0.6.0", "description": "In-browser C++20 IDE with WASM Clang toolchain", "private": true, "scripts": { From 719f64e445f30d20ec46ff8a1547de7117dfa45f Mon Sep 17 00:00:00 2001 From: Kevin Buffardi Date: Tue, 1 Dec 2026 18:13:11 -0800 Subject: [PATCH 2/2] test: cover terminal panel drag resizing --- scripts/smoke-browser.mjs | 56 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/scripts/smoke-browser.mjs b/scripts/smoke-browser.mjs index a41a301..eaac8f6 100644 --- a/scripts/smoke-browser.mjs +++ b/scripts/smoke-browser.mjs @@ -377,6 +377,44 @@ async function selectTerminalText(cdp, sessionId, targetText = 'Compilation succ return { ...selection, before, paintBounds: paint.bounds, paint }; } +async function dragTerminalHeader(cdp, sessionId, deltaY) { + const start = await evaluate(cdp, sessionId, `(() => { + const header = document.getElementById('terminal-panel-header'); + const panel = document.getElementById('terminal-panel'); + const container = document.getElementById('terminal-container'); + if (!header || !panel || !container) return null; + const headerRect = header.getBoundingClientRect(); + return { + x: headerRect.left + (headerRect.width * 0.25), + y: headerRect.top + (headerRect.height / 2), + panelHeight: panel.getBoundingClientRect().height, + containerHeight: container.getBoundingClientRect().height, + }; + })()`); + assert(start, 'Terminal resize controls did not render'); + + const endY = start.y + deltaY; + await cdp.send('Input.dispatchMouseEvent', { + type: 'mousePressed', x: start.x, y: start.y, button: 'left', buttons: 1, clickCount: 1, + }, sessionId); + await cdp.send('Input.dispatchMouseEvent', { + type: 'mouseMoved', x: start.x, y: endY, button: 'left', buttons: 1, + }, sessionId); + await cdp.send('Input.dispatchMouseEvent', { + type: 'mouseReleased', x: start.x, y: endY, button: 'left', buttons: 0, clickCount: 1, + }, sessionId); + + return evaluate(cdp, sessionId, `(() => { + const panel = document.getElementById('terminal-panel'); + const container = document.getElementById('terminal-container'); + return { + before: ${JSON.stringify(start)}, + panelHeight: panel?.getBoundingClientRect().height ?? null, + containerHeight: container?.getBoundingClientRect().height ?? null, + }; + })()`); +} + async function captureScreenshot(cdp, sessionId) { const { data } = await cdp.send('Page.captureScreenshot', { format: 'png', @@ -946,6 +984,24 @@ int main() { const hasEditor = await evaluate(cdp, sessionId, `!!document.querySelector('.monaco-editor')`); assert(hasEditor, 'Monaco editor did not render'); + const grownTerminal = await dragTerminalHeader(cdp, sessionId, -60); + assert(grownTerminal.panelHeight > grownTerminal.before.panelHeight, + `Dragging the terminal header up did not grow the panel: ${JSON.stringify(grownTerminal)}`); + assert(grownTerminal.containerHeight > grownTerminal.before.containerHeight, + `Dragging the terminal header up did not grow the terminal content: ${JSON.stringify(grownTerminal)}`); + + const shrunkTerminal = await dragTerminalHeader(cdp, sessionId, 120); + assert(shrunkTerminal.panelHeight < shrunkTerminal.before.panelHeight, + `Dragging the terminal header down did not shrink the panel: ${JSON.stringify(shrunkTerminal)}`); + assert(shrunkTerminal.containerHeight < shrunkTerminal.before.containerHeight, + `Dragging the terminal header down did not shrink the terminal content: ${JSON.stringify(shrunkTerminal)}`); + + if (process.env.BROWSER_SMOKE_ONLY === 'terminal-resize') { + console.log(`Terminal resize drag smoke passed: ${JSON.stringify({ grownTerminal, shrunkTerminal })}`); + server.close(); + return { sessionId, capabilities, createdFileText: null, terminalText: '' }; + } + if (!realRun) { const settingsDefault = await evaluate(cdp, sessionId, `(() => { const button = document.getElementById('btn-settings');