Skip to content

fix(workbench): cap editor and output panel heights so console stays in view - #28

Merged
hoce1n merged 1 commit into
mainfrom
260810-fix-workbench-panel-heights
Aug 10, 2026
Merged

hoce1n merged 1 commit into
mainfrom
260810-fix-workbench-panel-heights

Conversation

@monkeycode-global

Copy link
Copy Markdown
Contributor

Problem

The Workbench grid used min-h-[300px] … lg:min-h-[520px] on both column wrappers — a minimum, not a cap. When a snippet was long enough to overflow the editor, the grid row grew unbounded and pushed the console output column down below the viewport, so results were hidden.

Fix

Replace the unbounded minimum with a fixed cap on both panel wrappers:

  • min-h-[300px] lg:min-h-[520px] → h-[300px] lg:h-[520px]

Inside the bounded box, existing scroll containers take over:

  • CodeMirror's own .cm-scroller
  • the overflow-auto console-log and loop-lane containers

Also lower CodeEditor minHeight (220px→140px mobile, 440px→380px desktop) so the editor host fits inside the fixed column without clipping step-mode controls (replay bar, step description).

LoopDiagram.tsx already uses the correct bounded pattern (min-h-0 flex-1 … overflow-auto) and needed no change.

Verification (Playwright, dev server)

  • Desktop (1280px): both columns exactly 520px. Long 45-line snippet: editor .cm-scroller scrollHeight 1010 / clientHeight 448 (scrolls internally); console log container 1276/457 (scrolls internally). Console output (value: 0…39, done, microtask, macrotask) fully visible inside the 520px panel after Run. Same in Performance/loop view; step-mode bars not clipped, replay bar + step description visible.
  • Mobile (375px): stacked columns each 300px, both scroll internally (editor 1096/187, console 1276/220 after run).
  • Embed: /embed still renders with the backlink badge; main scrolls to fit the Workbench inside the iframe.

Checks

  • npm run typecheck — clean
  • npm run lint — 0 errors (8 pre-existing react-refresh warnings)
  • npm test — 45 pass / 0 fail (1324 expects)
  • npm run build — succeeds (client, SSR, prerender)

…in view

Replaces the unbounded min-height on the editor and output column
wrappers with a fixed cap (h-[300px] lg:h-[520px]). A long snippet no
longer stretches the grid row and pushes the console output out of the
viewport; each panel now scrolls internally via the CodeMirror scroller
and the overflow-auto log/lane containers. The CodeEditor minHeight is
lowered (220px->140px mobile, 440px->380px desktop) so the editor host
fits inside the fixed box without clipping step-mode controls.
Co-authored-by: monkeycode-ai <monkeycode-ai@chaitin.com>
@vercel

vercel Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
runtimejs Ready Ready Preview Aug 10, 2026 2:14pm

@hoce1n
hoce1n merged commit 3f03c94 into main Aug 10, 2026
3 checks passed
@hoce1n
hoce1n deleted the 260810-fix-workbench-panel-heights branch August 10, 2026 15:07

This branch was successfully deployed

1 active deployment
Preview — cdaef6ce Deployed Aug 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants