From 83690be8bd4724b1f9dc8645ffde9385129a3377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kuty=C5=82a?= Date: Fri, 3 Jul 2026 13:44:15 +0200 Subject: [PATCH] fix(shell): stop clipping last terminal row on alt-screen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit clip-path inset(0 0 17px 0) hid one full row of TUI content — Claude Code's mode/status line was invisible. The rule was a workaround for a stray cursor bar, but the page uses xterm's DOM renderer where the kept .xterm-cursor-layer rule never applied; the clip was hiding content, not the artifact. --- src/apps/shell/public/page-css.test.ts | 17 +++++++++++++++++ src/apps/shell/public/page.css | 5 ----- 2 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 src/apps/shell/public/page-css.test.ts diff --git a/src/apps/shell/public/page-css.test.ts b/src/apps/shell/public/page-css.test.ts new file mode 100644 index 0000000..9132faa --- /dev/null +++ b/src/apps/shell/public/page-css.test.ts @@ -0,0 +1,17 @@ +import { readFileSync } from 'node:fs'; +import { join } from 'node:path'; +import { describe, expect, it } from 'vitest'; + +const css = readFileSync(join(__dirname, 'page.css'), 'utf8'); + +describe('shell page.css terminal rendering', () => { + it('does not clip the last terminal row on the alternate screen buffer', () => { + // A clip-path inset on .alt-screen .xterm-screen hides the bottom row of + // TUI apps (e.g. the Claude Code mode/status line). Regression guard for + // the workaround that amputated one full row of content. + const altScreenBlocks = css.match(/\.alt-screen[^{]*\{[^}]*\}/g) ?? []; + for (const block of altScreenBlocks) { + expect(block).not.toMatch(/clip-path/); + } + }); +}); diff --git a/src/apps/shell/public/page.css b/src/apps/shell/public/page.css index ccca6d8..e04b0a9 100644 --- a/src/apps/shell/public/page.css +++ b/src/apps/shell/public/page.css @@ -346,11 +346,6 @@ display: none !important; } -/* Clip the last row — 17px ≈ 14px font × 1.2 line-height */ -.page-shell .alt-screen .xterm-screen { - clip-path: inset(0 0 17px 0); -} - /* ── Browser pane ─────────────────────────────────────────────────── */ .page-shell .browser-nav { display: flex;