Skip to content

[Bug] Line Numbers Overflow Outside Code Editor Container #403

@rachel-d-07

Description

@rachel-d-07

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

  1. Open the code editor page.
  2. Paste or load a Python file containing more than 22 lines of code.
  3. Observe the editor border and line-number gutter.
  4. Scroll inside the editor.
  5. 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
Image

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions