Relax dashboard size requirements

This commit is contained in:
Codex Agent
2025-11-22 18:48:51 +01:00
parent 511544c2eb
commit 038d3d0fea

View File

@@ -224,21 +224,21 @@ class ReactorDashboard:
def _draw(self, stdscr: "curses._CursesWindow", state: PlantState) -> None: def _draw(self, stdscr: "curses._CursesWindow", state: PlantState) -> None:
stdscr.erase() stdscr.erase()
height, width = stdscr.getmaxyx() height, width = stdscr.getmaxyx()
if height < 24 or width < 90: if height < 20 or width < 70:
stdscr.addstr( stdscr.addstr(
0, 0,
0, 0,
"Terminal window too small. Resize to at least 90x24.".ljust(width), "Terminal too small; try >=70x20 or reduce font size.".ljust(width),
curses.color_pair(4), curses.color_pair(4),
) )
stdscr.refresh() stdscr.refresh()
return return
data_height = height - 6 data_height = height - 5
right_width = max(32, width // 3) right_width = max(28, width // 3)
left_width = width - right_width left_width = width - right_width
if left_width < 60: if left_width < 50:
left_width = min(60, width - 20) left_width = min(50, width - 18)
right_width = width - left_width right_width = width - left_width
data_win = stdscr.derwin(data_height, left_width, 0, 0) data_win = stdscr.derwin(data_height, left_width, 0, 0)