Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
fix(markdown-table): keep overflow scrollbars visible
vastsaaa9ff969b65f
diff --git a/apps/desktop/src/styles/markdown-table.css b/apps/desktop/src/styles/markdown-table.cssindex 2af62758e..1468e74c8 100644--- a/apps/desktop/src/styles/markdown-table.css+++ b/apps/desktop/src/styles/markdown-table.css@@ -30,6 +30,16 @@}.markdown-table-preview-body { min-height: 0; overflow: auto; padding: 0 16px 16px; }.markdown-table-preview-body::-webkit-scrollbar-corner { background: transparent; }+.dialog.markdown-table-preview .markdown-table-preview-body::-webkit-scrollbar-thumb {+ /* Overflow controls stay discoverable while the pointer is on the dialog header. */+ background: color-mix(in oklab, var(--ds-text-primary) 16%, transparent);+ background-clip: content-box;+}+.dialog.markdown-table-preview .markdown-table-preview-body::-webkit-scrollbar-thumb:hover,+.dialog.markdown-table-preview .markdown-table-preview-body::-webkit-scrollbar-thumb:active {+ background: color-mix(in oklab, var(--ds-text-primary) 28%, transparent);+ background-clip: content-box;+}.markdown-table-preview-body.prose-chat .table-wrap { margin: 0; overflow: visible; }/* A reading preview keeps useful column widths and scrolls on small windows. */.markdown-table-preview-body.prose-chat .table-wrap table {diff --git a/apps/desktop/test/fixtures/markdown-table-runner.cjs b/apps/desktop/test/fixtures/markdown-table-runner.cjsindex db6dcedeb..b9dbfecd7 100644--- a/apps/desktop/test/fixtures/markdown-table-runner.cjs+++ b/apps/desktop/test/fixtures/markdown-table-runner.cjs@@ -86,6 +86,9 @@ app.whenReady().then(async () => {check(`${theme} narrow preview stays within viewport`, await evaluate('(() => { const r = document.querySelector("[role=dialog]").getBoundingClientRect(); return r.left >= 0 && r.right <= innerWidth && r.top >= 0 && r.bottom <= innerHeight; })()'));check(`${theme} long table scrolls inside the preview`, await evaluate('(() => { const body = document.querySelector(".markdown-table-preview-body"); return body.scrollHeight > body.clientHeight && getComputedStyle(body).overflowY === "auto"; })()'));check(`${theme} narrow preview scrolls horizontally instead of crushing columns`, await evaluate('(() => { const body = document.querySelector(".markdown-table-preview-body"); const header = document.querySelector("[role=dialog] th"); const range = document.createRange(); range.selectNodeContents(header); return body.scrollWidth > body.clientWidth && range.getClientRects().length === 1; })()'));+ const headerPoint = await evaluate('(() => { const r = document.querySelector(".markdown-table-preview-head").getBoundingClientRect(); return {x:Math.round(r.left+r.width/2),y:Math.round(r.top+r.height/2)}; })()');+ win.webContents.sendInputEvent({ type: "mouseMove", ...headerPoint });+ check(`${theme} overflowing scrollbars stay visible outside the scroll area`, await evaluate('(() => { const body = document.querySelector(".markdown-table-preview-body"); const thumb = getComputedStyle(body, "::-webkit-scrollbar-thumb"); return !body.matches(":hover") && thumb.backgroundColor !== "rgba(0, 0, 0, 0)" && thumb.backgroundColor !== "transparent"; })()'));check(`${theme} sticky header is opaque`, await evaluate('(() => { const canvas = document.createElement("canvas"); const context = canvas.getContext("2d"); context.fillStyle = getComputedStyle(document.querySelector("[role=dialog] th")).backgroundColor; context.fillRect(0, 0, 1, 1); return context.getImageData(0, 0, 1, 1).data[3] === 255; })()'));await evaluate('document.querySelector(".markdown-table-preview-body").scrollTop = 150');check(`${theme} header stays visible while scrolling`, await evaluate('(() => { const body = document.querySelector(".markdown-table-preview-body").getBoundingClientRect(); const head = document.querySelector("[role=dialog] th").getBoundingClientRect(); return Math.abs(body.top - head.top) < 2; })()'));diff --git a/docs/spec/04-ux/08-component-spec.md b/docs/spec/04-ux/08-component-spec.mdindex 5dba0c330..edce529ca 100644--- a/docs/spec/04-ux/08-component-spec.md+++ b/docs/spec/04-ux/08-component-spec.md@@ -2213,7 +2213,8 @@ quotes and cell line breaks are escaped, and formula-leading nonnumeric cellsare exported as text. Clipboard failures produce an error toast.The expanded view uses a modal dialog with the existing theme tokens, a scrollable-table and opaque sticky headers, and copy/download controls. Columns retain+table with visible scrollbars whenever either axis overflows, opaque sticky+headers, and copy/download controls. Columns retainreadable minimum widths; narrow previews scroll horizontally instead of crushingshort labels. It follows streamed rows,contains keyboard focus, closes with Escape or Close, and restores focus to itsdiff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.mdindex 915181bd7..5e695c4e2 100644--- a/docs/spec/06-delivery/04-e2e-test-plan.md+++ b/docs/spec/06-delivery/04-e2e-test-plan.md@@ -17276,7 +17276,8 @@ the latest destination. These assertions measure work counts, not device FPS.syntax and alignment. CSV decodes as UTF-8 and preserves fields and line breaks.The modal fits the viewport, traps focus, updates streamed rows, blocks nativework-panel surfaces, and returns focus on dismissal. Narrow previews keep short- headers on one line and scroll horizontally; sticky headers fully cover the+ headers on one line and scroll horizontally with visible scrollbars on+ overflowing axes; sticky headers fully cover therows behind them. Failed copies report anerror, not success. Existing table wrapping remains intact.- **Automated coverage**: `node --test apps/desktop/test/markdown-table.test.mjs`