Summary
The code editor viewport height is not properly synchronized with the displayed line numbers. The editor container visually ends around line 22, while the line-number gutter continues displaying up to line 28 outside the bordered editor area. This causes hidden code lines, inconsistent scrolling behavior, and inaccurate visual mapping between the editor content and line numbers.
Steps To Reproduce
- Open the code editor page.
- Paste or load a Python file containing more than 22 lines of code.
- Observe the editor border and line-number gutter.
- Scroll inside the editor.
- Notice that line numbers continue beyond the visible editor container while some code lines remain partially hidden below the border.
Expected Behavior
- The editor container height should fully match the visible code area.
- Line numbers should remain aligned with the visible code lines.
- All visible lines should stay inside the bordered editor container.
- Scrolling should behave consistently without clipping or hidden lines.
Actual Behavior
- The editor border visually ends before all displayed line numbers are covered.
- Line numbers continue appearing outside the editor boundary.
- Some code lines become hidden below the visible editor area.
- Scrolling causes visual misalignment between the editor content and line-number gutter.
Environment
- OS: Windows 10/11
- Browser (if frontend): Microsoft Edge / Chrome
- Python version (if backend): N/A
Logs/Screenshots
Screenshot attached showing:
- Editor border ending near line 22
- Line numbers continuing until line 28
- Hidden code area below the visible editor container

Summary
The code editor viewport height is not properly synchronized with the displayed line numbers. The editor container visually ends around line 22, while the line-number gutter continues displaying up to line 28 outside the bordered editor area. This causes hidden code lines, inconsistent scrolling behavior, and inaccurate visual mapping between the editor content and line numbers.
Steps To Reproduce
Expected Behavior
Actual Behavior
Environment
Logs/Screenshots
Screenshot attached showing: